Skip to content

add OIDCOAuthenticator - #822

Merged
minrk merged 12 commits into
jupyterhub:mainfrom
minrk:oidc
Aug 28, 2026
Merged

add OIDCOAuthenticator#822
minrk merged 12 commits into
jupyterhub:mainfrom
minrk:oidc

Conversation

@minrk

@minrk minrk commented Jun 11, 2026

Copy link
Copy Markdown
Member

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:

  • more testing
  • docs
  • consider basing several of our actually-OIDC Authenticator classes on this instead of the base (auth0, github, google, AzureAD))

minrk added 5 commits June 11, 2026 08:22
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 minrk changed the title add oidc provider add OIDCOAuthenticator Jun 15, 2026
@minrk
minrk marked this pull request as ready for review June 19, 2026 22:36
@minrk

minrk commented Jul 16, 2026

Copy link
Copy Markdown
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 manics left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"]

Comment thread docs/source/tutorials/provider-specific-setup/providers/oidc.md Outdated
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
@minrk
minrk merged commit 6bb6bc0 into jupyterhub:main Aug 28, 2026
12 checks passed
@minrk
minrk deleted the oidc branch August 28, 2026 15:45
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

Successfully merging this pull request may close these issues.

OIDCAuthenticator - makes sense?

2 participants