-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add REMOTE_AUTH_AUTOCREATE_GROUPS #8603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add REMOTE_AUTH_AUTOCREATE_GROUPS #8603
Conversation
7ae4d1d to
cc5d48c
Compare
|
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. |
|
The linked issue is #7671 (although not yet accepted) |
|
Sorry, it was linked in the commit message but not the PR description. |
cc5d48c to
c4e556e
Compare
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
c4e556e to
ee1ec29
Compare
|
I've rebased this on the current |
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).
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).
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).
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).
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).
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).
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
There was a problem hiding this comment.
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.
|
@larsks - are you still interested in finishing this? When my review has been addressed, it should be good to go. |
|
@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. |
|
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. |
|
This PR has been automatically closed due to lack of activity. |
|
@larsks Regards |
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.