Signed Credential Issuer Metadata
Issuer2 can return its OpenID4VCI Credential Issuer metadata as a signed JWT.
Signed metadata is available automatically for every Issuer2 service, using the same discovery endpoint as JSON metadata. Wallets can select the representation with the HTTP Accept header.
signedMetadata also signs OAuth authorization server metadata; signing is disabled when unconfigured.
How It Works
- The client requests the Issuer2 Credential Issuer metadata endpoint.
- The client sends
Accept: application/jwt. - Issuer2 builds the current metadata and signs it using
signedMetadata, or the key referenced bytokenKeyIdwhensignedMetadatais omitted. - Issuer2 returns a compact JWS using the requested media type.
The Accept header selects JSON or JWT; the signing configuration determines whether the JWT contains jwk or x5c. When signedMetadata is omitted, changing tokenKeyId changes the metadata signer. Otherwise, metadata uses the key selected by signedMetadata.
Prerequisites
Use an existing Issuer2 service. By default, metadata uses tokenKeyId, the same key that signs OID4VCI access tokens, and publishes its public jwk. No additional signing configuration is required.
Configure Metadata Signing
Add one of the following signedMetadata objects to your issuer service configuration. These are configuration fragments; keep the other service fields when creating or updating an issuer. Replace the placeholders with your key material.
| Signing Method | Required Fields | JWT Header |
|---|---|---|
static-jwk | jwk: inline private JWK object | Public jwk |
x509-chain | privateKeyPem, certificateChainPem | x5c |
key-reference | reference: KMS key ID | Public jwk, or x5c when x5cReferences is provided |
Inline Private JWK
{
"signedMetadata": {
"signingMethod": {
"type": "static-jwk",
"jwk": {
"kty": "EC",
"crv": "P-256",
"x": "{publicX}",
"y": "{publicY}",
"d": "{privateD}"
}
}
}
}
Inline PEM Key and Certificates
{
"signedMetadata": {
"signingMethod": {
"type": "x509-chain",
"privateKeyPem": "-----BEGIN PRIVATE KEY-----\n{privateKeyBase64}\n-----END PRIVATE KEY-----",
"certificateChainPem": [
"-----BEGIN CERTIFICATE-----\n{leafCertificateBase64}\n-----END CERTIFICATE-----"
]
}
}
}
For x509-chain, both the unencrypted PKCS#8 privateKeyPem and a non-empty certificateChainPem array are required. Supply the PEM contents inline.
KMS Key Reference
{
"signedMetadata": {
"signingMethod": {
"type": "key-reference",
"reference": "waltid.tenant1.kms1.metadataKey",
"x5cReferences": [
"waltid.tenant1.x509-store.metadataCertificate"
]
}
}
}
Create or import the private key through the KMS API, then set reference to its full key ID. For PEM import, use POST /v1/{target}/kms-service-api/keys/import/pem with the raw PEM body and Content-Type: text/plain. You can use the same key as tokenKeyId or a dedicated metadata key.
To include certificates, create an X.509 Store, store the matching certificate, and put its full target ID in x5cReferences. Store any intermediate certificates separately and list their IDs after the leaf.
For key-reference, x5cReferences is optional. Omit it to publish the referenced key's public jwk. Provide it to publish x5c; the key must match the leaf certificate. Empty arrays, blank references, and unresolved key or certificate references are rejected.
For inline x509-chain, provide one PEM certificate per certificateChainPem entry. Both certificate modes use leaf-first order, followed by any intermediates. Issuer2 validates certificate dates, chain consistency, signing usage, and the key's match with the leaf certificate. Invalid configuration is rejected without falling back to the token key.
Issuer2 selects a compatible signing algorithm from the key. The JWK's alg is optional; when present, it must be compatible with the key. Metadata signing does not change token signing, credential signing, or encryption settings.
Configuration reads redact inline private keys. Preserve the returned redaction value when updating other settings to retain the existing key. Set signedMetadata to null to return to token-key signing.
Request Signed Metadata
For an issuer whose identifier is:
https://{host}/v2/{target}/issuer-service-api/openid4vci
the Credential Issuer metadata URL is:
https://{host}/.well-known/openid-credential-issuer/v2/{target}/issuer-service-api/openid4vci
Endpoint: GET /.well-known/openid-credential-issuer/v2/{target}/issuer-service-api/openid4vci | API Reference
Example Request
curl --request GET \
'https://{orgID}.enterprise-sandbox.waltid.dev/.well-known/openid-credential-issuer/v2/{target}/issuer-service-api/openid4vci' \
--header 'Accept: application/jwt'
Path Parameters
- orgID: String (required) - Your organization ID, e.g.
test.enterprise-sandbox.waltid.dev. - target: String (required) - The resource identifier of the issuer service,
{organizationID}.{tenantID}.{issuerServiceID}.
Example Response
<protected-header>.<payload>.<signature>
The response has status 200, the requested Content-Type, and the compact signed metadata JWT.
JWT Structure
The protected header contains:
| Header | Description |
|---|---|
alg | JWS algorithm of the signing key. |
typ | Always openidvci-issuer-metadata+jwt. |
kid | Key ID of the signing key. |
jwk | Public signing JWK when no certificate chain is used. |
x5c | Standard Base64 DER certificates, leaf first, when a certificate chain is used. Replaces jwk. |
The payload contains the complete JSON Credential Issuer metadata plus these JWT claims:
| Claim | Description |
|---|---|
iss | The credential_issuer identifier. |
sub | The credential_issuer identifier. |
iat | Time at which Issuer2 generated the signed response, as a Unix timestamp. |
Issuer2 does not add an exp claim. A client that caches signed metadata should therefore apply its own refresh policy and respect HTTP caching controls.
Verify Signed Metadata
A consuming client should:
- Confirm that the HTTP
Content-Typeis the signed media type it requested. - Parse the body.
- Reject
alg: noneand symmetric algorithms. - For
jwk, verify with a key trusted for the issuer. Forx5c, validate the certificate chain against your trust policy, then verify the signature with the first certificate's public key. - Confirm that
typisopenidvci-issuer-metadata+jwt. - Confirm that
iss,sub, andcredential_issuerall equal the expected Issuer2 identifier. - Evaluate
iatagainst the client's freshness policy. - Process the remaining payload fields as Credential Issuer metadata.
Verifying with only the JWK embedded in the same JWT proves internal integrity, but does not by itself establish that the key belongs to the expected issuer. Bind the key to trusted issuer configuration, a trusted key distribution mechanism, or another deployment-specific trust policy. An x5c chain must also be trusted by the consuming wallet; Issuer2's local certificate checks do not establish wallet trust.
Unsigned JSON Metadata
Request JSON explicitly when a client does not support signed metadata:
curl --request GET \
'https://{orgID}.enterprise-sandbox.waltid.dev/.well-known/openid-credential-issuer/v2/{target}/issuer-service-api/openid4vci' \
--header 'Accept: application/json'
The signed JWT payload and JSON response are generated from the same current Credential Issuer metadata.
