Skip to main content
Developer

Authentication#

View as Markdown
On this page

DIP requires client authentication using signed JWTs, compliant with the FAPI 2.0 Security Profile.

Overview#

All requests to the PAR and Token endpoints must include:

  1. 1

    Client Assertion - A signed JWT authenticating your client

  2. 2

    Client Assertion Type - Set to urn:ietf:params:oauth:client-assertion-type:jwt-bearer

Supported Algorithms#

DIP supports the following signing algorithms (FAPI 2.0 compliant):

AlgorithmKey TypeDescription
ES256EC (P-256)ECDSA using P-256 and SHA-256
PS256RSARSASSA-PSS using SHA-256
EdDSAOKP (Ed25519)Edwards-curve Digital Signature Algorithm

Client Assertion JWT#

The client assertion authenticates your client to DIP.

The JWT header must contain alg and kid. The typ claim is optional but must be JWT if present.

ClaimRequiredDescription
algYesAlgorithm (ES256, PS256, or EdDSA)
kidYesKey ID matching your registered JWKS
typNoIf present, must be JWT

Example Header:

{
  "alg": "ES256",
  "kid": "my-signing-key-1",
  "typ": "JWT"
}

Payload#

The JWT payload must contain these required claims:

ClaimRequiredDescription
issYesIssuer - must be your client_id
subYesSubject - must be your client_id
audYesAudience - DIP base URL
expYesExpiration time (Unix timestamp)

The following optional claims are also allowed:

ClaimDescription
iatIssued at time (Unix timestamp)
jtiUnique JWT identifier
nbfNot before time (Unix timestamp)

Example Payload:

{
  "iss": "dip_aci_your_client_id",
  "sub": "dip_aci_your_client_id",
  "aud": "https://{dip-base-url}",
  "exp": 1759835872
}

JWKS Registration#

Your public key must be registered with DIP in JWKS format.

JWKS Format#

{
  "keys": [
    {
      "kty": "EC",
      "crv": "P-256",
      "alg": "ES256",
      "use": "sig",
      "kid": "my-signing-key-1",
      "x": "MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4",
      "y": "4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM"
    }
  ]
}

Required JWK Fields#

FieldRequiredDescription
ktyYesKey type (EC, RSA, or OKP)
algYesAlgorithm (ES256, PS256, or EdDSA)
useYesMust be sig
kidYesUnique key identifier

EC Key (P-256) Fields#

FieldDescription
crvCurve name (P-256)
xX coordinate (Base64url)
yY coordinate (Base64url)

RSA Key Fields#

FieldDescription
nModulus (Base64url)
eExponent (Base64url)

OKP Key (Ed25519) Fields#

FieldDescription
crvCurve name (Ed25519)
xPublic key (Base64url)

Key Rotation#

DIP fetches your public keys from the JWKS URI registered for your client. To rotate keys:

  1. 1

    Generate a new keypair

  2. 2

    Add the new public key to your JWKS endpoint

  3. 3

    Start using the new key (reference via kid)

  4. 4

    After a transition period, remove the old key from your JWKS endpoint

Was this page helpful?