Skip to content
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

Replace AUTH_EXEMPT_PATHS setting with a view-specific control #16580

Closed
jeremystretch opened this issue Jun 14, 2024 · 0 comments
Closed

Replace AUTH_EXEMPT_PATHS setting with a view-specific control #16580

jeremystretch opened this issue Jun 14, 2024 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

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

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jun 14, 2024
@jeremystretch jeremystretch self-assigned this Jun 19, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jun 19, 2024
@jeremystretch jeremystretch added this to the v4.1 milestone Jun 24, 2024
jeremystretch added a commit that referenced this issue Jun 26, 2024
* Closes #16580: Remove AUTH_EXEMPT_PATHS

* Misc cleanup
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant