Replace AUTH_EXEMPT_PATHS setting with a view-specific control #9846

Closed
opened 2025-12-29 21:23:29 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Jun 14, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.0.5

Feature type

Change to existing functionality

Proposed functionality

NetBox includes a LOGIN_REQUIRED configuration parameter: When enabled, authentication is enforced for all UI views except those with URL paths matching an entry in settings.AUTH_EXEMPT_PATHS.

This issue proposes replacing the static AUTH_EXEMPT_PATHS setting with a dynamic mechanism implemented on individual views which can be used to override enforcement of the global LOGIN_REQUIRED parameter on a per-view basis. The most reliable means of implementation is probably to have the relevant views each register themselves in the global registry, and tweak the current middleware logic to reference the registry instead of the static setting. However, alternative implementations may also be considered.

Use case

Shifting from a static form of declaration to a dynamic one will enable plugins to exempt their own views from LOGIN_REQUIRED enforcement.

Database changes

None

External dependencies

None

Originally created by @jeremystretch on GitHub (Jun 14, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.0.5 ### Feature type Change to existing functionality ### Proposed functionality NetBox includes a [`LOGIN_REQUIRED`](https://netboxlabs.com/docs/netbox/en/stable/configuration/security/#login_required) configuration parameter: When enabled, authentication is enforced for all UI views except those with URL paths matching an entry in [`settings.AUTH_EXEMPT_PATHS`](https://netboxlabs.com/docs/netbox/en/stable/configuration/security/#login_required). This issue proposes replacing the static `AUTH_EXEMPT_PATHS` setting with a dynamic mechanism implemented on individual views which can be used to override enforcement of the global `LOGIN_REQUIRED` parameter on a per-view basis. The most reliable means of implementation is probably to have the relevant views each register themselves in the global registry, and tweak the current middleware logic to reference the registry instead of the static setting. However, alternative implementations may also be considered. ### Use case Shifting from a static form of declaration to a dynamic one will enable plugins to exempt their own views from `LOGIN_REQUIRED` enforcement. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 21:23:29 +01:00
adam closed this issue 2025-12-29 21:23:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9846