Add OIDC support#4597
Open
kieftrav wants to merge 3 commits into
Open
Conversation
88224aa to
14d1c73
Compare
Enables Proof Key for Code Exchange (RFC 7636) on the authorization_code grant. Public clients (SPAs, mobile apps) can now authenticate without a client_secret by sending code_challenge/code_verifier parameters. Opt-in per request — existing clients that omit code_challenge continue working unchanged.
Adds standard OIDC endpoints (discovery, JWKS, userinfo) and issues OIDC-compliant ID tokens when the openid scope is requested. Reuses existing RS512 signing key. Existing OAuth2 flows unchanged.
14d1c73 to
5658c5b
Compare
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.
Add OpenID Connect (OIDC) support to Panoptes via
doorkeeper-openid_connect.This enables standard OIDC endpoints (
/.well-known/openid-configuration,/oauth/userinfo,/oauth/discovery/keys) and issues OIDC-compliant ID tokens when theopenidscope is requested. The ID token includes claims forlogin,name,email,email_verified,admin, andzooniverse_id.Changes
doorkeeper-openid_connect ~> 1.9, upgradedoorkeeper-jwtto~> 0.4(required forjwt >= 2.5compatibility):openidto optional scopes, fixencryption_method→signing_methoddeprecationuse_doorkeeper_openid_connectoauth_openid_requeststable for authorization code flow nonce trackingopenidscope (alternative to the interactivedev_seed_data.rb)PANOPTES_PORT,PG_PORT) so developers can override via.envwithout modifying tracked filesOIDC endpoints added
GET /.well-known/openid-configurationGET /oauth/discovery/keysGET /oauth/userinfoopenidscope)Depends on
jwtgem to v2 (merged/released as prerequisite)panoptes-client ~> 1.3and adds gitignore fordocker-compose.override.yml(this branch is based on it)docker-compose.override.yml(independent, no code dependency)Review checklist
apiary.apibfile?doorkeeper-openid_connect. Apiary documentation can be added as makes sense.CI/CD
CI is expected to fail until the dependency chain is resolved. All 8 jobs fail at
bundle installin deployment mode becauseGemfile.lockis out of sync with the new Gemfile entries.Steps to unblock (in order):
jwtgem from~> 1.5.0to>= 2.5panoptes-client1.3.0 to RubyGems — bump version inlib/panoptes/client/version.rb, updateCHANGELOG.md,gem build && gem pushGemfile.lockon this branch —bundle lockwill resolvedoorkeeper-openid_connect,doorkeeper-jwt ~> 0.4, andpanoptes-client ~> 1.3now thatjwt >= 2.5is no longer blocked bypanoptes-clientThe same applies to
Gemfile.next.lockif the dual-boot setup needs to resolve the new gems.(planning to do this after the primary merge... Want to make the dependencies clear before then)