Disable "Logout" menu item when remote auth enabled #3564

Closed
opened 2025-12-29 18:29:54 +01:00 by adam · 3 comments
Owner

Originally created by @candlerb on GitHub (Apr 14, 2020).

Environment

  • Python version: 3.6.9
  • NetBox version: 2.8.0

Proposed Functionality

Netbox v2.8.0 / #2328 now includes remote authentication via HTTP header.

In the simplest case, I propose that the "Logout" menu item is hidden or disabled when REMOTE_AUTH_ENABLED is True.

Use Case

Reduces user confusion when using REMOTE_AUTH. Netbox currently flashes that you have been logged out, but of course the REMOTE_AUTH_HEADER is still set in the next request, so you are immediately logged back in.

Optional: logout redirect

To actually perform a logout you need to send some sort of trigger. For example, using mod_auth_openidc you can redirect to the OIDCRedirectURI with a parameter logout=<final-URL>. This will logout the session and then redirect you to the given page (presumably not netbox itself, because that would immediately try to log you in again).

Therefore, as a second part of this feature request, you could add a REMOTE_AUTH_LOGOUT_URL setting, which re-enables the Logout menu item, and redirects to this URL when selected.

Database Changes

None

External Dependencies

None

Originally created by @candlerb on GitHub (Apr 14, 2020). ### Environment * Python version: 3.6.9 * NetBox version: 2.8.0 ### Proposed Functionality Netbox v2.8.0 / #2328 now includes remote authentication via HTTP header. In the simplest case, I propose that the "Logout" menu item is hidden or disabled when `REMOTE_AUTH_ENABLED` is True. ### Use Case Reduces user confusion when using REMOTE_AUTH. Netbox currently flashes that you have been logged out, but of course the REMOTE_AUTH_HEADER is still set in the next request, so you are immediately logged back in. ### Optional: logout redirect To actually perform a logout you need to send some sort of trigger. For example, using [mod_auth_openidc](https://github.com/zmartzone/mod_auth_openidc/wiki#9-how-do-i-logout-users) you can redirect to the `OIDCRedirectURI` with a parameter `logout=<final-URL>`. This will logout the session and then redirect you to the given page (presumably not netbox itself, because that would immediately try to log you in again). Therefore, as a second part of this feature request, you could add a `REMOTE_AUTH_LOGOUT_URL` setting, which re-enables the Logout menu item, and redirects to this URL when selected. ### Database Changes None ### External Dependencies None
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 18:29:54 +01:00
adam closed this issue 2025-12-29 18:29:54 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 14, 2020):

In the simplest case, I propose that the "Logout" menu item is hidden or disabled when REMOTE_AUTH_ENABLED is True.

With remote authentication enabled a user may still authenticate locally, in which case the option to log out is still valid, so referencing the setting alone is not sufficient.

@jeremystretch commented on GitHub (Apr 14, 2020): > In the simplest case, I propose that the "Logout" menu item is hidden or disabled when `REMOTE_AUTH_ENABLED` is True. With remote authentication enabled a user may still authenticate locally, in which case the option to log out is still valid, so referencing the setting alone is not sufficient.
Author
Owner

@stale[bot] commented on GitHub (May 6, 2020):

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.

@stale[bot] commented on GitHub (May 6, 2020): 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

@stale[bot] commented on GitHub (May 13, 2020):

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.

@stale[bot] commented on GitHub (May 13, 2020): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3564