Skip to content
Talk to our solutions team

Entities

iam.svc ships an embedded base schema — one definition per entity, materialized per tenant. Products layer additional entities or fields via iam/extend/ (see Configuration).

EntityPurpose
usersPrincipals. id is a ULID prefixed U; email and mobile are marked for auth/identity use; password is argon2id-hashed; roles live in properties.roles; allow_impersonation (default false) gates operator impersonation. Row-level security narrows non-admin reads to the caller’s own row; changes are audited
iamagentsAutonomous agents (A prefix) — realm feature toggle
iambotsBots (B prefix) — realm feature toggle
delegationDelegates acting for another user (D prefix) — realm feature toggle
userattributeCustom per-user attributes
tracked_anonymous_userPre-login anonymous identities (fed by the gateway tracker)

ID prefixes: U user · A agent · B bot · D delegate.

EntityPurpose
sessionManaged sessions: opaque session_id (≥128-bit, unique-indexed), principal, CPET, status (active/revoked/expired), AAL, auth method, IdP issuer/session pair (for back-channel logout), idle/absolute timing, revocation reason, impersonator fields. All CRUD restricted to the service principal
api_keyIssued API keys — the secret is returned once at issue time, stored hashed
user_refresh_tokenRotating refresh-token families, hashed
user_token, user_otp, user_mfa_requestShort-lived flow state (MFA, OTP)
user_magic_linkMagic-link codes
user_lockLockout state
password_reset_requestReset codes
oauthstateOAuth PKCE state (10-minute lifetime)
webauthn_session, webauthn_credentialWebAuthn ceremonies + registered credentials
federation_requestFederation handshakes
EntityPurpose
roleRole definitions
realmWhich entity authenticates, with which providers (see Authentication)
groupUser groups
tenantThe tenant registry (control plane)
tenant_extensionsTenant-layer config overlays, stored as rows (path + YAML body)
superadminControl-plane operators (in the superadmin plane only)
superadmin_grantWhich tenants an operator may manage — enforced by row-level security
jwt_signing_keyPer-tenant generated signing keys (only when no vault/inline key is configured)
EntityPurpose
user_eventlogPer-user auth events
tenant_eventlogTenant-level events

Two overlay forms in iam/extend/*.yaml:

  1. New entity — a full entity definition; it becomes a table and appears at /rest/<name>.
  2. Augmentaugments: users adds fields to a base entity.

Tenant-layer extensions (rows in tenant_extensions) merge on top of the product layer and are augment-only: they may add, never shadow. Shadowing a base field fails the engine build for that tenant — loudly, at boot or refresh, not at request time.

Access to every entity is governed by the entity’s access: rules (JS/expr predicates receiving the caller’s claims), plus row-level security where declared. The auth flows themselves run under an internal service principal that satisfies engine rules but grants callers nothing.