- request access tokens for human users or machine-to-machine applications;
- refresh an expired access token;
- retrieve OIDC-compatible user information;
- validate whether a subject can perform an action on a resource;
- retrieve the permissions available to the authenticated user;
- end a user session;
- initiate and verify MFA challenges during login.
Main flows
Auth supports the access flows used by Lerian products and integrations.
Figure 1. Authentication and Authorization Flow
Authentication flow
- Token request
- Human users authenticate with the
passwordgrant. - Service integrations authenticate with the
client_credentialsgrant. - Auth forwards the request to the identity provider and returns the access token, refresh token, and ID token when applicable.
- Human users authenticate with the
- Token refresh
- Clients exchange a refresh token for a new access token.
- Auth validates the refresh token with the identity provider before issuing the new token.
- Token validation
- Protected products validate bearer tokens before accepting a request.
- Auth extracts trusted token claims to identify the subject and tenant context.
- Validation results can be cached to reduce repeated identity-provider calls.
Organization context
For authorization, Auth uses the JWTowner claim when it is present and otherwise the configured organization. The product that receives an authorized request owns its own tenant data context and data-plane isolation. Do not infer a cross-product tenant-resolution flow from Auth alone.
For multi-tenant deployment configuration, follow the relevant product and multi-tenancy documentation.
Browser SSO flow
- Start the flow
- The browser starts SSO through Auth with an email address, an eligible provider, and an S256 PKCE
code_challenge. Auth resolves the tenant server-side from the email domain and redirects the browser to the upstream identity provider.
- The browser starts SSO through Auth with an email address, an eligible provider, and an S256 PKCE
- Handle the callback
- The identity provider redirects the browser to
PLUGIN_AUTH_SSO_CALLBACK_URL. This absolute callback URL must be registered in the identity provider application’s redirect-URI allowlist. - The Console submits the provider authorization code, the Auth state, and the matching PKCE
codeVerifierthrough Auth’ssso_codegrant. Auth consumes the flow once, relays the code to the identity provider, and returns the token envelope.
- The identity provider redirects the browser to
MFA login flow
- Challenge required
- When MFA is required, Auth returns an MFA challenge state instead of completing the login immediately.
- Start challenge delivery
- For email or SMS MFA, the client submits the returned MFA token and the selected method to request challenge delivery, and Auth sends the challenge code through that method.
- A TOTP application generates its passcode locally, without a delivery request.
- Challenge verification
- The user submits the MFA token and either a passcode or a recovery code, not both.
- Auth verifies the challenge and returns access tokens when the verification succeeds.
- Session controls
- MFA challenges expire after the configured TTL.
- Failed attempts are limited to protect the account from repeated guessing.
Authorization flow
- Enforce access
- A protected product asks whether the authenticated subject can perform a specific action on a specific resource.
- Auth evaluates the request against the configured Access Manager permissions.
- Successful authorization decisions can be cached for performance.
- Retrieve permissions
- A client can retrieve the permissions available to the authenticated user.
- Auth returns permissions as a map of resources to allowed actions.
User information flow
- Profile request
- The client requests user profile information with a bearer token.
- Auth validates the token and retrieves user details from the identity provider.
- Auth returns OIDC-compatible user information.
Logout flow
- User logout
- The client sends a logout request with the ID token hint.
- Auth invalidates the session in the identity provider.
- Related cache entries are cleared.
API overview
Auth exposes APIs for:
- requesting access tokens with
passwordorclient_credentials; - refreshing access tokens;
- ending user sessions;
- validating user permissions;
- retrieving user information;
- retrieving user permissions;
- starting, completing, and discovering browser SSO flows;
- initiating an MFA challenge;
- verifying an MFA login challenge.
Permission decisions
When a protected product asks Auth whether a subject can perform an action on a resource, Auth resolves the subject (a human user or a machine-to-machine application), looks up the permissions associated with it, and returns an authorized or denied decision. For human users, Auth evaluates permissions embedded in their identity data, including direct user permissions and applicable roles. For machine-to-machine applications, permissions come from the application’s configured permission set. Auth does not invent permissions; it evaluates the data Identity manages. For the full subject/resource/action model, examples, and how routes are protected, see Product-level enforcement. To inspect what the authenticated subject can reach, use Retrieve User Permissions.
Data storage and caching
Auth uses structured policy data and cache entries to reduce repeated work:
- Policy data stores access-control rules for users, groups, and applications.
- Token cache stores token validation results.
- Permission cache stores successful authorization decisions.
- User permissions cache stores the map of resources and actions available to a user.
- MFA cache stores temporary challenge state, attempt counters, and remember-device state when configured.
Testing and reliability
Auth undergoes continuous testing to maintain reliability and security. Tests cover:
- Authentication and token validation flows.
- Access control enforcement.
- Performance and caching efficiency.

