-
Notifications
You must be signed in to change notification settings - Fork 38
Metadata in credential response #721
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
Open
c2bo
wants to merge
4
commits into
main
Choose a base branch
from
421-metadata-in-credentialresponse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−8
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1258,9 +1258,9 @@ A Client makes a Credential Request to the Credential Endpoint by sending the fo | |
| * `credential_configuration_id`: REQUIRED if a `credential_identifiers` parameter was not returned from the Token Response as part of the `authorization_details` parameter. It MUST NOT be used otherwise. String that uniquely identifies one of the keys in the name/value pairs stored in the `credential_configurations_supported` Credential Issuer metadata. The corresponding object in the `credential_configurations_supported` map MUST contain one of the value(s) used in the `scope` parameter in the Authorization Request. When this parameter is used, the `credential_identifier` MUST NOT be present. | ||
| * `proofs`: OPTIONAL. Object providing one or more proof of possessions of the cryptographic key material to which the issued Credential instances will be bound to. The `proofs` parameter contains exactly one parameter named as the proof type in (#proof-types), the value set for this parameter is a non-empty array containing parameters as defined by the corresponding proof type. | ||
| * `credential_response_encryption`: OPTIONAL. Object containing information for encrypting the Credential Response. If this request element is not present, the corresponding credential response returned is not encrypted. | ||
| * `jwk`: REQUIRED. Object containing a single public key as a JWK used for encrypting the Credential Response. | ||
| * `enc`: REQUIRED. JWE [@!RFC7516] `enc` algorithm [@!RFC7518] for encrypting Credential Responses. | ||
| * `zip`: OPTIONAL. JWE [@!RFC7516] `zip` algorithm [@!RFC7518] for compressing Credential Responses prior to encryption. If absent then compression MUST not be used. | ||
| * `jwk`: REQUIRED. Object containing a single public key as a JWK used for encrypting the Credential Response. | ||
| * `enc`: REQUIRED. JWE [@!RFC7516] `enc` algorithm [@!RFC7518] for encrypting Credential Responses. | ||
| * `zip`: OPTIONAL. JWE [@!RFC7516] `zip` algorithm [@!RFC7518] for compressing Credential Responses prior to encryption. If absent then compression MUST not be used. | ||
|
Comment on lines
+1261
to
+1263
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it doesn't easily show on the github diff: this is only a fix for indentation (3->2 spaces) |
||
|
|
||
| See (#identifying_credential) for the summary of the options how requested Credential(s) are identified throughout the Issuance flow. | ||
|
|
||
|
|
@@ -1380,10 +1380,11 @@ If the Credential Response is not encrypted, the media type of the response MUST | |
| The following parameters are used in the JSON-encoded Credential Response body: | ||
|
|
||
| * `credentials`: OPTIONAL. Contains an array of one or more issued Credentials. It MUST NOT be used if the `transaction_id` parameter is present. The elements of the array MUST be objects. The number of elements in the `credentials` array matches the number of keys that the Wallet has provided via the `proofs` parameter of the Credential Request, unless the Issuer decides to issue fewer Credentials. Each key provided by the Wallet is used to bind to, at most, one Credential. This specification defines the following parameters to be used inside this object: | ||
| * `credential`: REQUIRED. Contains one issued Credential. The encoding of the Credential depends on the Credential Format and MAY be a string or an object. Credential Formats expressed as binary data MUST be base64url-encoded and returned as a string. More details are defined in the Credential Format Profiles in (#format-profiles). | ||
| * `credential`: REQUIRED. Contains one issued Credential. The encoding of the Credential depends on the Credential Format and MAY be a string or an object. Credential Formats expressed as binary data MUST be base64url-encoded and returned as a string. More details are defined in the Credential Format Profiles in (#format-profiles). | ||
| * `transaction_id`: OPTIONAL. String identifying a Deferred Issuance transaction. This parameter is contained in the response if the Credential Issuer cannot immediately issue the Credential. The value is subsequently used to obtain the respective Credential with the Deferred Credential Endpoint (see (#deferred-credential-issuance)). It MUST not be used if the `credentials` parameter is present. It MUST be invalidated after the Credential for which it was meant has been obtained by the Wallet. | ||
| * `interval`: REQUIRED if `transaction_id` is present. Contains a positive number that represents the minimum amount of time in seconds that the Wallet SHOULD wait after receiving the response before sending a new request to the Deferred Credential Endpoint. It MUST NOT be used if the `credentials` parameter is present. | ||
| * `notification_id`: OPTIONAL. String identifying one or more Credentials issued in one Credential Response. It MUST be included in the Notification Request as defined in (#notification). It MUST not be used if the `credentials` parameter is not present. | ||
| * `credential_metadata`: OPTIONAL. Object that contains additional metadata specific to the issued Credential(s). The definitions and contained parameters for this Object are identical to the `credential_metadata` parameter as defined in Credential Issuer Metadata (see (#credential-issuer-metadata)). | ||
|
|
||
| Additional Credential Response parameters MAY be defined and used. The Wallet MUST ignore any unrecognized parameters. | ||
|
|
||
|
|
@@ -1819,17 +1820,17 @@ This specification defines the following Credential Issuer Metadata parameters: | |
| * `key_attestations_required`: OPTIONAL. Object that describes the requirement for key attestations as described in (#keyattestation), which the Credential Issuer expects the Wallet to send within the proof(s) of the Credential Request. If the Credential Issuer does not require a key attestation, this parameter MUST NOT be present in the metadata. If both `key_storage` and `user_authentication` parameters are absent, the `key_attestations_required` parameter may be empty, indicating a key attestation is needed without additional constraints. | ||
| * `key_storage`: OPTIONAL. A non-empty array defining values specified in (#keyattestation-apr) accepted by the Credential Issuer. | ||
| * `user_authentication`: OPTIONAL. A non-empty array defining values specified in (#keyattestation-apr) accepted by the Credential Issuer. | ||
| * `credential_metadata`: OPTIONAL. Object containing information relevant to the usage and display of issued Credentials. Credential Format-specific mechanisms can overwrite the information in this object to convey Credential metadata. Format-specific mechanisms, such as SD-JWT VC display metadata are always preferred by the Wallet over the information in this object, which serves as the default fallback. Below is a non-exhaustive list of parameters that MAY be included: | ||
| * `credential_metadata`: OPTIONAL. Object containing information relevant to the usage and display of issued Credentials. Credential Format-specific mechanisms can overwrite the information in this object to convey Credential metadata. Format-specific mechanisms, such as SD-JWT VC display metadata are always preferred by the Wallet over the information in this object, which serves as the default fallback. The Credential Response can also overwrite the information in this object to convey additional metadata specific to a specific Credential issuance flow. Metadata contained in the Credential Response MUST be preferred by the Wallet over other information. Default parameters are defined here, but additional ones MAY be added. See (#display-metadata-considerations) for implementation considerations on credential metadata. Below is a non-exhaustive list of parameters that MAY be included: | ||
| * `display`: OPTIONAL. A non-empty array of objects, where each object contains the display properties of the supported Credential for a certain language. Below is a non-exhaustive list of parameters that MAY be included. | ||
| * `name`: REQUIRED. String value of a display name for the Credential. | ||
| * `locale`: OPTIONAL. String value that identifies the language of this object represented as a language tag taken from values defined in BCP47 [@!RFC5646]. Multiple `display` objects MAY be included for separate languages. There MUST be only one object for each language identifier. | ||
| * `logo`: OPTIONAL. Object with information about the logo of the Credential. The following non-exhaustive set of parameters MAY be included: | ||
| * `uri`: REQUIRED. String value that contains a URI where the Wallet can obtain the logo of the Credential from the Credential Issuer. The Wallet needs to determine the scheme, since the URI value could use the `https:` scheme, the `data:` scheme, etc. | ||
| * `alt_text`: OPTIONAL. String value of the alternative text for the logo image. | ||
| * `uri`: REQUIRED. String value that contains a URI where the Wallet can obtain the logo of the Credential from the Credential Issuer. The Wallet needs to determine the scheme, since the URI value could use the `https:` scheme, the `data:` scheme, etc. | ||
| * `alt_text`: OPTIONAL. String value of the alternative text for the logo image. | ||
| * `description`: OPTIONAL. String value of a description of the Credential. | ||
| * `background_color`: OPTIONAL. String value of a background color of the Credential represented as numerical color values defined in CSS Color Module Level 3 [@!CSS-Color]. | ||
| * `background_image`: OPTIONAL. Object with information about the background image of the Credential. At least the following parameter MUST be included: | ||
| * `uri`: REQUIRED. String value that contains a URI where the Wallet can obtain the background image of the Credential from the Credential Issuer. The Wallet needs to determine the scheme, since the URI value could use the `https:` scheme, the `data:` scheme, etc. | ||
| * `uri`: REQUIRED. String value that contains a URI where the Wallet can obtain the background image of the Credential from the Credential Issuer. The Wallet needs to determine the scheme, since the URI value could use the `https:` scheme, the `data:` scheme, etc. | ||
| * `text_color`: OPTIONAL. String value of a text color of the Credential represented as numerical color values defined in CSS Color Module Level 3 [@!CSS-Color]. | ||
| * `claims`: OPTIONAL. A non-empty array of claims description objects as defined in (#claims-description-issuer-metadata). | ||
|
|
||
|
|
@@ -2016,6 +2017,82 @@ It is up to the Credential Issuer whether to update both the signature and the c | |
|
|
||
| The Credential Issuer determines the number of the Credentials issued in the Credential Response, regardless of number of proofs/keys contained in the `proofs` parameter in the Credential Request. | ||
|
|
||
| ## Credential Metadata {#display-metadata-considerations} | ||
|
|
||
| Credential metadata is provided by the Credential Issuer, but can be conveyed using different mechanisms. Defined mechanisms to provide display metadata are: | ||
|
|
||
| * Credential Issuer metadata may contain credential metadata as defined in (#credential-issuer-parameters) | ||
| * Credential Formats may define their own mechanisms for metadata | ||
| * Credential Response may also contain display metadata as defined in (#credential-response) | ||
|
|
||
| Credential metadata provided via the Credential Issuer metadata should be interpreted as the most generic form of metadata and as a general fallback solution. If defined and present, Credential Format specific metadata data overwrites the values from the Credential Issuer metadata. If present, metadata present in the Credential Response overwrites existing values. | ||
|
|
||
| (#credential-issuer-parameters) defines a set of default Credential metadata parameters, but additional ones can be defined and added by profiles or extensions. Other standardization organizations or ecosystems defining extensions to the Credential metadata parameters SHOULD do so by defining a collision-resistant parameter that contains an Object with all parameters they are defining. | ||
|
|
||
| Below is a non-normative example of how credential metadata present in the Credential Issuer metadata and the Credential Response would be merged: | ||
|
|
||
| Credential Metadata contained in Credential Issuer Metadata: | ||
|
|
||
| ```json | ||
| { | ||
| "display": [ | ||
| { | ||
| "name": "BankCredential", | ||
| "logo": { | ||
| "uri": "https://bank.example.net/public/logo.png", | ||
| "alt_text": "a square logo of a bank" | ||
| }, | ||
| "locale": "en-US", | ||
| "background_color": "#12107c", | ||
| "text_color": "#FFFFFF" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Credential Metadata contained in the Credential Response: | ||
|
|
||
| ```json | ||
| { | ||
| "display": [ | ||
| { | ||
| "logo": { | ||
| "uri": "data:image/png;base64,F00==", | ||
| }, | ||
| "com.example.domain": { | ||
| "some_text": "something_really_important", | ||
| "more_text": "also_really_important" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Resulting (combined) metadata: | ||
|
|
||
| ```json | ||
| { | ||
| "display": [ | ||
| { | ||
| "name": "BankCredential", | ||
| "logo": { | ||
| "uri": "data:image/png;base64,F00==", | ||
| "alt_text": "a square logo of a bank" | ||
| }, | ||
| "locale": "en-US", | ||
| "background_color": "#12107c", | ||
| "text_color": "#FFFFFF", | ||
| "com.example.domain": { | ||
| "some_text": "something_really_important", | ||
| "more_text": "also_really_important" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Note that `com.emvco.dpc.v1` in the above example shows how an extension would be defined and used. | ||
|
|
||
| ## Pre-Final Specifications | ||
|
|
||
| Implementers should be aware that this specification uses several specifications that are not yet final specifications. Those specifications are: | ||
|
|
@@ -3674,3 +3751,4 @@ The technology described in this specification was made available from contribut | |
| * add interactive_authorization_endpoint to AS metadata section | ||
| * add URNs for IAE type identifiers | ||
| * add iana registration for an openid foundation urn | ||
| * add optional metadata to the credential response | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no mechanism to request an issuer signature of the response equivalent to the jwt response of the issuer metadata.