Auto-create remote groups #5577

Closed
opened 2025-12-29 19:29:40 +01:00 by adam · 8 comments
Owner

Originally created by @larsks on GitHub (Oct 28, 2021).

Originally assigned to: @jschewebbn on GitHub.

NetBox version

v3.0.8

Feature type

Change to existing functionality

Proposed functionality

Allow NetBox to auto-create groups referenced in the REMOTE_AUTH_GROUP_HEADER.

Use case

As a data center administrator using Keycloak to manage auth/authz, I would like NetBox to automatically instantiate groups provided by Keycloak when using REMOTE_AUTH_ENABLED.

With REMOTE_AUTH_ENABLED and REMOTE_AUTH_GROUP_SYNC_ENABLED, it's still necessary to manually create groups before the group sync is effective. I would like to see a REMOTE_AUTH_AUTO_CREATE_GROUPS setting, analagous to REMOTE_AUTH_AUTO_CREATE_USER but for groups, that would cause NetBox to automatically create any groups in the REMOTE_AUTH_GROUP_HEADER. This would allow authorization to be completely delegated to the identity management platform.

This is the same feature requested by this comment in #5775.

Database changes

No response

External dependencies

No response

Originally created by @larsks on GitHub (Oct 28, 2021). Originally assigned to: @jschewebbn on GitHub. ### NetBox version v3.0.8 ### Feature type Change to existing functionality ### Proposed functionality Allow NetBox to auto-create groups referenced in the `REMOTE_AUTH_GROUP_HEADER`. ### Use case As a data center administrator using Keycloak to manage auth/authz, I would like NetBox to automatically instantiate groups provided by Keycloak when using `REMOTE_AUTH_ENABLED`. With `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED`, it's still necessary to manually create groups before the group sync is effective. I would like to see a `REMOTE_AUTH_AUTO_CREATE_GROUPS` setting, analagous to `REMOTE_AUTH_AUTO_CREATE_USER` but for groups, that would cause NetBox to automatically create any groups in the `REMOTE_AUTH_GROUP_HEADER`. This would allow authorization to be completely delegated to the identity management platform. This is the same feature requested by [this comment](https://github.com/netbox-community/netbox/issues/5775#issuecomment-883651758) in #5775. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: feature labels 2025-12-29 19:29:40 +01:00
adam closed this issue 2025-12-29 19:29:41 +01:00
Author
Owner

@larsks commented on GitHub (Nov 21, 2021):

Hi @jeremystretch, I just wanted to check in on this issue and see if I should go ahead and submit a PR for it.

@larsks commented on GitHub (Nov 21, 2021): Hi @jeremystretch, I just wanted to check in on this issue and see if I should go ahead and submit a PR for it.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Jan 20, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Mar 12, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Mar 12, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Author
Owner

@ITJamie commented on GitHub (Mar 12, 2022):

Id still like to see this happen

@ITJamie commented on GitHub (Mar 12, 2022): Id still like to see this happen
Author
Owner

@jeremystretch commented on GitHub (Jan 5, 2023):

@larsks looks like this one fell through the cracks unfortunately. Any chance you're still interested in submitting a PR?

@jeremystretch commented on GitHub (Jan 5, 2023): @larsks looks like this one fell through the cracks unfortunately. Any chance you're still interested in submitting a PR?
Author
Owner

@larsks commented on GitHub (Jan 6, 2023):

@jeremystretch I'd be happy to update the previous PR. I'll take a look this weekend.

@larsks commented on GitHub (Jan 6, 2023): @jeremystretch I'd be happy to update the previous PR. I'll take a look this weekend.
Author
Owner

@kkthxbye-code commented on GitHub (Jan 7, 2023):

I unlocked the old PR here: https://github.com/netbox-community/netbox/pull/8603

You should be able to re-open it yourself now, otherwise let me know.

@kkthxbye-code commented on GitHub (Jan 7, 2023): I unlocked the old PR here: https://github.com/netbox-community/netbox/pull/8603 You should be able to re-open it yourself now, otherwise let me know.
Author
Owner

@jschewebbn commented on GitHub (Apr 29, 2023):

Given that this bug caused me problems this week I applied the changes to the current develop and opened PR https://github.com/netbox-community/netbox/pull/12394

@jschewebbn commented on GitHub (Apr 29, 2023): Given that this bug caused me problems this week I applied the changes to the current develop and opened PR https://github.com/netbox-community/netbox/pull/12394
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5577