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

Convert Auth to Being Stateless #1143

Merged
merged 2 commits into from
Oct 10, 2024
Merged

Conversation

1nv8rzim
Copy link
Contributor

@1nv8rzim 1nv8rzim commented Oct 8, 2024

As referenced in #1137, I have been trying to get a stateless deploy of yeti so it can be run with replicas.

The final issue I ran into that there is a local SESSION_STORE within core/web/apiv2/auth.py which is used to store and retract JWTs.

Removing the SESSION_STORE allows for auth to stateless for the Yeti API and is arguably an unnecessary step as JWTs naturally age out and are already retracted by clearing the cookie they are stored in when logging out. It is a very common pattern for JWTs to not be stored server side and it is actually one of their core feature on why they are commonly used.

The only additional security that having the SESSION_STORE provides is immediate retraction of JWTs which I would argue to a very fair trade off for stateless auth (likewise it make debugging more streamlined easier as re-authentication is not longer needed between changes).

@udgover udgover requested a review from tomchop October 9, 2024 08:45
@tomchop tomchop merged commit 4cd94f6 into yeti-platform:main Oct 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants