feat(auth): OIDC compliance improvements#2270
Open
jackmaninov wants to merge 1 commit into
Open
Conversation
Implements several improvements to make Corteza more compliant with OpenID Connect specifications: 1. OIDC-compliant userinfo endpoint - Add /auth/oauth2/userinfo endpoint returning standard OIDC claims - Support both GET and POST methods per OIDC spec - Return proper Content-Type: application/json 2. ID token claims fixes - Include 'sub' claim (subject identifier) in ID tokens - Add 'email' and 'email_verified' claims - Add 'name' claim from user's display name/username 3. Silent authentication support - Implement prompt=none parameter for silent auth checks - Return proper OIDC error responses (login_required, etc.) - Enable refresh token flows without user interaction 4. Discovery endpoint path fix - Mount .well-known/openid-configuration at /auth path - Ensure issuer URL matches discovery endpoint location - Fix OIDC client library compatibility Includes comprehensive tests for the userinfo endpoint and prompt=none error handling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
Same story as my previous PR, this was written with claude-code but has been heavily tested on my production environment. Could probably use some sanity testing with a client other than go-oidc. |
Member
|
Oh wow, thanks for the contribution, will be reviewed and merged if all is good. |
|
Stale pull request message |
b8536d1 to
b7d6d27
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.
Summary
This PR improves OIDC (OpenID Connect) compliance for Corteza's OAuth2/OIDC implementation:
/auth/oauth2/userinfo): Implements OIDC Core 1.0 Section 5.3 compliant endpoint that returns user claims based on token scopes (openid, profile, email)/auth/.well-known/openid-configuration(the original/.well-known/openid-configurationis preserved for backward compatibility)prompt=none): Implements OIDC Core 1.0 Section 3.1.2.1 for silent authentication flows, returning appropriatelogin_requiredorinteraction_requirederrorsuserinfo_endpoint,claims_supported, andscopes_supportedto the discovery documentRelated Issues
Test Plan
prompt=noneerror redirects (4 test cases)Breaking Changes
None. The original
/.well-known/openid-configurationendpoint is preserved for backward compatibility.🤖 Generated with Claude Code