openid-connect-4-vc-issuance | April 2022 | |
Lodderstedt, et al. | Standards Track | [Page] |
This specification defines an API and corresponding OAuth-based authorization mechanisms for issuance of verifiable credentials. This specification can be combined with OpenID Connect to obtain identity assertions along with verifiable credentials.¶
This specification defines an API designated as Credential Endpoint and corresponding OAuth-based authorization mechanisms for issuance of verifiable credentials, e.g., in the form of W3C Verifiable Credentials. This allows existing OAuth deployments and OpenID Connect OPs to extend their service and become credential issuers. It also allows new applications built using Verifiable Credentials to utilize OAuth and OpenID Connect as integration and interoperability layer.¶
OpenID Connect would be an obvious choice for this use case since it already allows Relying Parties to request identity assertions. However, early implementation experience suggests adoption is made easier if the base protocol only focuses on the credential issuance, without mandating certain [OpenID.Core] features, such as asserting a stable sub
values. Thus the working group decided to use OAuth as a base protocol. Deployments can nevertheless provide a combined implementation of OpenID Connect and the Credential Endpoint since OpenID Connect is built on top of OAuth.¶
Verifiable Credentials are very similar to identity assertions in that they allow an Issuer to assert End-User claims. However, in contrast to the identity assertions, a verifiable credential follows a pre-defined schema (the credential type) and is bound to key material allowing the End-User to prove the legitimate possession of the credential. This allows direct presentation of the credential from the End-User to the RP, without involvement of the credential issuer. This specification caters for those differences.¶
Credential¶
A set of one or more claims made by an issuer (see [VC_DATA]). Note that this definition differs from that in [OpenID.Core].¶
Verifiable Credential (VC)¶
A verifiable credential is a tamper-evident credential that has authorship that can be cryptographically verified. Verifiable credentials can be used to build verifiable presentations, which can also be cryptographically verified (see [VC_DATA]).¶
Presentation¶
Data derived from one or more verifiable credentials, issued by one or more issuers, that is shared with a specific verifier (see [VC_DATA]).¶
Verified Presentation (VP)¶
A verifiable presentation is a tamper-evident presentation encoded in such a way that authorship of the data can be trusted after a process of cryptographic verification. Certain types of verifiable presentations might contain data that is synthesized from, but do not contain, the original verifiable credentials (for example, zero-knowledge proofs) (see [VC_DATA]).¶
W3C Verifiable Credential Objects¶
Both verifiable credentials and verifiable presentations¶
Credential Manifests¶
A resource format that defines preconditional requirements, Issuer style preferences, and other facets User Agents utilize to help articulate and select the inputs necessary for processing and issuance of a specified credential (see [DIF.CredentialManifest]).¶
Deferred Credential Issuance¶
Issuance of credentials not directly in the response to a credential issuance request, but following a period of time that can be used to perform certain offline business processes.¶
A user comes across an app where she needs to present a credential, e.g., a bank identity credential. She starts the presentation flow at this app and is sent to her wallet (e.g., via Self-Issued OpenID Provider v2 and OpenID Connect for Verifiable Presentations). The wallet determines the desired credential type(s) from the request and notifies the user that there is currently no matching credential in the wallet. The wallet now offers the user a list of suitable issuers, which might be based on an issuer list curated by the wallet publisher. The user picks one of those issuers and is sent to the issuer's user experience (web site or app). There the user authenticates and is asked for consent to issue the required credential into her wallet. She consents and is sent back to the wallet, where she is informed that a credential was successfully created and stored in the wallet.¶
A user comes across an app where she needs to present a credential, e.g., a university diploma. She starts the presentation flow at this app and is sent to her wallet (e.g., via Self-Issued OpenID Provider v2 and OpenID Connect for Verifiable Presentations). The wallet determines the desired credential type(s) from the request and notifies the user that there is currently no matching credential in the wallet. The wallet now offers the user a list of suitable issuers, which might be based on an issuer list curated by the wallet publisher. The user picks one of those issuers (her university). The user confirms and is sent to the issuer's user experience (web site or app). The user logs in to the university, which determines that the respective user account is not verified yet. The user is offered to either use a video chat for identification or to fetch a suitable identity credential from her wallet. The user decides to fetch the necessary credential from her wallet and is sent back. In the wallet, she picks a suitable credential and authorizes transfer to the university. The wallet sends her back to the university. Based on the bank identity credential, the university verifies her identity and looks up her data in its database. The university finds her diploma and offers to issue a verifiable credential. The user consents and is sent back to the wallet, where she is informed that a diploma verifiable credential was successfully created and stored in the wallet.¶
The user browses her university's home page, searching for a way to obtain a digital diploma. She finds the respective page, which shows a link "request your digital diploma". She clicks on this link and is being sent to her digital wallet. The wallet notifies her that an issuer offered to issue a diploma credential. She confirms this inquiry and is being sent to the university's credential issuance service. She logs in with her university login and is being asked to consent to the creation of a digital diploma. She confirms and is sent back to her wallet. There, she is notified of the successful creation of the digital diploma.¶
The user visits the administration office of her university to obtain a digital diploma. The university staff checks her student card and looks up her university diploma in the university's IT system. The office staff then starts the issuance process. The user is asked to scan a QR Code to retrieve the digital diploma. She scans the code with her smartphone, which automatically starts her wallet, where she is notified of the offer to create a digital diploma (the verifiable credential). She consents, which causes the wallet to obtain and store the verifiable credential.¶
The user navigates to her university's webpage to obtain a digital diploma where she is asked to scan a QR Code to start the retrieval process. She scans the code with her smartphone, which automatically starts her wallet, where she is notified of the prerequisite to enter a PIN code for security reasons. This code was sent as a text message to her smartphone in the meantime. She enters the PIN and confirms the credential issuance, which causes the wallet to obtain and store the verifiable credential.¶
The user wants to obtain a digital criminal record certificate. She starts the journey in her wallet and is sent to the issuer service of the responsible government authority. She logs in with her eID and requests the issuance of the certificate. She is notified that the issuance of the certificate will take a couple of days due to necessary background checks by the authority. She confirms and is sent back to the wallet. The wallet shows a hint in the credential list indicating that issuance of the digital criminal record certificate is under way. A few days later, she receives a notification from her wallet app telling her that the certificate was successfully issued. She opens her wallet, where she is asked after startup whether she wants to download the certificate. She confirms and the new credential is retrieved and stored in her wallet.¶
This section describes the requirements this specification aims to fulfill beyond the use cases described above.¶
Proof of possession of key material¶
It shall be possible to request a single credential as well to request multiple credentials in the same request. Examples of the latter include:¶
It shall be possible to issue multiple credentials based on same consent (e.g., different formats and/or keys - did:key
followed by did:ebsi
)¶
Support for deferred issuance of credentials¶
User authentication and identification¶
Issuer shall be able to dynamically obtain further data and be able to authenticate the user at their discretion¶
Application used by the End-User shall be able to pass existing credentials (as presentations) or identity assertions to the issuance flow¶
Assisted flow (utilizing credential manifest)¶
Presentations/assertions must be protected against replay¶
It shall be possible to request standard OpenID Connect claims and credentials in the same flow (to implement wallet onboarding, see EBSI/ESSIF onboarding)¶
Support for Credential metadata (Application used by the End-User shall be able to determine the types of credentials an issuer is able to issue)¶
Ensure OAuth 2.0 Authorization Server is authoritative for respective credential issuer (OP (OpenID Connect issuer URL) <-> Issuer ID (DID))¶
Incorporate/utilize existing specs¶
This specification defines the following mechanisms to allow wallet applications (acting as OAuth and Credential Issuance API clients) used by the End-User to request credential issuers (acting as OAuth Authorization Servers and Credential Issuance API providers) to issue Verifiable Credentials via the Credential Issuance API:¶
An optional mechanism to pre-obtain a Credential Manifest¶
An extended authorization request syntax that allows to request credential types to be issued¶
Ability to bind an issued credential to a proof submitted by the Client¶
A newly defined Credential Endpoint from which credentials can be issued one at a time¶
A mechanism that allows issuance of multiple credentials of same or different type (c_nonce
)¶
A mechanism for the Deferred Credential Issuance (acceptance_token
)¶
The following figure shows the overall flow.¶
+--------------+ +-----------+ +-------------+ | User | | Wallet | | Issuer | +--------------+ +-----------+ +-------------+ | | interact | |---------------------------------------------------------------------->| | | (1) initiate issuance | | |<-----------------------------------------------------| | interacts | | |--------------->| | | | (2) [opt] obtain credential manifest | | |----------------------------------------------------->| | | credential manifest | | |<-----------------------------------------------------| | | | | | (4) authorization req (claims, [opt] input, etc. ) | | |----------------------------------------------------->| | | | | (4.1) User Login | | | | | | (4.2) [opt] request additional VCs (OIDC4VP) | | |<-----------------------------------------------------| | | | (4.2.1) [opt] User selects credentials | | | | | | (4.2.2) VCs in Verifiable Presentations | | |----------------------------------------------------->| | | | | (4.3) User consents to credential issuance | | | | | | (5) authorization res (code) | | |<-----------------------------------------------------| | | | | | (6) token req (code) | | |----------------------------------------------------->| | | access_token, id_token | | |<-----------------------------------------------------| | | | | | (7) credential req (access_token, proofs, ...) | | |----------------------------------------------------->| | | credential req (credentials OR acceptance_token)| | |<-----------------------------------------------------| | | | | | (8) [opt] poll_credentials (acceptance_token) | | |----------------------------------------------------->| | | credentials OR not_ready_yet | | |<-----------------------------------------------------|
This flow is based on OAuth and the code grant type. Use with other grant types, such as CIBA, will be possible as well.¶
The starting point is an interaction of the user with her wallet. The user might, for example,¶
want to present a credential and found out there is no suitable credential present in her wallet or¶
have visited the web site of a Credential Issuer and wants to obtain a credential from that issuer.¶
(1) (OPTIONAL) The issuer sends a request to the wallet to initiate the issuance flow. This request contains information about the credential(s) the End-User wants to obtain from that issuer, e.g., in the form of credential manifest IDs or credential types, and further data, e.g., hints about the user when the user is already logged in with the Issuer.¶
(2) (OPTIONAL) obtain credential manifest (as defined in [DIF.CredentialManifest]) from the issuer with an information of which Verifiable Credentials the Issuer can issue, and optionally what kind of input from the user the Issuer requires to issue that credential.¶
Note: The wallet MAY also obtain the information about the credential issuer's capabilities using other means, which is out of scope of this specification.¶
(4) In this step, the wallet sends an authorization request to the issuer. This request determines the types of verifiable credentials the wallet (on behalf of the user) wants to obtain.¶
The wallet SHOULD use a pushed authorization request (see [RFC9126]) to first send the payload of
the authorization request to the issuer and subsequently use the request_uri
returned by the issuer in the authorization
request. This ensures integrity and confidentiality of the request data and prevents any issues raised by URL length restrictions
regarding the authorization request URL.¶
Note: Signed and encrypted request objects would also ensure integrity and confidentiality. However, this approach would further increase the URL size, which might decrease robustness of the process.¶
The issuer takes over user interface control at this point and interacts with the user. The implementation of this step is at the discretion of the issuer.¶
(4.1) The issuer will typically authenticate the user in the first step of this process. For this purpose,
the issuer might use a local or federated login, potentially informed by an id_token_hint
(see [OpenID.Core]).¶
(4.2) (OPTIONAL) The issuers MAY call back to the wallet to fetch verifiable credentials it needs as prerequisite to issuing the requested credentials. The decision of what credentials are requested may depend on the user identity determined in step 4.1.¶
From a protocol perspective, the issuers acts now as verifier and sends a request as defined in OpenID Connect for Verifiable Presentations [OIDC4VP] to the wallet.¶
(4.2.1) (CONDITIONAL) The wallet shows the content of the presentation request to the user. The user selects the appropriate credentials and consents.¶
(4.2.2) (CONDITIONAL) The wallet responds with one or more verifiable presentations to the issuer.¶
(4.3) The issuer asks the user for consent to issue the requested credentials.¶
(5) The issuer responds with an authorization code to the wallet.¶
(6) The wallet exchanges the authorization code for an Access Token and an ID Token.¶
(7) This Access Token is used to request the issuance of the actual credentials. The types of credentials the wallet can request is limited to the types approved in the authorization request in (5). The credential request passes the key material the respective credential shall be bound to. If required by the issuer, the wallet also passes a proof of possession for the key material. This proof of possession uses the SHA-256 hash of the Access Token as cryptographic nonce. This ensures replay protection of the proofs. The format of key material and proof of possession depends upon the proof scheme and is expressed in a polymorphic manner at the protocol level.¶
The Issuer will either directly respond with the credentials or issue an Acceptance Token, which is used by the wallet to poll for completion of the issuance process.¶
(8) (OPTIONAL) The wallet polls the issuer to obtain the credentials previously requested in step (6). The issuer either responds with the credentials or HTTP status code "202" indicating that the issuance is not completed yet.¶
Note: If the issuer just wants to offer the user to retrieve a pre-existing credential, it can encode the parameter set of step (6) in a suitable representation and allow the wallet to start with step (6). One option would be to encode the data into a QR Code.¶
This specification defines new endpoints as well as additional parameters to existing OAuth endpoints required to implement the protocol outlined in the previous section. It also introduces a new authorization details type according to [I-D.ietf-oauth-rar] to convey the details about the credentials the wallet wants to obtain. Aspects not defined in this specification are expected to follow [RFC6749]. it is RECOMMENDED to use PKCE as defined in [RFC7636] to prevent authorization code interception attacks.¶
There are the following new endpoints:¶
Issuance Initiation Endpoint: An endpoint exposed by the wallet that allows an issuer to initiate the issuance flow¶
Credential Endpoint: this is the OAuth-protected API to issue verifiable credentials¶
Deferred Credential Endpoint: this endpoint is used for deferred issuance of verifiable credentials¶
The following endpoints are extended:¶
Client Metadata: new metadata parameter is added to allow a wallet (acting as OAuth client) to publish its issuance initiation endpoint.¶
Server Metadata: New metadata parameters are added to allow the client to determine what types of verifiable credentials a particular OAuth 2.0 Authorization Server is able to issue along with additional information about formats and prerequisites.¶
Authorization Endpoint: The authorization_details
parameter is extended to allow clients to specify types of the credentials when requesting authorization for issuance. These extension can also be used via the Pushed Authorization Endpoint, which is recommended by this specification.¶
Token Endpoint: optional parameters are added to the token endpoint to provide the client with a nonce to be used for proof of possession of key material in a subsequent request to the credential endpoint.¶
This specification defines the following new Client Metadata parameter in addition to [RFC7591] for wallets acting as OAuth client:¶
initiate_issuance_endpoint
: OPTIONAL. URL of the issuance initation endpoint of a wallet.¶
If the issuer is unable to perform discovery of the Issuance Initiation Endpoint URL, the following static URL is used: openid_initiate_issuance:
.¶
The server metadata [RFC8414] is extended to allow the client to obtain information about the verifiable credentials an Issuer supports. This extension uses [DIF.CredentialManifest].¶
This specification defines the following new Server Metadata parameter for this purpose:¶
credential_manifests
: OPTIONAL. A JSON array containing a list of Credential Manifests. This parameter enables Issuers to pass Credential Manifests in a single self-contained parameter.¶
credential_manifest_uris
: OPTIONAL. A JSON array containing a list of URIs referencing resources each containing a Credential Manifest. This parameter enables Issuers to list Credential Manifests by reference, rather than by value. The scheme used MUST be https.¶
The following example shows an OpenID Configuration containing an embedded credential manifest.¶
HTTP/1.1 200 OK Content-Type: application/json { "issuer":"https://server.example.com", "authorization_endpoint":"https://server.example.com/connect/authorize", "token_endpoint":"https://server.example.com/connect/token", ... "credential_manifests":[ { "id":"WA-DL-CLASS-A", "version":"0.1.0", "issuer":{ "id":"did:example:123?linked-domains=3", "name":"Washington State Government" }, "output_descriptors":[ { "schema":"http://washington-state-schemas.org/1.0.0/driver-license.json", "id": "output descriptor 1" } ], "presentation_definition":{} } ] }¶
Note: The Client MAY use other mechanisms to obtain information about the verifiable credentials that an Issuer can issue.¶
This endpoint is used by an issuer in case it is already in an interaction with a user that wishes to initate a credential issuance. It is used to pass available information relevant for the credential issuance to ensure a convenient and secure process.¶
The issuer (or any other party wishing to kickstart an issuance into a certain wallet) sends the request as a HTTP GET request or a HTTP redirect to the Issuance Initiation Endpoint URL.¶
The following request parameters are defined:¶
issuer
: REQUIRED. The issuer URL of the credential issuer, the wallet is requested to obtain one or more credentials from.¶
credential_type
: CONDITIONAL. A JSON string denoting the type of the credential the wallet shall request. MUST be present if manifest_id
is not present.¶
manifest_id
: CONDITIONAL. A JSON String refering to a credential manifests published by the credential issuer. MUST be present if credential_type
is not present.¶
op_state
: OPTIONAL. String value created by the Credential Issuer and opaque to the wallet that is used to bind the sub-sequent authentication request with the Credential Issuer to a context set up during previous steps. If the client receives a value for this parameter, it MUST include it in the subsequent Authentication Request to the Credential Issuer as the op_state
parameter value.
¶
The following is a non-normative example:¶
GET /initiate_issuance? issuer=https%3A%2F%2Fserver%2Eexample%2Ecom &credential_type=https%3A%2F%2Fdid%2Eexample%2Eorg%2FhealthCard &op_state=eyJhbGciOiJSU0Et...FYUaBy¶
The issuer MAY also render a QR code containing the request data in order to allow the user to scan the request using her wallet app.¶
The wallet MUST consider the parameter values in the initiation request as not trustworthy since the origin is not authenticated and the message integrity is not protected. The Wallet MUST apply the same checks on the issuer that it would apply when the flow is started from the Wallet itself since the issuer is not trustworthy just because it sent the initiation request. An attacker might attempt to use an initation request to conduct a phishing or injection attack.¶
The wallet MUST NOT accept credentials just because this mechanism was used. All protocol steps defined in this draft MUST be performed in the same way as if the wallet would have started the flow.¶
The wallet MUST be able to process multiple occurences of the URL query parameters credential_type
and/or manifest_id
. Multiple occurences MUST be
treated as multiple values of the respective parameter.¶
The AS MUST ensure the release of any privacy-sensitive data is legally based (e.g., if passing an e-mail address in the login_hint
parameter).¶
The wallet is not supposed to create a response. UX control stays with the wallet after completion of the process.¶
The Token Endpoint issues an Access Token and, optionally, a Refresh Token in exchange for the authorization code that client obtained in a successful Authorization Response. It is used in the same manner as defined in [RFC6749] and follows the recommendations given in [I-D.ietf-oauth-security-topics].¶
Upon receiving a successful Authentication Response, a Token Request is made as defined in Section 4.1.3 of [RFC6749].¶
Below is a non-normative example of a token request:¶
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW grant_type=authorization_code &code=SplxlOBeZQQYbYS6WxSbIA &code_verifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk &redirect_uri=https%3A%2F%2Fwallet.example.org%2Fcb¶
Token Requests are made as defined in [RFC6749].¶
In addition to the response parameters defined in [RFC6749], the AS MAY return the following parameters:¶
c_nonce
: OPTIONAL. JSON string containing a nonce to be used to create a proof of possession of key material when requesting a credential (see Section 6.7.2).¶
c_nonce_expires_in
: OPTIONAL. JSON integer denoting the lifetime in seconds of the c_nonce
.¶
Note: Subject Identifier in the ID Token is the End-User's identifier.¶
Below is a non-normative example of a token response:¶
HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6Ikp..sHQ", "token_type": "bearer", "expires_in": 86400, "c_nonce": "tZignsnFbp", "c_nonce_expires_in": 86400 }¶
If the Token Request is invalid or unauthorized, the Authorization Server constructs the error response as defined as in Section 5.2 of OAuth 2.0 [RFC6749].¶
The following is a non-normative example Token Error Response:¶
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "error": "invalid_request" }¶
The Credential Endpoint issues a credential as approved by the End-User upon presentation of a valid Access Token representing this approval.¶
Communication with the Credential Endpoint MUST utilize TLS.¶
The client can request issuance of a credential of a certain type multiple times, e.g., to associate the credential with different DIDs/public keys or to refresh a certain credential.¶
If the access token is valid for requesting issuance of multiple credentials, it is at the client's discretion to decide the order in which to request issuance of multiple credentials requested in the Authorization Request.¶
Issued credential SHOULD be cryptographically bound to the identifier of the End-User who possesses the credential. Cryptographic binding allows the Verifier to verify during presentation that the End-User presenting a credential is the same End-User to whom it was issued. For non-cryptographic type of binding and credentials issued without any binding, see Implementations Considerations sections {#claim-based-binding} and {#no-binding}.¶
Note that claims in the credential are usually about the End-User who possesses it, but can be about the other entity.¶
For cryptographic binding, the Client has the following options to provide cryptographic binding material for a requested credential as defined in {#credential_request}:¶
Provide proof of control alongside key material (proof
that includes sub_jwk
or did
)¶
Provide only proof of control without the key material (proof
that does not include sub_jwk
or did
)¶
For more details, see {#did-binding} in the Security Considerations Section.¶
A Client makes a Credential Request by sending a HTTP POST request to the Credential Endpoint with the following parameters:¶
type
: REQUIRED. Type of credential being requested. It corresponds to a schema
property in a Credential Manifest obtained in a setup phase.¶
format
: OPTIONAL. Format of the credential to be issued. If not present, the issuer will determine the credential
format based on the client's format default.¶
proof
OPTIONAL. JSON Object containing proof of possession of the key material the issued credential shall be
bound to. The proof
object MUST contain the following proof_type
element which determines its structure:¶
proof_type
: REQUIRED. JSON String denoting the proof type.¶
This specification defines the following values for proof_type
:¶
jwt
: objects of this type contain a single jwt
element with a signed JWT as proof of possession. The JWT MUST contain the following elements:¶
kid
: CONDITIONAL. JWT header containing the key ID. If the credential shall be bound to a DID, the kid
refers to a DID URL which identifies a particular key in the DID Document that the credential shall be bound to.¶
jwk
: CONDITIONAL. JWT header containing the key material the new credential shall be bound to. MUST NOT be present if kid
is present.¶
iss
: REQUIRED. MUST contain the client_id of the sender¶
aud
: REQUIRED. MUST contain the issuer URL of credential issuer¶
iat
: REQUIRED. MUST contain the instant when the proof was created¶
nonce
: REQUIRED. MUST contain a fresh nonce as provided by the issuer¶
The proof
element MUST incorporate a fresh nonce value generated by the credential issuer and the credential issuer's identifier (audience) to allow the credential issuer to detect replay. The way that data is incorporated depends on the proof type. In a JWT, for example, the nonce is conveyd in the nonce
claims whereas the audience is conveyed in the aud
claim. In a Linked Data proof, for example, the nonce is included as the challenge
element in the proof object and the issuer (the intended audience) is included as the domain
element.¶
The Issuer MUST validate that the proof
is actually signed by a key identified in kid
parameter.¶
Below is a non-normative example of a proof
parameter (line breaks for display purposes only):¶
{ "proof_type": "jwt", "jwt": "eyJraWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEva2V5cy8 xIiwiYWxnIjoiRVMyNTYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJzNkJoZFJrcXQzIiwiYXVkIjoiaHR 0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLCJpYXQiOiIyMDE4LTA5LTE0VDIxOjE5OjEwWiIsIm5vbm NlIjoidFppZ25zbkZicCJ9.ewdkIkPV50iOeBUqMXCC_aZKPxgihac0aW9EkL1nOzM" }¶
where the JWT looks like this:¶
{ "alg": "ES256", "typ": "JWT", "kid":"did:example:ebfeb1f712ebc6f1c276e12ec21/keys/1" }. { "iss": "s6BhdRkqt3", "aud": "https://server.example.com", "iat": "2018-09-14T21:19:10Z", "nonce": "tZignsnFbp" }¶
Below is a non-normative example of a credential request:¶
POST /credential HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded Authorization: BEARER czZCaGRSa3F0MzpnWDFmQmF0M2JW type=https%3A%2F%2Fdid%2Eexample%2Eorg%2FhealthCard format=ldp%5Fvc did=did%3Aexample%3Aebfeb1f712ebc6f1c276e12ec21 proof=%7B%22type%22:%22...-ace0-9c5210e16c32%22%7D¶
Credential Response can be Synchronous or Deferred. The Issuer may be able to immediately issue a requested credential and send it to the Client. In other cases, the Issuer may not be able to immediately issue a requested credential and would want to send a token to the Client to be used later to receive a credential when it is ready.¶
The following claims are used in the Credential Response:¶
format
: REQUIRED. JSON string denoting the credential's format¶
credential
: OPTIONAL. JSON string that is the base64url encoded representation of the issued credential. MUST be present when acceptance_token
is not returned.¶
acceptance_token
: OPTIONAL. A JSON string containing a token subsequently used to obtain a credential. MUST be present when credential
is not returned.¶
c_nonce
: OPTIONAL. JSON string containing a nonce to be used to create a proof of possession of key material when requesting a credential (see Section 6.7.2).¶
c_nonce_expires_in
: OPTIONAL. JSON integer denoting the lifetime in seconds of the c_nonce
.¶
Below is a non-normative example of a credential response in a synchronous flow:¶
HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "format": "jwt_vc" "credential" : "LUpixVCWJk0eOt4CXQe1NXK....WZwmhmn9OQp6YxX0a2L", "c_nonce": "fGFF7UkhLa", "c_nonce_expires_in": 86400 }¶
Below is a non-normative example of a credential response in a deferred flow:¶
HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "acceptance_token": "8xLOxBtZp8", "c_nonce": "wlbQc6pCJp", "c_nonce_expires_in": 86400 }¶
Note: Consider using CIBA Ping/Push callback. Another option would be the Client providing client_notification_token
to the Issuer, so that the issuer sends a Credential response upon successfully receiving a Credential request and then no need for the client to bring an acceptance token, the Issuer will send the credential once it is issued in a response that includes client_notification_token
.¶
Upon receiving a Credential Request, the credential issuer MAY require the client to send a proof of possession of the key material it wants a credential to be bound to. This proof MUST incorporate a nonce generated by the credential issuer. The credential issuer will provide the client with a nonce in an error response to any credential request not including such a proof or including an invalid proof.¶
Below is a non-normative example of a Credential Response when the Issuer requires a proof
upon receiving a Credential Request:¶
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "error": "invalid_or_missing_proof" "error_description": "Credential issuer requires proof element in credential request" "c_nonce": "8YE9hCnyV2", "c_nonce_expires_in": 86400 }¶
This endpoint is used to issue a credential previously requested at the credential endpoint in case the Issuer was not able to immediately issue this credential.¶
This is a HTTP POST request, which accepts an acceptance token as only parameter. The acceptance token MUST be sent as access token in the HTTP header as shown in the following example.¶
POST /credential_deferred HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded Authorization: BEARER 8xLOxBtZp8¶
The deferred credential response uses the format
and credential
parameters as defined in Section 6.7.3.¶
Credential not cryptographically bound to the identifier of the End-User possessing it (see Section 6.7.1), should be bound to the End-User possessing the credential based on the claims included in that credential.¶
In claim-based binding, no cryptographic binding material is provided. Instead, the issued credential includes user claims that can be used by the Verifier to verify possession of the credential by requesting presentation of existing forms of physical or digial identification that includes the same claims (e.g., a driver's license or other ID cards in person, or an online ID verification service).¶
Some Issuers might choose issuing bearer credentials without either cryptographic binding nor claim-based binding, because they are meant to be presented without proof of possession.¶
One such use-case is low assurance credentials such as coupons or tickets.¶
Another use-case is when the Issuer uses cryptographic schemes that can provide binding to the End-User possessing that credential without explicit cryptographic material being supplied by the application used by that End-User. For example, in the case of the BBS Signature Scheme, the issued credential itself is a secret and only derivation of a credential is presented to the Verifier. Effectively, credential is bound to the Issuer's signature on the credential, which becomes a shared secret transferred from the Issuer to the End-User.¶
register "urn:ietf:params:oauth:grant-type:pre-authorized_code"¶
We would like to thank David Chadwick, John Bradley, Alen Horvat, Michael B. Jones, and David Waite for their valuable contributions to this specification.¶
Copyright (c) 2022 The OpenID Foundation.¶
The OpenID Foundation (OIDF) grants to any Contributor, developer, implementer, or other interested party a non-exclusive, royalty free, worldwide copyright license to reproduce, prepare derivative works from, distribute, perform and display, this Implementers Draft or Final Specification solely for the purposes of (i) developing specifications, and (ii) implementing Implementers Drafts and Final Specifications based on such documents, provided that attribution be made to the OIDF as the source of the material, but that such attribution does not indicate an endorsement by the OIDF.¶
The technology described in this specification was made available from contributions from various sources, including members of the OpenID Foundation and others. Although the OpenID Foundation has taken steps to help ensure that the technology is available for distribution, it takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this specification or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any independent effort to identify any such rights. The OpenID Foundation and the contributors to this specification make no (and hereby expressly disclaim any) warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to this specification, and the entire risk as to implementing this specification is assumed by the implementer. The OpenID Intellectual Property Rights policy requires contributors to offer a patent promise not to assert certain patent claims against other contributors and against implementers. The OpenID Foundation invites any interested party to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that may cover technology that may be required to practice this specification.¶
[[ To be removed from the final specification ]]¶
-05¶
-04¶
added support for requesting credential authorization with scopes¶
removed support to pass VPs in the authorization request¶
reworked "proof" parameter definition and added "jwt" proof type¶
-03¶
-02¶
Adopted as WG document¶
-01¶
-00¶
initial revision¶