Repository navigation
Validate the client audience of OpenID Connect ID tokens - #391
Conversation
maximthomas
left a comment
There was a problem hiding this comment.
praise: The audience tests exercise both issuer-to-client bindings and check that rejected requests never publish a principal.
suggestion (non-blocking): Cover discovery-backed audience binding at the module boundary.
OpenIdConnectModuleTest.java:328
The new request tests configure explicit issuers with shared secrets. The existing discovery tests exercise the configurator, resolver service, or factory independently. A future change that indexes the module's resolver by the configured issuer field could break discovery-backed initialization or requests while leaving these tests green.
Pin the module contract with a controlled discovery fixture. Configure a resolver with well-known and client_id and omit issuer. Assert SUCCESS and principal publication for a valid ID token with the discovered issuer and configured audience. Issuer binding in the module.
suggestion (non-blocking): Document the required configuration change for upgrades.
A resolver entry without client_id could initialize on the base revision. On this revision, any such entry fails module initialization. Add an upgrade note to the auth-filters changelog or release notes telling operators to set the registered, nonblank client_id in each resolvers entry before upgrading, including entries that use discovery.
|
@maximthomas, I addressed both suggestions in f49727d.
All 68 OpenID Connect tests passed on JDK 21 as part of a 20-module Maven reactor run. |
maximthomas
left a comment
There was a problem hiding this comment.
praise: The discovery test exercises JWKS retrieval and RSA signature verification through the module, then checks the principal name and subject in the callback.
Summary
client_idfor each resolver and validateazpwhen the token supplies it.Upgrade note
Before upgrading, set the registered OpenID Connect client ID as a nonblank
client_idin everyresolversentry, including entries that usewell-knowndiscovery. A missing, blank, or non-string value in any entry prevents the module from initializing.Verification
verifycovered all 103 reactor modules across separate runs. The active profile skipped the embedded Cassandra tests.