Embedded IAM configuration
Generated from schemas/embedded-iam.schema.json by scripts/gen-config-docs. Do not edit this page: edit the schema or the generator.
The optional cladone-auth embedded IAM configuration. Secrets are read from the environment; a *Env field names the variable.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | External origin of the IAM, without a trailing slash (for example https://auth.example.com). | |
string | no | Default listen address for cmd/cladone-auth (for example :8081). | |
string | no | IAM SSO cookie shared by all applications in one browser. Default cladone_iam_sid. | |
array of object | yes | Isolated issuers. Each tenant has its own key, client, upstream identity providers and policy. | |
no | Shared store for flows, codes, refresh tokens and the revocation keyspace read by Gate One. Absent = in-memory store, single instance and tests only. | ||
no | Outbound mail relay for local-account verification emails. |
tenants
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | Tenant identifier; also the /t/{tenant} path segment and default audience. Minimum length: 1. | |
string | yes | Gate One OIDC client id registered with this tenant. Minimum length: 1. | |
string | no | Inline client secret. Prefer clientSecretEnv so the secret never lands in the file. Write-only; prefer the | |
string | no | Environment variable holding the Gate One client secret. | |
array of string | yes | Allowed Gate One callback URLs (https, or localhost for tests). | |
array of string | no | Allowed post-logout targets. List every application origin as https://app.example.com/* (the host Gate One sends as post_logout_redirect_uri). Empty falls back to redirectUris, which covers only the login host, so a logout from an application host would be refused. | |
array of string | no | Audiences allowed for access tokens. Empty = the tenant id. | |
no | Upstream OIDC identity provider configuration. The google key defaults to the Google issuer; other keys require issuer, clientId/Env and clientSecret/Env. | ||
map of object | no | Named OIDC upstreams (google, microsoft, …). The key is the idp authorize parameter and the chooser label. | |
string | no | Active Ed25519 private key file (base64 raw seed). Empty = ephemeral key, tests/dev only. Mutually exclusive with keyFiles. | |
array of string | no | Published keys, oldest first, newest active. Used to rotate tokens without invalidating old ones. | |
array of string | no | Roles granted to every authenticated user. | |
array of string | no | Allowed upstream hosted/email domains. Empty = no restriction. | |
array of string | no | Email addresses granted the admin role. | |
map of string to array of string | no | Map an upstream group/claim value to IAM roles. | |
integer | no | Access token lifetime in seconds. Default 600. Minimum: 1. | |
integer | no | ID token lifetime in seconds. Default 600. Minimum: 1. | |
integer | no | Refresh token lifetime in seconds. Default 2592000 (30 days). Gate One reads it from discovery to size revocation. Minimum: 1. | |
integer | no | IAM SSO session lifetime in seconds. Default 43200 (12 hours). Minimum: 1. | |
boolean | no | Enable the local account lifecycle endpoints (register, verify email) for this tenant. Requires smtp. | |
array of string | no | Allowed application origins for a verification continueUrl. | |
string | no | Environment variable gating POST /register (server-to-server registration). | |
array of object | no | Ordered mapping rules translating upstream claims into IAM roles/scopes/claims. Evaluated on every federated login; results are not persisted on the user. The legacy groupRoles block remains supported for the groups claim. | |
array of object | no | when/then policy rules: test the incoming token’s claims (when) and grant rights (then), including derived roles (rolesFrom) and copied claims (copyClaims). Evaluated on every login; results are not persisted on the user. |
tenants.google
Upstream OIDC identity provider configuration. The google key defaults to the Google issuer; other keys require issuer, clientId/Env and clientSecret/Env.
| Field | Type | Required | Description |
|---|---|---|---|
string | no | Upstream OIDC issuer. Default https://accounts.google.com for the google upstream; required for other upstreams. | |
string | no | Upstream OIDC client id. Prefer clientIdEnv. | |
string | no | Environment variable holding the upstream client id. | |
string | no | Inline upstream client secret. Prefer clientSecretEnv. Write-only; prefer the | |
string | no | Environment variable holding the upstream client secret. | |
string | no | Forwarded to the upstream authorize endpoint (for example select_account). | |
string | no | Google Workspace hosted domain (hd) restriction. | |
array of string | no | Upstream scopes. Default openid, profile, email. | |
string | no | Label shown on the identity provider chooser. Default: the upstream key. | |
boolean | no | Skip this upstream when its client id/secret environment variables are empty, instead of refusing startup. |
tenants.upstreams
Upstream OIDC identity provider configuration. The google key defaults to the Google issuer; other keys require issuer, clientId/Env and clientSecret/Env.
| Field | Type | Required | Description |
|---|---|---|---|
string | no | Upstream OIDC issuer. Default https://accounts.google.com for the google upstream; required for other upstreams. | |
string | no | Upstream OIDC client id. Prefer clientIdEnv. | |
string | no | Environment variable holding the upstream client id. | |
string | no | Inline upstream client secret. Prefer clientSecretEnv. Write-only; prefer the | |
string | no | Environment variable holding the upstream client secret. | |
string | no | Forwarded to the upstream authorize endpoint (for example select_account). | |
string | no | Google Workspace hosted domain (hd) restriction. | |
array of string | no | Upstream scopes. Default openid, profile, email. | |
string | no | Label shown on the identity provider chooser. Default: the upstream key. | |
boolean | no | Skip this upstream when its client id/secret environment variables are empty, instead of refusing startup. |
tenants.mappings
One claim-to-rights mapping rule.
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | Dot path into the upstream token claims, for example groups, realm_access.roles or resource_access.gate-one.roles. Minimum length: 1. | |
array of string | no | Values to match. If omitted, the rule matches when the claim is present and non-empty. | |
array of string | no | IAM roles added when the rule matches. | |
array of string | no | IAM scopes added when the rule matches. | |
map of string to any | no | Claims copied into issued tokens when the rule matches. Reserved claims (iss, sub, aud, exp, iat, jti, nonce, tenant, roles, scope, sid, email, preferred_username) are refused. |
tenants.rules
A when/then policy rule: test the incoming token’s claims and grant rights. Evaluated on every login; results are not persisted on the user.
| Field | Type | Required | Description |
|---|---|---|---|
array of object | yes | Conditions, combined with logical AND. A single condition object is also accepted as shorthand. | |
yes | Rights granted when every condition matches. |
tenants.rules.when
Test one claim of the incoming token.
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | Dot path into the upstream token claims (email, sub, groups, realm_access.roles, …). Minimum length: 1. | |
string (one of: | no | Matching operator. Default exact. prefix/suffix/domain/glob are case-insensitive. | |
array of string | no | Values to match. Omitted = the claim must be present and non-empty. |
tenants.rules.then
Rights granted when every condition matches.
| Field | Type | Required | Description |
|---|---|---|---|
array of string | no | Constant IAM roles. | |
array of string | no | Constant IAM scopes. | |
map of string to any | no | Constant claims copied into issued tokens. Reserved claims are refused. | |
array of object | no | Derive roles from an incoming claim’s values. | |
array of object | no | Copy incoming claims into issued tokens, optionally renamed and reshaped. |
tenants.rules.then.rolesFrom
Turn an incoming claim’s values into IAM roles.
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | Dot path into the upstream token claims. Minimum length: 1. | |
array of string | no | Pipeline applied to each value: lower, upper, prefix:<p>, suffix:<p>, replace:<a>:<b>, keep:<sep>:<from>[:<to>] (keep fields from..to, negative counts from the end, joined by <sep>). |
tenants.rules.then.copyClaims
Copy an incoming claim into the issued token.
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | Source claim dot path. Minimum length: 1. | |
string | no | Destination claim name. Default: same as from. Reserved names are refused. Minimum length: 1. | |
array of string | no | Pipeline applied to each value: lower, upper, prefix:<p>, suffix:<p>, replace:<a>:<b>, keep:<sep>:<from>[:<to>] (keep fields from..to, negative counts from the end, joined by <sep>). |
redis
Shared store for flows, codes, refresh tokens and the revocation keyspace read by Gate One. Absent = in-memory store, single instance and tests only.
| Field | Type | Required | Description |
|---|---|---|---|
string | no | Redis URL (redis:// or rediss://). Mutually exclusive with sentinel mode. | |
array of string | no | Sentinel addresses (host:port). Required with masterName. | |
string | no | Redis master name for Sentinel discovery. | |
string | no | ACL user for the Sentinel connections (sentinel mode only). | |
string | no | Environment variable holding the Sentinel password (sentinel mode only). | |
string | no | Redis ACL user. | |
string | no | Environment variable holding the Redis password. | |
integer | no | Redis database number. Default 0. Minimum: 0. | |
string | no | Key prefix for IAM state. Default cladone:iam:v1:. | |
string | no | Key prefix the IAM writes revocations to, read by Gate One. Default cladone:auth:v1:. | |
integer | no | Dial timeout in milliseconds. Minimum: 1. | |
integer | no | Read timeout in milliseconds. Minimum: 1. | |
integer | no | Write timeout in milliseconds. Minimum: 1. | |
integer | no | Connection pool size. Minimum: 1. | |
boolean | no | Use TLS for the Sentinel and master/replica connections. | |
string | no | CA bundle for TLS (system roots by default). Requires tls=true. | |
string | no | TLS server name, useful when Sentinels are addressed by IP. Requires tls=true. |
smtp
Outbound mail relay for local-account verification emails.
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | SMTP host. | |
integer | no | SMTP port. Default 587 (STARTTLS). Minimum: 1. Maximum: 65535. | |
string | no | SMTP username. Prefer usernameEnv. | |
string | no | Environment variable holding the SMTP username. | |
string | no | Environment variable holding the SMTP password. | |
string | yes | From address for verification emails. |