16.5. Verify a Wallet Attestation
Feature guides / 16. Wallet workflows · Example context
Licensing Authority receives Wallet Provider's attestation. It must establish provider trust and validate the JWT before deciding whether this wallet is acceptable for driving licence issuance.
How to use it
CredentialIssuerRole.verifyWalletAttestation() and the verifier counterpart provide the JWT verification workflow. Set expectedAudience when accepting an audience-bound attestation. For full wallet authentication, also verify the proof of possession through authenticateWallet(). Wallet trust; Attestation verification.
import type { CryptoEngine } from "@oidfed/crypto";
import { CredentialIssuerRole } from "@oidfed/wallet";
import type { TrustAnchorSet } from "@oidfed/core";
export async function checkWalletProvider(engine: CryptoEngine, jwt: string, anchors: TrustAnchorSet) {
const result = await CredentialIssuerRole.verifyWalletAttestation(jwt, anchors, {
engine,
expectedAudience: "https://auth.licensing-authority.example",
});
if (!result.ok) return result;
return result;
}
What your application owns
A valid provider statement does not itself prove possession of the wallet's confirmation key. Apply framework status and acceptance policy during authentication. Do not accept provider keys directly from an untrusted token. Render wallet_name and wallet_link using the host's safe text/navigation rules; signature verification does not make arbitrary display content safe.
Validate the provider before accepting the instance
Licensing Authority first establishes trust in Wallet Provider's provider and then verifies the Wallet Attestation under the relevant profile. Keep provider evidence expiration separate from the attestation's own expiration: a still-unexpired JWT cannot extend stale provider trust.
A verified attestation describes an instance and its bound key. It does not prove possession of that key on the current request. Require the accompanying proof in an authentication workflow and apply the host's wallet-acceptance policy before allowing the dependent operation.
Wallet Attestation verification details
The built-in JWT format follows OpenID4VCI 1.0 Appendix E and its referenced OAuth Attestation Client Authentication Draft 07. Provider trust is checked before the attestation signature. verifyWalletAttestation checks trust and cryptographic validity; application-specific acceptance remains a separate decision.
Attestation creation accepts public RSA and EC confirmation keys compatible with a supported signature algorithm. The confirmation key binds the instance's asymmetric proof of possession under ACA Draft 07 §§5.1–5.2; its kid is optional. Unsupported key types and private key material return an error before signing.
Protocol operations use a core KeyringEntry. Their remote keys come from the effective role metadata through core's key resolver. Effective inline jwks takes precedence over URI representations so a superior's replacement set cannot be bypassed. Top-level federation keys are not substituted automatically. Wallet Draft 05 does not define a provider attestation-key field; publishing provider protocol keys as jwks, jwks_uri, or signed_jwks_uri is this integration's convention and must match the deployed framework.
Issuer protocol keys follow Wallet Draft 05 §6.2.1 and Federation §5.2.1: kid is optional. The provider integration convention accepts the same key representation. Distinct identifiers are recommended by RFC 7517 §4.5; these sets can also contain keys sharing an identifier. When a set contains both signing and encryption keys, every key must declare use.
Verifier keys require unique, nonempty identifiers under Wallet Draft 05 §6.3.1, including keys obtained through URI references. The same requirement applies to credential_request_encryption.jwks under OpenID4VCI §12.2.4 and to top-level federation signing keys under Federation §3.1.1.
Next: 16.6. Authenticate a wallet with attestation and proof