Skip to content

Nonce Aware Verifier#589

Open
nodh wants to merge 3 commits into
developfrom
feature/nonce-aware-verifier
Open

Nonce Aware Verifier#589
nodh wants to merge 3 commits into
developfrom
feature/nonce-aware-verifier

Conversation

@nodh

@nodh nodh commented Jul 8, 2026

Copy link
Copy Markdown
Member

Part 1 of a better interface for DCAPI: Extract some nonce handling into the verifier.

Next PR: #590

@nodh nodh added this to the 7.0 milestone Jul 8, 2026
@nodh nodh requested review from JesusMcCloud, gp-iaik and tlenz July 8, 2026 10:28
@nodh nodh self-assigned this Jul 8, 2026
@nodh nodh mentioned this pull request Jul 8, 2026

@JesusMcCloud JesusMcCloud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At your discretion, but maybe we should just tackle focused concurrent testing and stress testing in a separate PR

Comment on lines +122 to +127
val authnResponse = it.holderOid4vp.createAuthnResponse(authnRequest).getOrThrow()
.shouldBeInstanceOf<AuthenticationResponseResult.Redirect>()

it.verifierOid4vp.validateAuthnResponse(authnResponse.url).getOrThrow()
it.verifierOid4vp.validateAuthnResponse(authnResponse.url).isFailure shouldBe true
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prime candidate to be executed concurrently like there's no tomorrow: concurrently create requests, once all are there, concurrently create responses and assert nonces are invalidated

private fun AuthnResponseResult.isFullyValid(): Boolean =
idTokenValidationResult?.isFailure != true &&
vpTokenValidationResult?.isFailure != true &&
(vpTokenValidationResult?.getOrNull()?.isFullyValid() ?: true)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this better be ?: false?

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.

3 participants