Skip to main content

Configuration Options

This reference covers the settings you make per realm, through the Admin Console or the Admin API. Server-wide settings are environment variables. The SDKs are client libraries for signing users in; they do not change realm settings.

The admin API rejects a field it does not know with 400, so use the names below exactly. The full list of fields for each endpoint is in the server's own OpenAPI reference at /api.


Quick Reference by Category​

CategoryDescriptionKey Options
RealmsTop-level tenant settingsname, displayName, enabled
SecuritySign-in and registrationregistrationAllowed, mfaRequired, webAuthnEnabled
ThemesUI customizationloginTheme, accountTheme, emailTheme
EmailSMTP and email providerssmtpHost, smtpPort, smtpFrom, emailProvider
SessionsSession managementrefreshTokenLifespan, maxSessionsPerUser
ClientsOAuth client settingsclientId, clientType, redirectUris, grantTypes
Password PolicyPassword requirementspasswordMinLength, passwordRequireDigits
MFAMulti-factor authenticationmfaRequired, smsMfaEnabled
Brute ForceLogin attack protectionbruteForceEnabled, maxLoginFailures, lockoutDuration
EventsAudit loggingeventsEnabled, adminEventsEnabled

Realm Configuration​

Realms are top-level tenants in Idenplane, each with isolated user pools, clients, and configuration.

Core Realm Settings​

OptionTypeDefaultDescription
namestring—Unique realm name, used in URLs. Set at creation; it cannot be changed
displayNamestring—Human-readable name shown in UI
enabledbooleantrueWhether the realm is active
defaultLocalestringenDefault locale of the hosted pages
supportedLocalesstring[]["en"]Locales the hosted pages offer

API Endpoints​

GET /admin/realms/{realm}
POST /admin/realms
PUT /admin/realms/{realm} # partial update, same as PATCH
PATCH /admin/realms/{realm}
DELETE /admin/realms/{realm}
GET /admin/realms/{realm}/export
POST /admin/realms/import

See Realms API.


Security Configuration​

Sign-in and Registration​

OptionTypeDefaultDescription
registrationAllowedbooleantrueSelf-registration on the hosted pages. It is on for a new realm: turn it off if users should not sign themselves up
captchaEnabledbooleanfalseRequire a CAPTCHA (reCAPTCHA v3 or hCaptcha) for self-registration; see Self-Registration and CAPTCHA
magicLinkEnabledbooleanfalsePasswordless sign-in by e-mailed link
webAuthnEnabledbooleanfalsePasskeys (WebAuthn)
impersonationEnabledbooleanfalseLet admins impersonate users
impersonationMaxDurationinteger1800Longest impersonation session, in seconds
bruteForceEnabledbooleantrue for new realmsTemporary account lockout after repeated failed sign-ins. See Brute Force Protection.

Theme Configuration​

Theme Settings​

OptionTypeDefaultDescription
loginThemestringidenplaneTheme for the login, registration and password-reset pages
accountThemestringidenplaneTheme for the account pages
emailThemestringidenplaneTheme for e-mails
themeNamestring—Theme preset
themeobject—Color overrides

The built-in themes are idenplane and midnight. Their templates are Handlebars (.hbs) files under themes/<name>/login, account and email.

Custom Themes​

Build a theme through the theme API (the console's visual Theme Builder is not finished and is hidden unless the console is built with VITE_THEME_BUILDER=true):

GET /admin/realms/{realm}/themes
POST /admin/realms/{realm}/themes
PUT /admin/realms/{realm}/themes/{id}
DELETE /admin/realms/{realm}/themes/{id}

See Custom Themes.


Email Configuration​

SMTP Settings​

OptionTypeDefaultDescription
smtpHoststring—SMTP server hostname
smtpPortinteger587SMTP port
smtpSecurebooleanfalseImplicit TLS (port 465). With false, STARTTLS is used when the server offers it
smtpUserstring—SMTP username
smtpPasswordstring—SMTP password (encrypted at rest)
smtpFromstring—Sender address
emailProviderstringsmtpsmtp, resend, sendgrid, mailgun or postmark
emailProviderConfigobject—The chosen API provider's settings

Test Email Configuration​

curl -X POST http://localhost:3000/admin/realms/{realm}/email/test \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com"
}'

POST /admin/realms/{realm}/smtp/test sends a test message to the realm's own sender address. Both answer 200 only when the provider accepted the message; otherwise 400 (no usable settings, bad address) or 502 (the provider refused it or could not be reached), with the reason in message.


Session Configuration​

Session Timeouts​

These are the realm settings that bound a session. All values are seconds.

OptionTypeDefaultDescription
accessTokenLifespaninteger300Access token lifetime
refreshTokenLifespaninteger1800Refresh token lifetime. Also the lifetime of the OAuth session it belongs to: refreshing does not extend the session.
offlineTokenLifespaninteger2592000Lifetime of an offline session: one created with offline_access. It is counted from sign-in, and each rotated offline token is valid until then. Refreshing does not extend it, and there is no separate offline idle timeout.
maxSessionsPerUserinteger10Sessions per user; the oldest is ended when a new one would go over. Offline sessions don't count and are never ended by it (since 0.12.0). 0 means no limit.
ssoSessionIdleTimeoutinteger0 (off)Idle timeout, since 0.12.0 (Keycloak's setting of the same name). A browser SSO session not used for this long ends, and a normal refresh token not used for this long expires. 0 turns it off; otherwise at least 60. Offline sessions are not affected. See Idle timeout.

A session ends at its expiry: the refresh grant and token introspection refuse a refresh token whose session has expired, and an hourly job deletes expired sessions. Before 0.11.0 an offline session got the refreshTokenLifespan expiry, so offline tokens stopped working after about an hour.

The hosted-login SSO cookie lasts for the browser session, or 30 days with "remember me".

Idle timeout​

ssoSessionIdleTimeout ends a session that is not used for that many seconds, before its maximum lifetime (refreshTokenLifespan):

  • Browser SSO session (the IDENPLANE_SESSION cookie). Using it means an authorization request that reads the cookie (sign-in to an app, silent SSO, SAML), or a hosted page such as the account console. A session not used for longer than the timeout is refused and deleted; the user signs in again. Idle sessions are not listed or counted as active, and the hourly clean-up deletes them.
  • OAuth session (refresh tokens). Each normal refresh token is issued for at most the timeout, so a client that does not refresh within it has to sign the user in again. Every refresh issues a new token with a new window. Since 0.13.0 the hourly clean-up deletes a session whose refresh tokens have all expired this way (before, it stayed listed until its maximum lifetime) and sends the clients it was used with a back-channel logout token.
  • Offline sessions (offline_access) are not affected: they live for offlineTokenLifespan.

Default: off (0), for new and upgraded realms. With the default refreshTokenLifespan of 30 minutes an idle timeout adds little; it matters once you raise the maximum lifetime, for example an 8 or 10 hour working-day session with a 30-minute idle timeout (refreshTokenLifespan: 36000, ssoSessionIdleTimeout: 1800, Keycloak's defaults). It is off by default so that upgrading never signs anyone out.

Choosing a value. Make it longer than accessTokenLifespan. A client that refreshes only when its access token has expired is otherwise signed out between two refreshes.

Precision. The last use of a browser session is written at most once a minute (more often for a timeout under 4 minutes), so a session can end up to a minute before the exact timeout, never after it. Activity is recorded even while the timeout is off, so turning it on judges each session by its real last use. Sessions that existed when you upgraded to 0.12.0 count as used at the upgrade.

Changing the value. A browser session is judged by the current value at each use. A refresh token keeps the expiry it was issued with, so a new value applies to an OAuth session from its next refresh.

API Endpoints​

GET /admin/realms/{realm}
PATCH /admin/realms/{realm}
GET /admin/realms/{realm}/sessions
GET /admin/realms/{realm}/users/{userId}/sessions

All lifetimes are integers in seconds.


Client Configuration​

Client Settings​

OptionTypeDefaultDescription
clientIdstring—Unique client identifier (required)
namestring—Human-readable client name
descriptionstring—Client description
enabledbooleantrueClient is active
clientTypestringCONFIDENTIALCONFIDENTIAL or PUBLIC (no secret; PKCE required)
publicClientboolean—Shorthand for clientType: "PUBLIC"
requireConsentbooleanfalseRequire explicit consent
redirectUrisstring[]—Allowed redirect URIs
postLogoutRedirectUrisstring[]—Allowed post_logout_redirect_uri values; falls back to redirectUris when empty
webOriginsstring[]—Allowed CORS origins (* is refused)
grantTypesstring[]["authorization_code"]Allowed grants: authorization_code, refresh_token, client_credentials, password, urn:ietf:params:oauth:grant-type:device_code
tokenEndpointAuthMethodstring—client_secret_basic, client_secret_post, tls_client_auth, self_signed_tls_client_auth or none
backchannelLogoutUristring—OIDC back-channel logout URL
requiredAcrstring—Minimum ACR for this client

The secret of a confidential client is generated by the server and shown once, in the create response and when you regenerate it. Token lifetimes are realm settings.

API Endpoints​

GET /admin/realms/{realm}/clients
POST /admin/realms/{realm}/clients
GET /admin/realms/{realm}/clients/{id}
PUT /admin/realms/{realm}/clients/{id} # partial update, same as PATCH
DELETE /admin/realms/{realm}/clients/{id}
POST /admin/realms/{realm}/clients/{id}/regenerate-secret

Create a Client​

curl -X POST http://localhost:3000/admin/realms/{realm}/clients \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"clientId": "my-app",
"name": "My Application",
"description": "My application using Idenplane",
"clientType": "CONFIDENTIAL",
"redirectUris": ["http://localhost:3000/callback"],
"webOrigins": ["http://localhost:3000"],
"grantTypes": ["authorization_code", "refresh_token", "client_credentials"]
}'

See Clients API.


Password Policy​

The password policy is a set of realm fields. Passwords are hashed with Argon2id.

OptionTypeDefaultDescription
passwordMinLengthinteger8Minimum password length
passwordRequireUppercasebooleanfalseAt least one uppercase letter
passwordRequireLowercasebooleanfalseAt least one lowercase letter
passwordRequireDigitsbooleanfalseAt least one digit
passwordRequireSpecialCharsbooleanfalseAt least one special character
passwordHistoryCountinteger0Recent passwords that cannot be reused; the current one always counts, an imported one included
passwordMaxAgeDaysinteger0Days until a password expires; 0 never
curl -X PATCH http://localhost:3000/admin/realms/{realm} \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"passwordMinLength": 12,
"passwordRequireDigits": true,
"passwordRequireUppercase": true,
"passwordRequireSpecialChars": true
}'

MFA Configuration​

OptionTypeDefaultDescription
mfaRequiredbooleanfalseEvery user must have a second factor; users without one enrol at sign-in
smsMfaEnabledbooleanfalseText-message codes as a second factor (needs an SMS provider)
otpLengthinteger6Length of texted codes
otpExpirySecondsinteger300Lifetime of a texted code

Authenticator-app (TOTP) codes are fixed at SHA-1, 6 digits and a 30-second step; they are not configurable. Users get 10 one-time recovery codes with their first factor. See the MFA guide.

API Endpoints​

GET /admin/realms/{realm}/users/{userId}/mfa/status
DELETE /admin/realms/{realm}/users/{userId}/mfa # all factors (asks for admin MFA step-up)
DELETE /admin/realms/{realm}/users/{userId}/mfa/totp
DELETE /admin/realms/{realm}/users/{userId}/mfa/sms
PUT /admin/realms/{realm}/users/{userId}/reset-password

Brute Force Protection​

Brute-force protection locks an account for a while after repeated failed sign-ins. It is on for realms created since 0.10.0; realms created earlier keep their setting. The trade-offs behind the defaults are explained in Secure defaults.

Protection Settings​

OptionTypeDefault (new realms)Description
bruteForceEnabledbooleantrueTurn the lockout on or off
maxLoginFailuresinteger10Failures within failureResetTime that lock the account
failureResetTimeinteger900Window, in seconds, in which failures are counted
lockoutDurationinteger300How long, in seconds, the account stays locked
permanentLockoutAfterinteger0Lockouts after which the account is disabled for good. 0 = never. Anyone who knows a username can trigger it, so leave it at 0 unless you accept that.

Lockout Behavior​

  1. When maxLoginFailures failures fall within failureResetTime, the account is locked for lockoutDuration.
  2. While it is locked, sign-in is refused before the password is checked, with the same answer for a right and a wrong password.
  3. The lock ends by itself. Failures stay counted for the rest of the window, so a wrong password right after the lock locks it again (progressive lockout).
  4. A successful sign-in clears the failures.

API Endpoints​

PATCH /admin/realms/{realm} # change the settings
GET /admin/realms/{realm}/brute-force/locked-users # list locked users
POST /admin/realms/{realm}/brute-force/users/{userId}/unlock # unlock (asks for MFA step-up)

Event Configuration​

OptionTypeDefaultDescription
eventsEnabledbooleantrue for new realmsRecord sign-in events (realms created before 0.10.0 keep their setting)
adminEventsEnabledbooleantrueRecord admin changes
loginEventRetentionDaysinteger30Days sign-in events are kept
adminEventRetentionDaysinteger90Days admin events are kept

Recorded sign-in events include LOGIN, LOGIN_ERROR, LOGOUT, REGISTER, REFRESH_TOKEN, CODE_TO_TOKEN, CLIENT_LOGIN and the MFA events. Each can also go to a webhook.

API Endpoints​

GET /admin/realms/{realm}/events
GET /admin/realms/{realm}/events/login/export
GET /admin/realms/{realm}/admin-events
GET /admin/realms/{realm}/events/admin/export

Client Scopes​

Standard Scopes​

ScopeClaims
openidsub
profilename, family_name, given_name, preferred_username, updated_at
emailemail, email_verified
rolesrealm_access, resource_access
offline_accessnone; requests an offline refresh token

Client Scope Management​

# Get all client scopes
curl http://localhost:3000/admin/realms/{realm}/client-scopes \
-H "Authorization: Bearer $TOKEN"

Scope-to-Client Assignment​

GET /admin/realms/{realm}/clients/{clientId}/default-client-scopes
POST /admin/realms/{realm}/clients/{clientId}/default-client-scopes # scope in the body
DELETE /admin/realms/{realm}/clients/{clientId}/default-client-scopes/{scopeId}

Role Configuration​

Idenplane creates no default roles in a realm. A role has a name and a description; there are no composite roles.

# Create realm role
curl -X POST http://localhost:3000/admin/realms/{realm}/roles \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "admin",
"description": "Administrator role"
}'

# Assign it to a user
curl -X POST http://localhost:3000/admin/realms/{realm}/users/{userId}/role-mappings/realm \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"roleNames": ["admin"]}'

User Federation​

LDAP Configuration​

OptionTypeDefaultDescription
namestring—Provider name
providerTypestringldapProvider type
enabledbooleantrueProvider is active
priorityinteger0Provider priority
connectionUrlstring—ldap:// or ldaps:// URL
startTlsbooleanfalseUpgrade an ldap:// connection with STARTTLS
connectionTimeoutinteger5000Milliseconds
bindDnstring—Service account DN
bindCredentialstring—Service account password (encrypted at rest)
usersDnstring—Base DN for user searches
userObjectClassstringinetOrgPersonObject class of user entries
usernameLdapAttrstringuidLDAP attribute for username
rdnLdapAttrstringuidRDN LDAP attribute
uuidLdapAttrstringentryUUIDUnique ID attribute (objectGUID for Active Directory)
searchFilterstring—Extra LDAP filter
syncModestringon_demandWhen users are synchronised
syncPeriodinteger3600Seconds between scheduled syncs
importEnabledbooleantrueImport users into Idenplane
editModestringREAD_ONLYWhether changes are written back

Kerberos is not supported.


Webhook Configuration​

Webhook Settings​

OptionTypeDefaultDescription
urlstring—Webhook endpoint URL
eventTypesstring[]—Events to send (required; events is accepted as an alias)
secretstring—HMAC signing secret, at least 8 characters
descriptionstring—Description
enabledbooleantrueEnable/disable webhook

Event names are lowercase and prefixed, for example user.login, user.login_error, user.registered; the full list is in the Webhooks guide. Retries follow a fixed schedule.

Registering Webhooks​

curl -X POST http://localhost:3000/admin/realms/{realm}/webhooks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/idenplane",
"eventTypes": ["user.login", "user.logout", "user.registered"],
"secret": "example-webhook-secret",
"enabled": true
}'

Verifying Webhooks​

Idenplane signs each payload with HMAC-SHA256 and sends X-Webhook-Signature: sha256=<hex> with X-Webhook-Timestamp. The Webhooks guide shows exactly what is signed and how to verify it.


Default Values Reference​

The defaults of a new realm:

const defaultRealmConfig = {
// Security
registrationAllowed: true,
bruteForceEnabled: true, // new realms since 0.10.0
mfaRequired: false,

// Sessions & Tokens (seconds)
accessTokenLifespan: 300,
refreshTokenLifespan: 1800,
offlineTokenLifespan: 2592000,
maxSessionsPerUser: 10,
ssoSessionIdleTimeout: 0, // off; since 0.12.0

// Password policy
passwordMinLength: 8,

// Brute Force (new realms since 0.10.0)
maxLoginFailures: 10,
failureResetTime: 900,
lockoutDuration: 300,
permanentLockoutAfter: 0,

// Events
eventsEnabled: true, // new realms since 0.10.0
adminEventsEnabled: true,
loginEventRetentionDays: 30,
adminEventRetentionDays: 90,

// Themes
loginTheme: 'idenplane',
accountTheme: 'idenplane',
emailTheme: 'idenplane',
};

Next Steps​

Environment Variables Environment-based configuration reference

Admin API Manage realms programmatically

Deployment Deploy with Docker Compose


idenplane.com · GitHub · Discord