Skip to main content
Developer

JSON Web Key Set (JWKS)#

View as Markdown
On this page

The JWKS endpoint provides the public keys used by DIP for signing ID tokens. Clients use these keys to verify the signature of ID tokens received from the token endpoint.

Endpoint#

GET /jwks

Response#

The endpoint returns a JSON Web Key Set (JWKS) as defined in RFC 7517⁠ (opens in a new tab).

Response Headers#

HeaderValue
Content-Typeapplication/json
Cache-Controlpublic, max-age=86400

Response Body#

{
  "keys": [
    {
      "kty": "EC",
      "use": "sig",
      "kid": "123456789",
      "crv": "P-256",
      "x": "base64url-encoded-x-coordinate",
      "y": "base64url-encoded-y-coordinate",
      "x5c": ["base64-encoded-cert", "..."]
    }
  ]
}

Key Properties#

PropertyDescription
ktyKey type. DIP uses EC (Elliptic Curve) for signing keys.
useKey usage. sig indicates the key is used for signatures.
kidKey ID. The certificate serial number, used to match the key with the kid header in JWTs.
crvCurve name. DIP uses P-256 for ES256 signatures.
xBase64url-encoded x-coordinate of the EC public key.
yBase64url-encoded y-coordinate of the EC public key.
x5cX.509 certificate chain. Contains the signing certificate and its issuing CA certificates.

Usage#

When validating an ID token signature:

  1. 1

    Decode the ID token header to get the kid (key ID)

  2. 2

    Fetch the JWKS from this endpoint

  3. 3

    Find the key with the matching kid

  4. 4

    Use the public key to verify the signature

Notes#

  • DIP uses ES256 (ECDSA with P-256 curve) for signing ID tokens
  • The signing key is separate from the encryption key (clients provide their own RSA key for encryption)
  • Always match keys by kid - do not assume key order or count

Was this page helpful?