Admin menu visible to Active users authenticated against LDAP #9895

Closed
opened 2025-12-29 21:24:06 +01:00 by adam · 1 comment
Owner

Originally created by @k1ck3r on GitHub (Jun 25, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.0.3

Python Version

3.12

Steps to Reproduce

Our current Netbox is uses DB backend for user authorization and normal users have Active flag. When we configure LDAP authentication (we are using group based permissions) both DB users and normal users which are active are seeing the ADMIN menu along with Tokens and Permissions submenu. From admin part of Netbox I can see proper user validation via groups - every user which has appropriate group has assigned appropriate permission. Returning back to DB authentication the ADMIN menu is again not visible to active users.

  1. Create "Active" user with some permissions which are not including permission or session key
  2. Check that the user doesn't have access to ADMIN menu
  3. Enable LDAP integration and check user's permissions which are authentication agains LDAP
  4. Check the user created in 1)

In our LDAP config we are using the following settings for Active/Superuser access:

AUTH_LDAP_USER_FLAGS_BY_GROUP = {
'is_active': 'cn=netbox,' + AUTH_LDAP_GROUP_BASE,
'is_superuser': 'cn=netbox-admin,' + AUTH_LDAP_GROUP_BASE,
}

Expected Behavior

The expected behavior is that no matter what authentication end point is used, the Active users shouldn't have access to ADMIN menu at all

Observed Behavior

There are no errors to report

Originally created by @k1ck3r on GitHub (Jun 25, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.0.3 ### Python Version 3.12 ### Steps to Reproduce Our current Netbox is uses DB backend for user authorization and normal users have Active flag. When we configure LDAP authentication (we are using group based permissions) both DB users and normal users which are active are seeing the ADMIN menu along with Tokens and Permissions submenu. From admin part of Netbox I can see proper user validation via groups - every user which has appropriate group has assigned appropriate permission. Returning back to DB authentication the ADMIN menu is again not visible to active users. 1. Create "Active" user with some permissions which are not including permission or session key 2. Check that the user doesn't have access to ADMIN menu 3. Enable LDAP integration and check user's permissions which are authentication agains LDAP 4. Check the user created in 1) In our LDAP config we are using the following settings for Active/Superuser access: AUTH_LDAP_USER_FLAGS_BY_GROUP = { 'is_active': 'cn=netbox,' + AUTH_LDAP_GROUP_BASE, 'is_superuser': 'cn=netbox-admin,' + AUTH_LDAP_GROUP_BASE, } ### Expected Behavior The expected behavior is that no matter what authentication end point is used, the Active users shouldn't have access to ADMIN menu at all ### Observed Behavior There are no errors to report
adam closed this issue 2025-12-29 21:24:07 +01:00
Author
Owner

@k1ck3r commented on GitHub (Jun 25, 2024):

Upgraded to 4.0.6 and the above behavior is gone

@k1ck3r commented on GitHub (Jun 25, 2024): Upgraded to 4.0.6 and the above behavior is gone
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9895