Skip to content

Fix OpenID Connect dynamic client registration conformance issues - #354

Merged
fyrbach merged 4 commits into
WrenSecurity:mainfrom
pavelhoral:fix-oidc-jwks-reg
Nov 2, 2026
Merged

fyrbach merged 4 commits into
WrenSecurity:mainfrom
pavelhoral:fix-oidc-jwks-reg

Conversation

@pavelhoral

Copy link
Copy Markdown
Member
  • Accept jwks as a JSON object – RFC 7591 / OIDC DCR define jwks as an object, but registration only accepted a string containing JSON and rejected standard requests with invalid_client_metadata. The legacy string form is still accepted. Registration responses now return jwks as an object.
  • Verify private_key_jwt assertions by the client's public keys – the verification method was picked from the client's ID token signing algorithm, so clients with HS256 ID tokens failed private_key_jwt authentication with a server error. Client assertions are now always verified against the client's public keys, and only asymmetric signatures are accepted.
  • Default id_token_signed_response_alg to RS256 – as specified by OIDC DCR §2 (it was HS256).
  • Include the realm in registration_client_uri – the URI dropped the realm, so clients registered in a sub-realm could not read their registration.

These issues were identified by OIDF Conformance Suite. There are other gaps, but those are mainly about missing features rather than errors in existing funcionality.

pavelhoral and others added 4 commits October 29, 2026 11:21
RFC 7591 and OIDC Dynamic Client Registration define the jwks client
metadata as a JSON object, but registration only accepted a string
containing JSON, rejecting standard requests with invalid_client_metadata.

Accept the object form (keeping the legacy string form), require a keys
array, and return jwks as an object in registration responses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client assertions were verified via verifyJwtIdentity, which chooses
between shared-secret and public-key verification based on the client's
ID token signing algorithm. Clients with an HMAC ID token algorithm (the
dynamic registration default) therefore failed private_key_jwt
authentication with a server error.

Add a dedicated verifyClientAssertion that always uses the client's
public keys and accepts only asymmetric signatures, so an assertion
signed with the client secret is never accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenID Connect Dynamic Client Registration specifies RS256 as the default
ID token signing algorithm when the client does not request one, but
Wren:AM defaulted to HS256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The registration_client_uri returned by dynamic client registration was
built from the host and the first path segment of the request, dropping
the realm, so clients registered in a sub-realm could not read their
registration. Build it from the realm-aware client registration endpoint
instead, as advertised in the discovery document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@fyrbach fyrbach 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.

LGTM

@fyrbach
fyrbach merged commit 52f7519 into WrenSecurity:main Nov 2, 2026
4 checks passed
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.

2 participants