PID Presentation¶
This flow describes the PID presentation process as introduced here in the blueprint. The PID presentation flow uses the standards following the High-Assurance Interoperability Profile (HAIP) for OpenID4VP as defined in the blueprint:
The current flow allows both Wallets and Verifiers to only use same-device flows, as the cross-device using OpenID4VP redirect-based flows does not fulfil LoA high requirements. In future iterations, cross-device PID presentations may be supported.
Data Flow¶
This section describes the data flow of the PID presentation in a sequence diagram and a more detailed table. Artifacts in italics are further explained in the data register chapter.
Sequence Diagram¶
Detailed Description¶
No | Description |
---|---|
001 | The user browses to a Relying Party (RP) website using the browser on its Wallet Instance (WI). |
002 | The browser calls the Relying Party website, most likely using one or multiple HTTP GET requests. One of these requests triggers the Relying Party's server to generate the OpenID4VP Authorization Request as described in steps 003-008. |
003 | The RP generates random values for rp_openid4vp_state and rp_key_binding_nonce with sufficient entropy and an ephemeral response encryption key pair (rp_response_enc_prvk, rp_response_enc_pubk) used for additional application-level encryption with response mode direct_post.jwt . |
004 - 005 | The RP creates the OpenID4VP Authorization Request rp_openid4vp_request as a JWT-Secured Authorization Request (JAR) using RFC9101 including:
|
006 | The RP stores rp_openid4vp_request as a Pushed Authorization Request according to RFC9126 under rp_request_uri. |
007 | The RP creates an HTTP session ID cookie rp_cookie_id and binds it to rp_openid4vp_request. |
008 | The RP returns the rp_request_uri and sets the rp_cookie_id (using Set-Cookie HTTP headers). The request is embedded into the HTML code of the website, likely as a button using either the WI's app link or a custom URL scheme such as haip-vp:// for wallet invocation. |
009 - 010 | The user initiates the PID presentation on the RP's website, likely by pushing a button. The WI is launched by the operating system, passing the rp_request_uri as a parameter within the app link/custom URL. |
011 - 012 | The WI requests the rp_request_uri as a Pushed Authorization Request using a HTTP GET call according to RFC9126. The RP responds with the rp_openid4vp_request as a Pushed Authorization Response that corresponds to the rp_request_uri. |
013 | The WI validates the fetched rp_openid4vp_request by:
|
014 | The WI checks that the stored credentials (i.e. the PID and optionally additional credentials) match the requested credentials from rp_dcql_query. If the requested PID is available, the WI selects one pp_pid_credential and the corresponding rwscd_key_id from the batch for further processing. If the PID or other requested credentials are not available, the WI may offer the user an inline issuance to fulfil the presentation request. |
015 | The WI prepares the PID presentation and applies the selective disclosure to pp_pid_credential according to rp_dcql_query:
|
016 | The WI generates wi_key_binding_data:
|
017 | The WI generates the hash wi_key_binding_data_hash from the wi_key_binding_data, as only the hash is passed to the Remote WSCD for signing. |
018 - 019 | The WI displays the relevant information from rp_openid4vp_request to the user:
|
020 - 022 | The WI requests the Remote WSCD Sign operation authenticating with two factor authentication that was established during Remote WSCD registration to sign wi_key_binding_data_hash with the rwscd_pid_device_privk belonging to rwscd_key_id associated to the particular pp_pid_credential. The RWSCD ensures, based on the two factor authentication, that only the account which has created the wscd_pid_device_prvk is allowed to use this key for a single signing operation. The RWSCD then signs the hashed input data wi_key_binding_data_hash ( without knowing the payload) of wi_key_binding_data using rwscd_pid_device_prvk and responds the signature rwscd_key_binding_signature to the WI. If the presentation process was finished successfully and no further re-issuance is required, the cached wi_rwscd_pin_prvk should be flushed, as explained in the PIN caching section. |
023 | The WI assembles the PID presentation wi_pid_presentation from pp_pid_credential, wi_key_binding_data and rwscd_key_binding_signature and embeds it into the vp_token structure:
|
024 - 025 | The WI generates an ephemeral response encryption key pair (wi_response_enc_prvk, wi_response_enc_pubk used for additional application-level encryption with response mode direct_post.jwt . The WI then encrypts wi_pid_presentation using keys derived from Elliptic Curve Diffie-Hellman using wi_response_enc_prvk and rp_response_enc_pubk using JWE. |
026 | The WI creates the wi_openid4vp_response from the encrypted wi_pid_presentation and the unencrypted rp_openid4vp_state. |
027 | The WI deletes the presented pp_pid_credential, as the WI follows a one-time-use policy to enable unlinkability. |
028 | The WI sends the OpenID4VP Authorization Response wi_openid4vp_response as a HTTP POST request to the RP's rp_response_uri. |
029 | The RP matches the OpenID4VP session using rp_openid4vp_state and store the encrypted wi_pid_presentation without validating it yet. The RP must perform a redirect to the WI's browser first to prevent session fixation attacks. |
030 - 031 | The RP therefore creates a unique rp_redirect_uri and binds it to the OpenID4VP session of rp_openid4vp_state and responds to the WI with a HTTP 200 containing the rp_redirect_uri. |
032 - 033 | The WI launches the user device browser with rp_redirect_uri. The browser then makes the HTTP GET request to rp_redirect_uri. As the browser has been in this session before, it provides the rp_cookie_id. |
034 | The RP matches the browser session using the provided rp_cookie_id and can securely map it to the OpenID4VP session bound to rp_redirect_uri. |
035 | The RP decrypts the stored wi_openid4vp_response from Step 029 using keys derived from Elliptic Curve Diffie-Hellman using wi_response_enc_pubk and rp_response_enc_prvk, equivalent to what WI did in Step 025. |
036 - 037 | The RP verifies the contents of the wi_pid_presentation using pp_pid_auth_pubk and rwscd_pid_device_pubk and extracts the selectively disclosed es_eid_data:
|
038 | The RP responds to the WI in the browser session. |