Realm OAuth settings
The realm-wide lists and lifetimes every app works within, which grants, scopes and client methods the realm accepts, and how long each token lives, in one place.
AvailableAPI
Your realm’s OAuth settings decide what every app may use: which grants and client methods the realm accepts, which scopes it offers, which user details it releases, and how long codes and tokens live. An app’s own registration can only narrow these, never widen them. Every new realm starts with safe values, so most realms change only the scopes and, now and then, a lifetime.
Before you begin
Section titled “Before you begin”- Who can do it: a realm administrator (a group holding
RealmOwner);RealmViewercan read every setting but change none. - Where: today this is done through the API (Call the API shows how to get
$CVYUH_SESSION). - First: nothing. Every realm starts with the defaults below.
How it works
Section titled “How it works”The settings are one object, oauth2Settings, in each realm. A setting you never set takes its default, and a read
shows every setting with its default filled in.
curl https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"Change only the fields you send (Call the API shows how to get a session):
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \ -H "Content-Type: application/json" \ -d '{ "accessTokenLifetimeSecs": 600 }'A list you send replaces the realm’s whole list, so read it first and send back every value you want to keep. A map,
such as scopeClaims, is merged key by key.
Limits and defaults
Section titled “Limits and defaults”Every setting’s default is in brackets in the Reference. The ranges:
| Setting | Range |
|---|---|
accessTokenLifetimeSecs | 1 to 86,400 |
idTokenLifetimeSecs | 1 to 3,600 |
refreshTokenLifetimeSecs, refreshTokenIdleSecs | 1 (0 for idle: no idle limit) to 31,536,000 |
refreshTokenRetrySecs | 0 to 60 |
authorizationCodeLifetimeSecs | 1 to 600 |
parLifetimeSecs | 10 to 600 |
consentChallengeLifetimeSecs | 60 to 3,600 |
logoutChallengeLifetimeSecs | 10 to 3,600 |
logoutTokenLifetimeSecs | 1 to 300 |
deviceCodeLifetimeSecs | 10 to 1,800 |
devicePollIntervalSecs, cibaPollIntervalSecs | 1 to 60 |
deviceMissesPerSession, deviceMissesPerAddress, deviceMissesPerRealm | 1 to 10,000 |
cibaLifetimeSecs | 60 to 1,800 |
clientAssertionMaxLifetimeSecs, bootstrapAssertionLifetimeSecs | 1 to 3,600 |
clockSkewSecs | 0 to 300 |
dpopProofMaxAgeSecs | 1 to 300 |
dpopNonceLifetimeSecs | 10 to 3,600 |
maxClients | 1,000; raised by support |
A value outside its range is refused when you save it, naming the setting.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| A scope, grant or method disappeared after a change | A list you sent replaced the realm’s whole list | Read the settings, and send back every value you want to keep |
| A client’s grant or scope is refused though the client lists it | The realm’s list doesn’t hold it | Add it to the realm’s list too |
Saving maxClients or clientIdMetadataDocuments is refused | Those are set by support | Ask support |
Audit record
Section titled “Audit record”Every change to oauth2Settings is a PATCHED or UPDATED record with the values before and after. See it in
Audit → Config, or in Change history.
Good to know
Section titled “Good to know”- A client works within the realm. A grant, scope or client method a client names takes effect only where the realm’s list holds it too.
- Short tokens are the default on purpose. An access token lives five minutes, which bounds how long a revoked user or agent keeps access. Apps stay signed in with refresh tokens instead.
- A realm holds up to 1,000 clients. Raising it is a support matter, not a setting.
- Accepting apps identified by a URL is turned on by support. Once it is, the
cimd…settings are yours.
Reference
Section titled “Reference”Values in brackets are the defaults; times are in seconds.
What the realm accepts
Section titled “What the realm accepts”| Setting | What it does | More |
|---|---|---|
grantTypes (client_credentials, authorization_code, refresh_token) | The grants the token endpoint accepts | Register an app |
tokenEndpointAuthMethods (none, client_secret_basic, client_secret_post, private_key_jwt) | How clients may prove who they are | Client authentication |
tokenEndpointAuthSigningAlgs (ES256, RS256) | The algorithms a client’s signed assertion may use | Client authentication |
clientAssertionMaxLifetimeSecs (300), clockSkewSecs (60) | How far ahead an assertion may expire, and the leeway on its times | Client authentication |
clientSecretRotationGraceSecs (0) | How long a replaced secret keeps working after a rotation | Client authentication |
scopes | The realm’s scopes; a client’s must come from them | Register an app |
authorizationDetailsTypes (none) | The structured permission types the realm accepts, each with its schema | Rich authorization requests |
requireResource (false) | Refuse a token request that names no API | Resource indicators |
requirePushedAuthorizationRequests (false) | Take every sign-in request only as a pushed one | Pushed authorization requests |
maxClients (1000) | The most clients the realm holds; raised by support | Register an app |
Sign-in and consent
Section titled “Sign-in and consent”| Setting | What it does | More |
|---|---|---|
authorizationCodeLifetimeSecs (60) | How long a sign-in’s code may be redeemed, once | Authorization code with PKCE |
consentChallengeLifetimeSecs (600) | How long a browser has to sign in and answer consent | Consent |
rememberConsent (true) | A user who allowed an app isn’t asked again for the same scopes | Consent |
consentSkipAllowed (false) | Let an app marked consentImplied skip the consent page | Consent |
firstPartyAppsAllowed (false) | Let the realm’s own apps sign users in with their own screens | First-party app sign-in |
parLifetimeSecs (60) | How long a pushed request may be used, once | Pushed authorization requests |
deviceCodeLifetimeSecs (600), devicePollIntervalSecs (5) | How long a device’s code lasts, and how often it may ask | Device authorization |
deviceMissesPerSession (5), deviceMissesPerAddress (10) | How many wrong device codes one session or one address may send in 15 minutes | Device authorization |
deviceMissesPerRealm (100) | The level at which the realm records an alert | Device authorization |
acrValues, amrValues (none) | Which chain earns each acr, and which amr each sign-in method adds | Step-up and re-authentication |
logoutChallengeLifetimeSecs (600), logoutTokenLifetimeSecs (120) | How long a user has to confirm a sign-out, and how long a logout notice is valid | Logout |
Tokens
Section titled “Tokens”| Setting | What it does | More |
|---|---|---|
accessTokenLifetimeSecs (300) | How long an access token lives | Access tokens |
idTokenLifetimeSecs (300) | How long an ID token is valid | OpenID Connect sign-in |
refreshTokenGrants (authorization_code, device code) | The grants whose tokens come with a refresh token | Refresh tokens |
refreshTokenLifetimeSecs (86400), refreshTokenIdleSecs (3600) | How long a refresh token lives from sign-in, and unused | Refresh tokens |
refreshTokenRetrySecs (0) | How long a spent refresh token may be presented again, for a client retrying a lost answer | Refresh tokens |
statusListedResources (none) | APIs that check tokens offline: their tokens carry a status list entry | Status lists |
dpopSigningAlgs (ES256, RS256), dpopProofMaxAgeSecs (60) | What a DPoP proof may be signed with, and how old it may be | DPoP |
dpopNonceRequired (true), dpopNonceLifetimeSecs (300) | Whether a proof must carry the realm’s nonce, and how long a nonce lasts | DPoP |
mtls (false) | Serve the realm at mtls.foobar.cvyuh.com, where clients sign in with a certificate | Certificate-bound tokens |
User details
Section titled “User details”| Setting | What it does | More |
|---|---|---|
claims | The user details the realm ever releases | OpenID Connect sign-in |
scopeClaims | The details each scope releases | Choose which details an app receives |
claimAttributes | The user attribute each detail is read from | Name users by your own directory’s attributes |
idTokenScopeClaims (false) | Put the released details in the ID token as well as at userinfo | OpenID Connect sign-in |
Apps that register themselves
Section titled “Apps that register themselves”| Setting | What it does | More |
|---|---|---|
registration (off) | Whether developers may register apps, and how long and how often a registration token may be used | Dynamic registration |
clientIdMetadataDocuments (false) | Accept apps identified by the URL of a document they publish; turned on by support | Client metadata documents |
cimdScopes (openid, profile), cimdResources (none), cimdBlocked (none) | What such apps may be granted, which APIs they may get tokens for, and which are refused | Client metadata documents |
Agents and workloads
Section titled “Agents and workloads”| Setting | What it does | More |
|---|---|---|
bootstrapAssertionLifetimeSecs (300) | How long a one-time bootstrap assertion for an agent’s client lasts | Client authentication |
spiffeTrustDomains (none) | The SPIFFE trust domains whose workload credentials the realm trusts | Client authentication |
clientAttesters (none) | The attesters whose client attestations the realm trusts | Client attestation |
cibaLifetimeSecs (300), cibaPollIntervalSecs (5) | How long an agent’s request for its owner’s approval waits, and how often it may ask | Have an agent ask its owner |
ssfEnabled (false) | Send security events to the receivers that registered a stream | Send signals |
Related
Section titled “Related”- Register an app: what each app sets within these.
- Set how long tokens live: choose lifetimes for your apps.
- Discovery document: what apps read of these settings.