Enable cookie-based sessions #2501

Closed
opened 2025-12-29 18:19:25 +01:00 by adam · 1 comment
Owner

Originally created by @kartiksubbarao on GitHub (Apr 8, 2019).

I'd like to enable cookie-based sessions (setting SESSION_ENGINE to "django.contrib.sessions.backends.signed_cookies"). My use case is a high-availability configuration where a VIP (netbox.example.com) is managed by keepalived on a master and hot standby replica. Users point to netbox.example.com in their browser. With cookie-based sessions, if the master crashed and keepalived flipped the VIP over to the replica, user sessions could transparently continue for read operations. (Also see this thread on the mailing list: https://groups.google.com/d/msg/netbox-discuss/1tYF9d-wRl8/pfs1iAYOBAAJ)

Jeremy hinted at the possibility of exposing SESSION_ENGINE in the #2426 discussion. If this is practical to implement, I think it could be helpful for many users who want to deploy netbox in various ways.

Originally created by @kartiksubbarao on GitHub (Apr 8, 2019). I'd like to enable cookie-based sessions ([setting SESSION_ENGINE to "django.contrib.sessions.backends.signed_cookies")](https://docs.djangoproject.com/en/2.2/topics/http/sessions/#cookie-session-backend). My use case is a high-availability configuration where a VIP (netbox.example.com) is managed by keepalived on a master and hot standby replica. Users point to netbox.example.com in their browser. With cookie-based sessions, if the master crashed and keepalived flipped the VIP over to the replica, user sessions could transparently continue for read operations. (Also see this thread on the mailing list: [https://groups.google.com/d/msg/netbox-discuss/1tYF9d-wRl8/pfs1iAYOBAAJ](https://groups.google.com/d/msg/netbox-discuss/1tYF9d-wRl8/pfs1iAYOBAAJ)) Jeremy hinted at the possibility of exposing SESSION_ENGINE in the #2426 discussion. If this is practical to implement, I think it could be helpful for many users who want to deploy netbox in various ways.
adam closed this issue 2025-12-29 18:19:25 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 8, 2019):

This issue has been closed as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).

@jeremystretch commented on GitHub (Apr 8, 2019): This issue has been closed as it does not conform to one of the [provided templates](https://github.com/digitalocean/netbox/issues/new/choose) as required by the [contributing guide](https://github.com/digitalocean/netbox/blob/master/CONTRIBUTING.md). If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2501