add OIDCOAuthenticator - #822
Merged
Merged
Conversation
generally only needs one configuration value: openid_provider_url
and default username claim to sub
passing jwk to encode requires newer pyjwt than we need
minrk
marked this pull request as ready for review
June 19, 2026 22:36
Member
Author
|
I think this is ready to go. I don't think we need to shift existing classes to be based on OIDC yet, but we can explore that in the future as standalone changes. |
manics
reviewed
Jul 17, 2026
manics
left a comment
Member
There was a problem hiding this comment.
Tested with Keycloak, seems to work!
c.JupyterHub.authenticator_class = "oidc"
c.OAuthenticator.oauth_callback_url = "http://localhost:8000/hub/oauth_callback"
c.OAuthenticator.client_id = "jupyterhub"
c.OAuthenticator.client_secret = "<SECRET>"
c.OIDCOAuthenticator.openid_provider_url = "http://192.168.X.X:8080/realms/master"
c.OIDCOAuthenticator.scope = ["openid", "jupyterhub-roles"]
c.OIDCOAuthenticator.login_service = "keycloak"
c.OIDCOAuthenticator.username_claim = "preferred_username"
c.OIDCOAuthenticator.userdata_params = {"state": "state"}
c.OIDCOAuthenticator.auth_state_groups_key = "oauth_user.jupyterhub.roles"
c.OIDCOAuthenticator.manage_groups = True
c.OIDCOAuthenticator.allowed_groups = ["jupyterhub-users"]
c.OIDCOAuthenticator.admin_groups = ["jupyterhub-admins"]Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
generally only needs one configuration value: openid_provider_url
OIDCOAuthenticator is basically the same as base/generic OAuthenticator, but loads authorization/token/userinfo/jwks from openid configuration instead of requiring user config.
This adds jwks config options and jwt signature verification to the base class, but which remain disabled (unchanged) if unset.
closes #254
TODO: