Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space PDOIDC and version master

...

...

...

Signed Tokens

Following well established OpenID Connect standards, BankID signs all Tokens issued:

Asymmetric keys are used for signing according to details described in Jwk. OIDC Clients must validate signatures as part of token validation to is exposed in the JWKs endpoint. These keys may change, so make sure you keep them up-to-date (every 24 hours).

You must validate signatures and compare with the published root certificate as part of token validation to ensure that tokens are not tampered with after being issued by the OIDC Provider from BankID. The same applies for validation of responses for the TINFO resource server.

Keys used for signing are marked with 

...

In addition, this way you can always guarantee that the origin of the Tokens are in fact BankID, and not a potential "man-in-the-middle" actor.

These steps are required to securely validate a JWS Token (like ID Token) from BankID:

  1. Retrieve all JWK entries with "use": "sig"

...

Verification

...

  1. that BankID exposes from the JWKs endpoint.
  2. Find the key used to sign the JWS Token by extracting the kid value of the JWS Header.
  3. Match the kid value with the JWK entries from step 1. and extract the public key value and certificate chain (x5c).
  4. Validate the origin of the key by verifying it's complete certificate chain (x5c) with our published root certificate.
  5. Validate the JWS token using the key.
    1. Using a secure and community provided library to validate JWS tokens is highly recommended.

Signed Authorization Requests

BankID OIDC can support signing incoming Authorization Requests:

  • request authorize parameter
  • private_key_jwt client_assertion object

To support this validation, a jwks_uri must be registered for the given oidc client, such that BankID OIDC provider merchant (OIDC Client), so BankID can retrieve validation keys. 

...

Contact us for more information.

Encrypted Authorization Requests 

Warning

Encryption of parameters containing personal information may be mandatory in the future.

The OIDC provider from BankID supports decryption of the following element(s)encryption of incoming Authorization Requests through:

This login_hint encryption is a BankID OIDC proprietary functionality. Encryption of the request parameter, which was introduced later, is sufficient since the login_hint may be placed inside a request parameter. The login_hint encryption is therefore deprecated.

Asymmetric keys are used for encryption according to details described in Jwk. OIDC Clients may encrypt the value of the login_hint to ensure that personal information is not leaking in the user agent history. 

Remark that the encryption keys for login_hint are published through the BankID OIDC specific jwks_uri_enc while encryption keys for the request parameter are publish through the OIDC standard jwks_uri.  

Warning

Using an encrypted request parameter makes the initial authorize request to BankID OIDC confidential. Later in the internal redirect flow between BankID OIDC components, values from the request object may be shown in cleartext. See known issues (C12).

Keys used for encryption are can be useful in order to ensure personal information (for example through login_hint) is not leaked in the browser history or URL.

The login_hint encryption is deprecated as it is being replaced by the standard encrypted request parameter.

Asymmetric Keys used for encryption in JWKs are all marked with

Code Block
"use":"enc".

...

login_hintrequest parameter
AlgEncAlgEnc
ECDH-ESA128GCMRSA1_5See openid-configuration document
RSA-OAEPA128CBC-HS256RSA-OAEPSee openid-configuration document
RSA-OAEP-256A128CBC-HS256RSA-OAEP-256See openid-configuration document

...