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

Architecture question regardings multiple app instances #855

Open
msander opened this issue Apr 11, 2023 · 3 comments
Open

Architecture question regardings multiple app instances #855

msander opened this issue Apr 11, 2023 · 3 comments

Comments

@msander
Copy link

msander commented Apr 11, 2023

I have implemented the OIDC authorization code flow for my application (using Keycloak as IdP).
Now I think about deploying the application in a cluster behind a load-balancer.
In oic.oauth2.Client there are several object variables which carry state, so I think the load-balancer will have to be setup in a way, that each user is always routed to the same app instance.
Is this correct?

@tpazderka
Copy link
Collaborator

Probably yes, the other option is to have a central storage for session related data and retrieve them on demand.

@msander
Copy link
Author

msander commented Apr 12, 2023

👍 I think the central storage would be the better option, so we can restart the application server without losing sessions.
What would be a good way to achieve this? Is it enough to override the SessionBackend? Or do we also need to centrally store the "grant", "state2nonce",... dicts?

@gbip
Copy link
Contributor

gbip commented Apr 28, 2023

I think overriding the session backend is enough as the session data is saved when you leave your context.

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

No branches or pull requests

3 participants