Skip to content

Conversation

@larsks
Copy link
Contributor

@larsks larsks commented Feb 10, 2022

Closes: #7671

When REMOTE_AUTH_AUTOCREATE_GROUPS is True, Netbox will create groups
referenced in the REMOTE_AUTH_GROUP_HEADER that don't exist in the
database.

@larsks larsks force-pushed the feature/remote-group-autocreate branch from 7ae4d1d to cc5d48c Compare February 10, 2022 12:54
@jeremystretch
Copy link
Member

Thank you for your interest in contributing to NetBox, however it appears there is no accepted issue that correlates to this pull request. Before pull requests are opened, we require an accepted issue as per our contributing guide. Please first open an issue and wait for it to be accepted before further work is done on this pull request.

@candlerb
Copy link
Contributor

The linked issue is #7671 (although not yet accepted)

@larsks
Copy link
Contributor Author

larsks commented Feb 10, 2022

Sorry, it was linked in the commit message but not the PR description.

@jeremystretch jeremystretch reopened this Feb 10, 2022
@larsks larsks force-pushed the feature/remote-group-autocreate branch from cc5d48c to c4e556e Compare March 8, 2022 21:54
When REMOTE_AUTH_AUTOCREATE_GROUPS is True, Netbox will create groups
referenced in the REMOTE_AUTH_GROUP_HEADER that don't exist in the
database.

Closes netbox-community#7671
@larsks larsks force-pushed the feature/remote-group-autocreate branch from c4e556e to ee1ec29 Compare March 8, 2022 21:55
@larsks
Copy link
Contributor Author

larsks commented Mar 8, 2022

I've rebased this on the current develop branch.

larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will perform the necessary database
initialization to enable admin logins. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will perform the necessary database
initialization to enable admin logins. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will perform the necessary database
initialization to enable admin logins. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will initialize the database with the
group we use to control access to Netbox. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will initialize the database with the
group we use to control access to Netbox. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will initialize the database with the
group we use to control access to Netbox. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
larsks added a commit to larsks/moc-apps that referenced this pull request Mar 9, 2022
Our upstream patch
(netbox-community/netbox#8603) to enable
automatic group synchronization with Keycloak hasn't drawn much
interest, and I'd like us to be able to use the upstream Netbox image.

This commit sets up a `Job` that will initialize the database with the
group we use to control access to Netbox. The only time this matters is
when initially deploying Netbox (but remains useful to us as we
experiment with Netbox deployment changes on the staging cluster).
PLUGINS_CONFIG = getattr(configuration, 'PLUGINS_CONFIG', {})
RELEASE_CHECK_URL = getattr(configuration, 'RELEASE_CHECK_URL', None)
REMOTE_AUTH_AUTO_CREATE_USER = getattr(configuration, 'REMOTE_AUTH_AUTO_CREATE_USER', False)
REMOTE_AUTH_AUTO_CREATE_GROUP = getattr(configuration, 'REMOTE_AUTH_AUTO_CREATE_GROUP', False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
REMOTE_AUTH_AUTO_CREATE_GROUP = getattr(configuration, 'REMOTE_AUTH_AUTO_CREATE_GROUP', False)
REMOTE_AUTH_AUTO_CREATE_GROUPS = getattr(configuration, 'REMOTE_AUTH_AUTO_CREATE_GROUPS', False)

I think you made a copy paste error. When changing it to the above suggestion the PR works as intended.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add the new setting to the docs.

@kkthxbye-code
Copy link
Contributor

@larsks - are you still interested in finishing this? When my review has been addressed, it should be good to go.

@larsks
Copy link
Contributor Author

larsks commented May 18, 2022

@kkthxbye-code yes, still interested; just ended up with my head in other things for a bit. I'll try submitting an update over the next couple of days.

@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further action is taken.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Jul 18, 2022
@github-actions
Copy link
Contributor

This PR has been automatically closed due to lack of activity.

@github-actions github-actions bot closed this Aug 17, 2022
@davama
Copy link
Contributor

davama commented Sep 16, 2022

@larsks
Hope you are well. Would be great to have this feature!
I can help in testing if need be
Thank you for wiping this up

Regards

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2022
@kkthxbye-code kkthxbye-code removed the pending closure Requires immediate attention to avoid being closed for inactivity label Jan 6, 2023
@netbox-community netbox-community unlocked this conversation Jan 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-create remote groups

5 participants