Open dzarras opened 1 week ago
@dzarras Please add a milestone for draft 15
1. A Credential Issuer that requires `c_nonce` values to be incorporated in proofs, MUST provide a Nonce Endpoint.
Two key points
c_nonce
2. Nonce Endpoint is UNPROTECTED. As a result Nonce values generated by the Nonce Endpoint cannot be bound to a specific Access Token. This is contrary to the Security Considerations provided by the specification to avoid Proof Replay attacks.
Perhaps not. Check here
3. Α Credential Issuer MAY provide the Client with a `c_nonce` value in a Credential Error Response using `invalid_proof` error code. If no `c_nonce` value is provided then the Client must use the Nonce Endpoint to acquire a new `c_nonce` value. 4. A Credential Issuer MAY provide the Client with a refreshed `c_nonce` value in a Credential Response using `c_nonce` and `c_nonce_expires_in` parameters. 5. Interactions with the Credential Issuer increase. For instance, what does it mean for a Client to receive a Credential Response that doesn't contain a `c_nonce` parameter? Is the previous `c_nonce` value still active, or does the Client have to use the Nonce Endpoint to verify the validity of the `c_nonce` value it currently has? 6. If a Client makes multiple calls to the Nonce Endpoint, how many unique values should the Nonce Endpoint return? Does it return a new Nonce value with each invocation? Given that Nonce values cannot be bound to an Access Token, the Nonce Endpoint doesn't have the ability to revoke previously issued Nonce values.
7. Can a Client include different `c_nonce` values in each Proof of Possession of the `proofs` parameter of a Credential Request? Does a Client have to use the same `c_nonce` value for all the `proofs` provided in a Credential Request?
A credential request can use at most a single c_nonce
, regardless if the request is for a single credential or a batch
Quoting various parts of the latest Editor's Draft from OpenId 4 VCI.
A Credential Issuer that requires
c_nonce
values to be incorporated into proofs in the Credential Request MUST offer a Nonce Endpoint using thenonce_endpoint
Credential Issuer Metadata parameter.A request for a nonce is made by sending an HTTP POST request to the URL provided in the
nonce_endpoint
Credential Issuer Metadata parameter. e.g.:The Credential Issuer provides a nonce value in the HTTP response with a 2xx status code in the message body of the HTTP response using the
application/json
media. e.g.:The proof(s) in the
proof
orproofs
parameter of a Credential Request MUST incorporate the Credential Issuer Identifier (audience), and optionally ac_nonce
value generated by the Credential Issuer to allow the Credential Issuer to detect replay. The initialc_nonce
value can be returned in a Nonce Response, or in a Credential Error Response. To validate a key proof, the Credential Issuer MUST ensure among others that if the server had previously provided ac_nonce
, the nonce in the key proof matches the server-providedc_nonce
value.Credential Response can be immediate or deferred and can contain one or more Credentials with the same Credential Configuration and Credential Dataset depending on the Credential Request. Credential response MAY contain a
c_nonce
parameter containing a nonce to be used to create a proof of possession of key material when requesting a Credential. When received, the Wallet MUST use this nonce value for its subsequent Credential Requests until the Credential Issuer provides a fresh nonce.For errors related to the Credential Request's proof of possession, the error code
invalid_proof
is to be used. This error code indicates theproof
orproofs
parameter in the Credential Request is invalid: (1) if both fields are missing, or (2) both are present simultaneously, or (3) one of the provided key proofs is invalid, or (4) if ac_nonce
was previously provided and at least one of the key proofs is not linked to a validc_nonce
value.The Credential Issuer MAY provide the Client with a
c_nonce
in a Credential Error Response usinginvalid_proof
error code if the Credential Issuer Metadata containsproof_types_supported
indicating a key proof is required for the requested Credential. Depending on the Credential Issuer policy, this occurs if they receive a Credential Request without ac_nonce
or with an invalidc_nonce
value included in the proof(s) in the proof or proofs parameter.If the Credential Issuer Metadata contains a
nonce_endpoint
and aproof_types_supported
indicating a key proof is required for the requested Credential and the Client does not have a validc_nonce
, the Client MUST obtain ac_nonce
value from thenonce_endpoint
and send a Credential Request that contains a proof or proofs parameter that includes ac_nonce
value. It is the Credential Issuer policy whether ac_nonce
value is required in the key proofs.If the Client received a
c_nonce
, thec_nonce
value MUST be incorporated in the respective parameter in theproof
orproofs
object in a Credential Request.Notes/Considerations
c_nonce
values to be incorporated in proofs, MUST provide a Nonce Endpoint.c_nonce
value in a Credential Error Response usinginvalid_proof
error code. If noc_nonce
value is provided then the Client must use the Nonce Endpoint to acquire a newc_nonce
value.c_nonce
value in a Credential Response usingc_nonce
andc_nonce_expires_in
parameters.c_nonce
parameter? Is the previousc_nonce
value still active, or does the Client have to use the Nonce Endpoint to verify the validity of thec_nonce
value it currently has?c_nonce
values in each Proof of Possession of theproofs
parameter of a Credential Request? Does a Client have to use the samec_nonce
value for all theproofs
provided in a Credential Request?Overall the introduction of the Nonce Endpoint seems to further complicate interactions with the Credential Issuer. It seems that a Client must always check the Nonce Endpoint to verify whether the
c_nonce
value it has is still valid, before any other interaction with the Credential Issuer. Previously if a Client had to refresh itsc_nonce
value, a Credential Error Response would always contain the refreshedc_nonce
value.