Skip to content

Commit 5193638

Browse files
cicnaviclaude
andcommitted
Refuse issuance under a configuration HAIP can not work with (vci_haip)
With vci_haip on, the configuration has to meet what HAIP 1.0, and the FAPI 2.0 provisions it applies, need of it, and no credential is issued while it does not: DPoP required, a protocol cache kept across requests, no wallets which are not registered and no anonymous pre-authorized access, a timestamp validation leeway from 10 to 60 seconds, a scope in every credential configuration and a dc+sd-jwt one among them, none under the diip_proof_bound binding policy, a certificate chain on the signing key and issuer trust anchors, the https issuer identifier mode, and, while status lists are on, the x509 key profile for every pool. ModuleConfig::findVciHaipConfigurationFaults() names what is missing, and getVciHaipEnabled() refuses such a configuration, so every request rule of the profile fails closed with it. The PAR and authorization endpoints ask it for every issuance request, before the user logs in, and the token endpoint for every code of the issuance flow, whichever way the client authenticates, and for every pre-authorized code. The Credential Issuer metadata, credential offers and the Credential Endpoint check it as well. OpenID Connect discovery, which reads the option as set, the JWKS and Status Lists go on as before. The configuration overview lists the missing prerequisites below the HAIP row, and the configuration documentation, the config template and the compliance matrix list what a HAIP configuration needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: OpenAI Codex (gpt-6.1-sol, xhigh review) Assisted-by: Google Antigravity (gemini-3.8-flash-high review)
1 parent 11705c5 commit 5193638

30 files changed

Lines changed: 1417 additions & 57 deletions

‎config/module_oidc.php.dist‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,9 +1205,19 @@ $config = [
12051205
* pre-authorized code too, whatever
12061206
* OPTION_VCI_ALLOW_ANONYMOUS_PRE_AUTHORIZED_ACCESS says). An issuance code
12071207
* lives 60 seconds, and a pushed issuance request 5 minutes, at most.
1208-
* HAIP also has every access token bound to a key of the wallet: set
1209-
* OPTION_VCI_REQUIRE_DPOP as well. See "HAIP 1.0" in the configuration
1210-
* documentation (docs/3-oidc-configuration.md).
1208+
* With it on, nothing is issued while the rest of the configuration does
1209+
* not meet the profile, which needs: OPTION_VCI_REQUIRE_DPOP on; a
1210+
* protocol cache kept across requests (OPTION_PROTOCOL_CACHE_ADAPTER, not
1211+
* ArrayAdapter or NullAdapter); OPTION_VCI_ALLOW_NON_REGISTERED_CLIENTS
1212+
* and OPTION_VCI_ALLOW_ANONYMOUS_PRE_AUTHORIZED_ACCESS off;
1213+
* OPTION_TIMESTAMP_VALIDATION_LEEWAY from 10 to 60 seconds; a scope in
1214+
* every credential configuration, and a dc+sd-jwt one among them; none
1215+
* under the diip_proof_bound binding policy; a certificate chain on the
1216+
* key pair which signs, and OPTION_VCI_ISSUER_TRUST_ANCHORS_FILENAME; the
1217+
* https OPTION_VCI_ISSUER_IDENTIFIER_MODE; and, while status lists are on,
1218+
* the x509 key profile for every pool. The configuration overview lists
1219+
* what is missing. See "HAIP 1.0" in the configuration documentation
1220+
* (docs/3-oidc-configuration.md).
12111221
*/
12121222
// ModuleConfig::OPTION_VCI_HAIP => false,
12131223

@@ -1969,8 +1979,8 @@ $config = [
19691979
* `pre-authorized_grant_anonymous_access_supported`. When false, such a
19701980
* token request is refused with invalid_client; a wallet which sends its
19711981
* `client_id`, registered or not, or authenticates, is still accepted.
1972-
* While issuance follows HAIP (OPTION_VCI_HAIP), no anonymous access is
1973-
* served, and the metadata says so, whatever this option is.
1982+
* With OPTION_VCI_HAIP on, set this to false: nothing is issued
1983+
* otherwise, and the metadata says false either way.
19741984
*/
19751985
// ModuleConfig::OPTION_VCI_ALLOW_ANONYMOUS_PRE_AUTHORIZED_ACCESS => true,
19761986

‎conformance-tests/openid4vci-1_0-compliance.md‎

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

‎docs/1-oidc.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,13 @@ with the OP as its Authorization Server. What that covers:
198198
[HAIP 1.0](3-oidc-configuration.md#haip-10-vci_haip)): pushed, in the
199199
authorization code flow, with PKCE `S256`, from a wallet which authenticates
200200
at the PAR and token endpoints (with a Wallet Attestation, for wallets
201-
registered for it), and with 60-second codes. Credentials and Status List
202-
Tokens can carry X.509 (`x5c`) certificate chains. Among what HAIP requires
203-
of an issuer and the module lacks: the refusal of a configuration HAIP can
204-
not work with (DPoP not required, a credential configuration without a
205-
`scope`, a signing key without a certificate chain); the holder's key in
206-
`cnf.jwk` whatever the proof named it by; and the other FAPI 2.0 provisions
201+
registered for it), and with 60-second codes; and nothing is issued under a
202+
configuration the profile can not work with (DPoP not required, a credential
203+
configuration without a `scope`, a signing key without a certificate chain,
204+
and the like). Credentials and Status List Tokens can carry X.509 (`x5c`)
205+
certificate chains. Among what HAIP requires of an issuer and the module
206+
lacks: the holder's key in `cnf.jwk` whatever the proof named it by; and the
207+
other FAPI 2.0 provisions
207208
(no CORS at the authorization endpoint, no `http` redirect URIs but native
208209
loopback ones, 303 redirects, RSA key lengths). Nor does the module evaluate
209210
the key attestations HAIP leaves to ecosystems to require. The same

‎docs/3-oidc-configuration.md‎

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,16 +1008,46 @@ document is the same with the option on.
10081008
method its client is registered with. `none` is refused (`invalid_client`):
10091009
for an issuance request at the PAR endpoint, for a code of the issuance flow
10101010
at the token endpoint, and for a pre-authorized code, which a wallet that is
1011-
not registered, or names no client, then can not redeem either, whatever
1012-
`vci_allow_anonymous_pre_authorized_access` says (the metadata's
1013-
`pre-authorized_grant_anonymous_access_supported` is then `false`).
1011+
not registered, or names no client, then can not redeem either (the
1012+
metadata's `pre-authorized_grant_anonymous_access_supported` is then
1013+
`false`).
10141014
- **60-second codes.** An issuance authorization code lives 60 seconds at most
10151015
(FAPI 2.0 section 5.3.2.1; the authorization code lifetime when that is
10161016
shorter).
10171017

1018-
HAIP also has every access token bound to a key of the wallet: with the option
1019-
on, set `vci_require_dpop` as well (see
1020-
[DPoP](#dpop-sender-constrained-tokens)).
1018+
### What a HAIP configuration needs
1019+
1020+
With the option on, the rest of the configuration has to let issuance follow
1021+
the profile, and nothing is issued while it does not. It needs:
1022+
1023+
- `vci_require_dpop` on, so that every access token is bound to a key of the
1024+
wallet (HAIP section 4; see [DPoP](#dpop-sender-constrained-tokens));
1025+
- a `protocol_cache_adapter` which keeps entries from one request to the next,
1026+
not `ArrayAdapter` or `NullAdapter`, for the replay checks of DPoP proofs
1027+
and Wallet Attestation proofs of possession (see
1028+
[Caching protocol artifacts](#caching-protocol-artifacts));
1029+
- `vci_allow_non_registered_clients` off, and
1030+
`vci_allow_anonymous_pre_authorized_access` off, which is on unless set:
1031+
every wallet authenticates;
1032+
- `timestamp_validation_leeway` from 10 to 60 seconds (FAPI 2.0 section
1033+
5.3.2.1), which the default, one minute, is;
1034+
- a `scope` in every credential configuration (HAIP section 4.1), and at
1035+
least one `dc+sd-jwt` configuration;
1036+
- no credential configuration under the `diip_proof_bound`
1037+
[binding policy](#holder-binding-and-the-diip-profile);
1038+
- a certificate chain on the key pair which signs, the first under
1039+
`vci_signature_key_pairs`, and `vci_issuer_trust_anchors_filename` (see
1040+
[Issuer certificates](#issuer-certificates-x5c)), with
1041+
`vci_issuer_identifier_mode` `https`;
1042+
- while status lists are on, the `x509` [key profile](#key-profile) for every
1043+
pool: its own `key_profile`, or `vci_status_list_key_profile` for a pool
1044+
which sets none.
1045+
1046+
While one is missing, the Credential Issuer metadata, credential offers, the
1047+
Credential Endpoint, and issuance requests at the PAR, authorization and token
1048+
endpoints fail with a configuration error, logged with everything that is
1049+
missing, and the configuration overview lists it as "HAIP 1.0 Prerequisites".
1050+
OpenID Connect requests, and the discovery document, are served as before.
10211051

10221052
## Key rollover
10231053

‎locales/en/LC_MESSAGES/oidc.po‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,15 @@ msgstr ""
16091609
msgid "Issuance requests are not held to the request rules of HAIP 1.0."
16101610
msgstr ""
16111611

1612+
msgid "HAIP 1.0 Prerequisites"
1613+
msgstr ""
1614+
1615+
msgid "All met"
1616+
msgstr ""
1617+
1618+
msgid "No credential is issued until these are put right."
1619+
msgstr ""
1620+
16121621
msgid "Verifiable Credential Signature Key Pairs"
16131622
msgstr ""
16141623

‎locales/es/LC_MESSAGES/oidc.po‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,15 @@ msgstr ""
16091609
msgid "Issuance requests are not held to the request rules of HAIP 1.0."
16101610
msgstr ""
16111611

1612+
msgid "HAIP 1.0 Prerequisites"
1613+
msgstr ""
1614+
1615+
msgid "All met"
1616+
msgstr ""
1617+
1618+
msgid "No credential is issued until these are put right."
1619+
msgstr ""
1620+
16121621
msgid "Verifiable Credential Signature Key Pairs"
16131622
msgstr ""
16141623

‎locales/fr/LC_MESSAGES/oidc.po‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,15 @@ msgstr ""
16091609
msgid "Issuance requests are not held to the request rules of HAIP 1.0."
16101610
msgstr ""
16111611

1612+
msgid "HAIP 1.0 Prerequisites"
1613+
msgstr ""
1614+
1615+
msgid "All met"
1616+
msgstr ""
1617+
1618+
msgid "No credential is issued until these are put right."
1619+
msgstr ""
1620+
16121621
msgid "Verifiable Credential Signature Key Pairs"
16131622
msgstr ""
16141623

‎locales/hr/LC_MESSAGES/oidc.po‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,15 @@ msgstr ""
16561656
msgid "Issuance requests are not held to the request rules of HAIP 1.0."
16571657
msgstr ""
16581658

1659+
msgid "HAIP 1.0 Prerequisites"
1660+
msgstr ""
1661+
1662+
msgid "All met"
1663+
msgstr ""
1664+
1665+
msgid "No credential is issued until these are put right."
1666+
msgstr ""
1667+
16591668
msgid "Verifiable Credential Signature Key Pairs"
16601669
msgstr ""
16611670

‎locales/it/LC_MESSAGES/oidc.po‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,15 @@ msgstr ""
16091609
msgid "Issuance requests are not held to the request rules of HAIP 1.0."
16101610
msgstr ""
16111611

1612+
msgid "HAIP 1.0 Prerequisites"
1613+
msgstr ""
1614+
1615+
msgid "All met"
1616+
msgstr ""
1617+
1618+
msgid "No credential is issued until these are put right."
1619+
msgstr ""
1620+
16121621
msgid "Verifiable Credential Signature Key Pairs"
16131622
msgstr ""
16141623

‎locales/nl/LC_MESSAGES/oidc.po‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,15 @@ msgstr ""
15631563
msgid "Issuance requests are not held to the request rules of HAIP 1.0."
15641564
msgstr ""
15651565

1566+
msgid "HAIP 1.0 Prerequisites"
1567+
msgstr ""
1568+
1569+
msgid "All met"
1570+
msgstr ""
1571+
1572+
msgid "No credential is issued until these are put right."
1573+
msgstr ""
1574+
15661575
msgid "Verifiable Credential Signature Key Pairs"
15671576
msgstr ""
15681577

0 commit comments

Comments
 (0)