Skip to content

Replace AUTH_EXEMPT_PATHS setting with a view-specific control #16580

Closed
@jeremystretch

Description

@jeremystretch

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

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions