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

Errors when the database is in readonly mode #19

Open
PieterL75 opened this issue Dec 20, 2022 · 0 comments
Open

Errors when the database is in readonly mode #19

PieterL75 opened this issue Dec 20, 2022 · 0 comments

Comments

@PieterL75
Copy link

Using the latest django3-auth-saml2, and netbox 3.3.9

I have a replicated database that is in readonly. The netbox frontend should be accessible and works with local users.
When I enable SSO using this plugin, I get an error 'cannot execute UPDATE in a read-only transaction'

I traced this to the def sso_acs that runs the login(req, user_obj)
That call triggers the signal user_logged_in, and performs an update of the database to keep track of the last login timestamp.

In netbox, this is solved by disconnecting that signal, if the database is in readonly mode.

Can there be an option created to be compatible with a readonly database ?
some extra configuration parameter ?

Pieter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant