Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix c_nonce language; may fix #331 #365

Merged
merged 19 commits into from
Aug 20, 2024
Merged
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions openid-4-verifiable-credential-issuance-1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ A Client makes a Credential Request to the Credential Endpoint by sending the fo

The `proof_type` parameter is an extension point that enables the use of different types of proofs for different cryptographic schemes.

The `proof` element MUST incorporate the Credential Issuer Identifier (audience), and a `c_nonce` value generated by the Authorization Server or the Credential Issuer to allow the Credential Issuer to detect replay. The way that data is incorporated depends on the key proof type. In a JWT, for example, the `c_nonce` value is conveyed in the `nonce` claim, whereas the audience is conveyed in the `aud` claim. In a Linked Data proof, for example, the `c_nonce` is included as the `challenge` element in the key proof object and the Credential Issuer (the intended audience) is included as the `domain` element.
The `proof` parameter or proofs in the `proofs` parameter MUST incorporate the Credential Issuer Identifier (audience), and optionally a `c_nonce` value generated by the Authorization Server or the Credential Issuer to allow the Credential Issuer to detect replay. The way that data is incorporated depends on the key proof type. In a JWT, for example, the `c_nonce` value is conveyed in the `nonce` claim, whereas the audience is conveyed in the `aud` claim. In a Linked Data proof, for example, the `c_nonce` is included as the `challenge` element in the key proof object and the Credential Issuer (the intended audience) is included as the `domain` element.
awoie marked this conversation as resolved.
Show resolved Hide resolved

The initial `c_nonce` value can be returned in a successful Token Response as defined in (#token-response), or in a Credential Error Response as defined in (#issuer-provided-nonce).

Expand Down Expand Up @@ -929,7 +929,7 @@ To validate a key proof, the Credential Issuer MUST ensure that:
- the header parameter indicates a registered asymmetric digital signature algorithm, `alg` parameter value is not `none`, is supported by the application, and is acceptable per local policy,
- the signature on the key proof verifies with the public key contained in the header parameter,
- the header parameter does not contain a private key,
- the `nonce` claim (or Claim Key 10) matches the server-provided `c_nonce` value, if the server had previously provided a `c_nonce`,
- if the server had previously provided a `c_nonce`, the nonce in the key proof matches the server-provided `c_nonce` value,
Sakurann marked this conversation as resolved.
Show resolved Hide resolved
- the creation time of the JWT, as determined by either the issuance time, or a server managed timestamp via the nonce claim, is within an acceptable window (see (#key-proof-replay)).

These checks may be performed in any order.
Expand Down Expand Up @@ -1021,7 +1021,7 @@ If the Wallet is requesting the issuance of a Credential that is not supported b
* `invalid_credential_request`: The Credential Request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, or is otherwise malformed.
* `unsupported_credential_type`: Requested Credential type is not supported.
* `unsupported_credential_format`: Requested Credential Format is not supported.
* `invalid_proof`: The `proof` or `proofs` parameter in the Credential Request is invalid. For example, because either both fields are missing or both are present simultaneously, or one of the provided key proofs is either invalid or not linked to a nonce provided by the Credential Issuer.
* `invalid_proof`: The `proof` or `proofs` parameter in the Credential Request is invalid: (1) if either both fields are missing, (2) both are present simultaneously, (3) one of the provided key proofs is either invalid or (4) if a `c_nonce` was provided by the Credential Issuer and one of the key proofs is not linked to a previously issued valid `c_nonce` value (refer to (#issuer-provided-nonce)).
awoie marked this conversation as resolved.
Show resolved Hide resolved
* `invalid_encryption_parameters`: This error occurs when the encryption parameters in the Credential Request are either invalid or missing. In the latter case, it indicates that the Credential Issuer requires the Credential Response to be sent encrypted, but the Credential Request does not contain the necessary encryption parameters.
* `credential_request_denied`: The Credential Request has not been accepted by the Credential Issuer.
* `error_description`: OPTIONAL. The `error_description` parameter MUST be a human-readable ASCII [@!USASCII] text, providing any additional information used to assist the Client implementers in understanding the occurred error. The values for the `error_description` parameter MUST NOT include characters outside the set `%x20-21 / %x23-5B / %x5D-7E`.
Expand All @@ -1042,9 +1042,11 @@ Cache-Control: no-store

### Credential Issuer Provided Nonce {#issuer-provided-nonce}

The Credential Issuer that requires the Client to send a key proof of possession of the key material for the Credential to be bound to (`proof`) MAY receive a Credential Request without such a key proof or with an invalid key proof. In such a case, the Credential Issuer MUST provide the Client with a `c_nonce` defined in (#credential-response) in a Credential Error Response using `invalid_proof` error code defined in (#credential-error-response).
The Credential Issuer MAY provide the Client with a `c_nonce` defined in (#credential-response) in a Credential Error Response using `invalid_proof` error code defined in (#credential-error-response) if the Credential Issuer Metadata contains `proof_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 a or with an invalid server-provided `c_nonce` value included in the `proof` or `proofs` parameter.
awoie marked this conversation as resolved.
Show resolved Hide resolved

The `c_nonce` value MUST be incorporated in the respective parameter in the `proof` object.
If the Client has not received a `c_nonce` and the Credential Issuer Metadata contains `proof_types_supported` indicating a key proof is required for the requested Credential, the Client MUST send a Credential Request that contains a `proof` or `proofs` parameter that is fully valid but does not include a server-provided `c_nonce` value. It is the Credential Issuer policy whether or not a `c_nonce` value is required in the key proofs.
awoie marked this conversation as resolved.
Show resolved Hide resolved

If the Client received a `c_nonce`, the `c_nonce` value MUST be incorporated in the respective parameter in the `proof` or `proofs` object.

Below is a non-normative example of a Credential Response when the Credential Issuer is requesting a Wallet to provide in a subsequent Credential Request a key proof that is bound to a `c_nonce`:

Expand Down
Loading