Skip to content

Fix OIDC discovery document accuracy#70

Merged
eswan18 merged 1 commit into
mainfrom
fix/oidc-discovery-doc
Mar 31, 2026
Merged

Fix OIDC discovery document accuracy#70
eswan18 merged 1 commit into
mainfrom
fix/oidc-discovery-doc

Conversation

@eswan18
Copy link
Copy Markdown
Owner

@eswan18 eswan18 commented Mar 31, 2026

Summary

Fixes two inaccuracies in the OIDC discovery document (/.well-known/openid-configuration) that could cause issues for OIDC client libraries:

  • claims_supported listed "name" which is never returned by any endpoint. Replaced with the claims actually served by UserInfo and ID tokens: preferred_username, given_name, family_name, picture, at_hash. This matters because OIDC clients use this field to decide which claims to request — listing a nonexistent claim while omitting real ones is actively misleading.

  • registration_endpoint pointed to /oauth/register, which is the user self-signup HTML page — not RFC 7591 Dynamic Client Registration. An OIDC client library that supports dynamic registration would POST a JSON client registration request to this URL and get back an HTML form instead of a JSON response. Removed the field entirely since dynamic client registration is not implemented.

Test plan

  • Added assertions to TestOIDCDiscoveryEndpoint validating the corrected claims_supported values and the absence of registration_endpoint
  • Tests written first (red/green TDD) — confirmed they fail against old code and pass against the fix
  • Integration tests pass: go test ./pkg/httpserver/ -run TestOAuthFlowSuite/TestOIDCDiscoveryEndpoint

Closes #56, closes #57.

🤖 Generated with Claude Code

The discovery document had two inaccuracies:

1. claims_supported listed "name" which is never returned by any endpoint.
   Replaced with the claims actually returned by the UserInfo and ID token
   endpoints: preferred_username, given_name, family_name, picture, at_hash.

2. registration_endpoint pointed to /oauth/register (user self-signup),
   not RFC 7591 Dynamic Client Registration. OIDC client libraries that
   support dynamic registration would POST a client registration request
   to this endpoint and get back an HTML form. Removed the field.

Closes #56, closes #57.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@eswan18 eswan18 merged commit 196e56a into main Mar 31, 2026
1 check passed
@eswan18 eswan18 deleted the fix/oidc-discovery-doc branch March 31, 2026 00:54
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.

Remove registration_endpoint from discovery document Fix claims_supported in OIDC discovery document

1 participant