Skip to content
Workforce IdentityMarkdown

Security profiles

One client setting holds a client to a named set of rules, OAuth 2.1 or the stricter FAPI 2.0 for high-value data.

AvailableAPIOAuth 2.1, FAPI 2.0 Security Profile

Instead of setting a dozen options one by one, you name a profile for the client. The realm refuses a registration that can never meet it, and holds the client to it on every request.

Choose fapi2 for clients handling money, health records or anything regulated, and wherever an ecosystem asks for FAPI 2.0. Choose oauth2.1 when you want the client’s registration to say what it relies on. An agent’s client is fapi2 unless you name another profile.

  • Who can do it: a realm administrator (a group holding RealmOwner); RealmViewer can read a client’s profile but not change it.
  • Where: today this is done through the API (Call the API shows how to get $CVYUH_SESSION).
  • First: for fapi2, the client holds a P-256 key for private_key_jwt and can sign DPoP proofs.
ProfileWhat it holds the client to
none (default for a user’s app)The realm’s own rules, which already meet OAuth 2.1
oauth2.1The same. The realm already requires PKCE, exact return addresses and rotation for public apps, and has no implicit or password grant. Choose it to state that you rely on that
fapi2 (default for an agent’s app, unless it authenticates by attestation, when oauth2.1 is)Everything above, plus the rules below

A fapi2 client is held to FAPI 2.0:

  • It authenticates with private_key_jwt and is DPoP-bound. It never holds a secret, is never a public app, and never authenticates by attestation. Every token request carries a DPoP proof, and every token it gets is bound to the proof’s key. FAPI 2.0 also allows mutual-TLS client authentication and certificate-bound tokens; a fapi2 client isn’t offered them.
  • Sign-in requests must be pushed first.
  • No RS256, anywhere. Every algorithm the client names is ES256 or PS256: tokenEndpointAuthSigningAlg, idTokenSignedResponseAlg, userinfoSignedResponseAlg and requestObjectSigningAlg alike.
  • Its assertions may use only those of the realm’s tokenEndpointAuthSigningAlgs that are ES256 or PS256. The realm’s default list is ES256 and RS256, so by default a fapi2 client signs its assertions with ES256 alone. Add PS256 to the realm’s list for clients that sign with it.
  • Its ID tokens are signed ES256 unless it asks for PS256, and so are its signed introspection answers.
  • Its refresh tokens are not rotated: refreshTokenRotation: rotate is refused.
  • A minute at most, both for clock tolerance on its assertions and for how long its sign-in code lives.

Name the profile when you register the client (see Call the API):

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"]
}'

You don’t set requirePushedAuthorizationRequests or dpopBoundAccessTokens: the profile forces both on.

WhereSettingWhat it does
ClientsecurityProfilenone, oauth2.1 or fapi2. Left out, an agent’s app is written fapi2, or oauth2.1 when it authenticates by attestation, and any other app is none
RealmtokenEndpointAuthSigningAlgsThe algorithms any client’s assertions may use (ES256, RS256 by default). A fapi2 client uses only the ES256 and PS256 among them
Setting or limitDefaultRange
securityProfilenone; fapi2 for an agent’s client, oauth2.1 for an attesting agent’snone, oauth2.1, fapi2
fapi2 clock tolerance and sign-in code lifeat most 60 secondsfixed
fapi2 signing algorithmsES256, PS256fixed
SymptomCauseFix
Saving a fapi2 client is refused with a reasonA field the profile forbids (see Errors below)Change the field the reason names
A fapi2 app’s sign-in fails at onceIt sends its sign-in request through the browser, not pushedPush it first (Pushed authorization requests)
invalid_dpop_proof from a fapi2 clientNo DPoP proof on the token requestSend a proof on every token request

The profile is part of the client: setting or changing it is a change in Audit → Config. A request refused for breaking the profile is a TOKEN_ISSUED record with result FAILED.

  • An agent’s app keeps a profile it names. One that must take plain bearer tokens names none.
  • No EdDSA yet. FAPI 2.0 also allows EdDSA signatures; the realm doesn’t offer them. They are planned: Ed25519 signing.
  • Requests are held to the profile, not only the registration. A fapi2 client’s sign-in request that wasn’t pushed is refused, and so is a token request without a DPoP proof (invalid_dpop_proof).

A client that can never meet fapi2 is refused when you write it (400), with the reason:

ReasonWhen
a fapi2 client takes no attestation as client authentication; an attesting agent's client is oauth2.1tokenEndpointAuthMethod is attest_jwt_client_auth
a fapi2 client authenticates with private_key_jwt onlytokenEndpointAuthMethod is a secret method or none
a fapi2 client's refresh tokens are not rotated (refreshTokenRotation: rotate)refreshTokenRotation is rotate
a fapi2 client signs only with ES256 or PS256 (<field> is RS256)Any …SigningAlg or …SignedResponseAlg field names RS256