-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: introduce OAuth2TokenAuthProvider and notion of "principal" #2185
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
Conversation
@@ -31,6 +31,7 @@ dependencies = [ | |||
"openai>=1.66", | |||
"prompt-toolkit", | |||
"python-dotenv", | |||
"python-jose", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not happy about this right now, I am going to split off Auth (and then Credentials) to proper APIs which have proper providers so the overall distribution dependency system takes over. we dont want starter distros to have complex dependencies if they don't need them.
but for now, this will do.
This PR adds a notion of
principal
(aka some kind of persistent identity) to the authentication infrastructure of the Stack. Until now we only used access attributes ("claims" in the more standard OAuth / OIDC setup) but we need the notion of a User fundamentally as well. (Thanks @rhuss for bringing this up.)This value is not yet used anywhere downstream but will be used to segregate access to resources.
In addition, the PR introduces a built-in JWT token validator so the Stack does not need to contact an authentication provider to validating the authorization and merely check the signed token for the represented claims. Public keys are refreshed via the configured JWKS server. This Auth Provider should overwhelmingly be considered the default given the seamless integration it offers with OAuth setups.