Repository navigation
Conversation
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
Add a typed, atomic JWT replay-consumption callback carrying the JTI, issuer, protocol purpose, and exact acceptance expiry. Client assertions, DPoP proofs, JAR, CIBA request objects, and attestation PoP reserve their identifiers after signature and JWT-claim validation. The callback implementation supplies the shared atomic store.
goidc.ErrJTIReplaydistinguishes a replay from an operational store failure; typed store failures fail closed asinternal_error. Preserve the legacy callback while rejecting dual configuration. Also add a post-verificationprivate_key_jwtpolicy hook with a bounded JOSE header view and close the sub-second DPoP replay-expiry gap.PR #134 builds on this contract and integrates nonce validation before JTI reservation. Merge this PR before #134.
Verification
Rechecked the unchanged head
915db0blocally on 2026-10-08 with Go 1.27.2:go test ./...go test -race ./internal/client ./internal/dpop ./internal/authorize ./internal/oidc ./pkg/providergit diff --checkCoverage includes private_key_jwt, client_secret_jwt, JAR including zero-expiry reservations, CIBA request objects, DPoP, and attestation PoP. The integrated #134 branch additionally passes the full race suite.
Upstream CI and conformance runs need maintainer approval; the original workflow runs expired before approval. A real shared replay-store deployment was not exercised by these library tests.
Integration check on 2026-10-08: the current heads of #131–#134 merge without conflicts, and
go test ./...passes on their combined tree (c46e03f8823665c0387d317dc9990d1f54095272).