Skip to content
Workforce IdentityMarkdown

Hold a client to FAPI 2.0

Hold a client to the FAPI 2.0 security profile with one setting, for banking, health and other high-value data.

APIFAPI 2.0 Security Profile

Clients that handle money, health records or regulated data, and ecosystems that require FAPI 2.0, need every one of its rules, not most of them. One setting holds a client to the whole profile: the realm refuses a registration that can’t meet it, and enforces it on every request. Users see nothing different from any sign-in.

RuleWhat it means for the client
Pushed requests onlyEvery sign-in request is first sent to /oauth2/par
Bound tokens onlyEvery token request carries a DPoP proof
private_key_jwt onlyNo secret, and never a public client
ES256 or PS256Never RS256: for assertions, request objects, ID tokens, userinfo and introspection answers
One minuteClock tolerance, and how long a code lives

Before you start:

  • Who can do it: a realm administrator, in a group that holds RealmOwner (Delegated administration). RealmViewer can read the settings but not change them.
  • Where: today this is done through the API; Call the API shows how to get $CVYUH_SESSION.
  • First: have the client’s public key, its redirect address, and the API it calls.
  1. Register it under the profile:

    Terminal window
    curl 'https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client?id=payments-app' \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "status": "active",
    "clientName": "Payments",
    "securityProfile": "fapi2",
    "tokenEndpointAuthMethod": "private_key_jwt",
    "tokenEndpointAuthSigningAlg": "ES256",
    "jwks": { "keys": [
    { "kty": "EC", "crv": "P-256", "kid": "pay-1", "x": "…", "y": "…" }
    ] },
    "grantTypes": ["authorization_code", "refresh_token"],
    "redirectUris": ["https://pay.example.com/callback"],
    "scopes": ["openid", "payments:initiate"],
    "defaultScopes": ["openid"],
    "allowedResources": ["https://pay.example.com/api"],
    "defaultAudience": "https://pay.example.com/api" }'
  2. You need not set requirePushedAuthorizationRequests or dpopBoundAccessTokens: the profile forces both on.

A secret, none, attestation (attest_jwt_client_auth), refreshTokenRotation: rotate, or RS256 in any signing-algorithm field is refused when you write the client.

  • A sign-in request that isn’t pushed is refused before anything in it is read.
  • A token request without a proof is refused.
  • The client’s ID tokens are signed ES256 unless it asks for PS256.
  • Each token’s TOKEN_ISSUED record names the key it is bound to, in bound.
SymptomCauseFix
Registering the client is refusedIt names a secret, none, attestation, rotate, or RS256 somewhereRemove the value the refusal names
Sign-ins fail at /oauth2/authorizeThe app sends its request in the address barPush it to /oauth2/par first
Token requests fail after a minuteThe code lives a minute under the profileRedeem the code at once
Assertions are refused now and thenA clock more than a minute offKeep the client’s clock in sync

PATCH the client with { "securityProfile": null }. The client keeps the settings you gave it, and is held only to them.