[ABCA] Add replay protection for Client Attestation PoP JWTs - #51623
Draft
Ogenbertrand wants to merge 18 commits into
Draft
[ABCA] Add replay protection for Client Attestation PoP JWTs#51623Ogenbertrand wants to merge 18 commits into
Ogenbertrand wants to merge 18 commits into
Conversation
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Signed-off-by: Ogenbertrand <ogenbertrand@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds ABCA PoP JWT replay protection and challenge support.
Changes:
- Tracks used PoP JWT identifiers within an issuance-time window.
- Adds and advertises the attestation challenge endpoint.
- Adds regression tests and OAuth test utilities.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/utils-shared/.../Endpoints.java |
Adds challenge endpoint URL. |
tests/utils-shared/.../ClientAttestationChallengeResponse.java |
Parses challenge responses. |
tests/utils-shared/.../ClientAttestationChallengeRequest.java |
Sends challenge requests. |
tests/utils-shared/.../AbstractOAuthClient.java |
Exposes the request helper. |
tests/base/.../OID4VCBasicWallet.java |
Supports custom challenge, JTI, and issuance time. |
tests/base/.../OIDCAttestationBasedClientAuthenticationTest.java |
Tests challenges and replay rejection. |
services/.../OIDCWellKnownProvider.java |
Advertises the challenge endpoint. |
services/.../OIDCLoginProtocolService.java |
Registers the endpoint route. |
services/.../ClientAttestationChallengeEndpoint.java |
Issues signed challenges. |
services/.../ClientAttestationChallengeResponse.java |
Defines the response payload. |
services/.../AttestationBasedClientAuthenticator.java |
Implements replay and challenge validation. |
core/.../OIDCConfigurationRepresentation.java |
Adds challenge metadata. |
core/.../OAuthErrorException.java |
Adds the challenge-required error code. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+83
to
+84
| ProfileHelper.requireFeature(Profile.Feature.CLIENT_AUTH_ABCA); | ||
| checkSsl(); |
| throw new TokenSignatureInvalidException(attestationPoPJwt, "Invalid token signature"); | ||
| } | ||
|
|
||
| ensureClientAttestationPoPNotReplayed(session, attestationJwt, attestationPoPJwt, clientKey); |
Contributor
Author
|
This PR should be reviewed once: #51574 is merged, as replay protection includes challenge reuse detection integration. So i'll convert it to draft for now. |
Ogenbertrand
marked this pull request as draft
August 11, 2026 12:52
1 task
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.
Implements replay attack protection for Attestation-Based Client Authentication by tracking used PoP JWT jti values per attested client instance within an iat-based sliding window. Also adds regression coverage for PoP JWT reuse, stale PoP JWTs, and preserves challenge reuse detection behavior.
Closes: #44770