Skip to content

OID4VCI: Rework attestations#549

Open
nodh wants to merge 2 commits intofeature/deprecated-code-5.12.0from
feature/attestations-202604
Open

OID4VCI: Rework attestations#549
nodh wants to merge 2 commits intofeature/deprecated-code-5.12.0from
feature/attestations-202604

Conversation

@nodh
Copy link
Copy Markdown
Member

@nodh nodh commented Apr 29, 2026

@nodh nodh added this to the 6.0 milestone Apr 29, 2026
@nodh nodh requested a review from md4096 April 29, 2026 12:51
@nodh nodh self-assigned this Apr 29, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd9f00c210

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

supportedAlgorithms = listOf() // TODO
)
)?.getOrElse { throw IllegalArgumentException("Key attestation required, none provided", it) }
?.header?.keyAttestation
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Serialize attestation JWT instead of reading nested header claim

In createCredentialRequestProofAttestation, the code now reads loadKeyAttestation(...).header.keyAttestation as the proof value. loadKeyAttestation is typed to return a signed KeyAttestationJwt itself, so in the normal case its JOSE header does not contain another nested keyAttestation field. This makes attestation-proof issuance fail with "Key attestation required, none provided" for wallets that return a standard key-attestation JWT. Use the returned JWS serialization as the attestation proof payload.

Useful? React with 👍 / 👎.

clientNonce = clientNonce,
supportedAlgorithms = listOf() // TODO
)
)?.getOrNull()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Throw when required key-attestation callback returns failure

When keyAttestationRequired is present, this path only checks whether the callback exists, then calls getOrNull() and silently drops callback failures. That allows building a JWT proof without key_attestation even though issuer metadata requires it, causing late issuer-side rejection and hiding the local root cause. The required-attestation path should propagate callback errors instead of degrading to null.

Useful? React with 👍 / 👎.

loadKeyAttestation?.invoke(
KeyAttestationInput(
clientNonce = clientNonce,
supportedAlgorithms = listOf() // TODO
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Forward issuer signing algorithms to key-attestation loader

This change hardcodes supportedAlgorithms = listOf() in the attestation proof path, while the previous implementation forwarded issuer-declared proof_signing_alg_values_supported. If the wallet provider uses this input to choose/sign attestations, it can now select an algorithm the issuer does not support, causing avoidable issuance failures against stricter issuers.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db3afe6881

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +371 to 372
if (keyAttestationRequired != null && loadKeyAttestation == null) {
throw IllegalArgumentException("Key attestation required, none provided")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve deprecated loadUnitAttestationPop for required attestations

When keyAttestationRequired is advertised, this check only considers loadKeyAttestation and throws immediately if it is null, even though the class still accepts deprecated loadUnitAttestationPop. That regresses existing integrations that have not migrated yet: they now fail with "Key attestation required, none provided" despite supplying a valid attestation callback via loadUnitAttestationPop, whereas the previous implementation used that callback to build the proof.

Useful? React with 👍 / 👎.

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.

1 participant