Skip to content

Dashboard Authentication Reference

This document provides a complete reference for all dashboard authentication configuration options.

VariableDescriptionDefault
OMNIA_AUTH_MODEAuthentication mode: anonymous, proxy, oauth, or builtinanonymous
OMNIA_BASE_URLBase URL for OAuth callbacks (required for OAuth mode)-
VariableDescriptionDefault
OMNIA_SESSION_SECRET32+ character secret for session encryptionRandom (dev only)
OMNIA_SESSION_COOKIE_NAMEName of the session cookieomnia_session
OMNIA_SESSION_TTLSession lifetime in seconds86400 (24 hours)
VariableDescriptionDefault
OMNIA_AUTH_ROLE_ADMIN_GROUPSComma-separated groups that get admin role-
OMNIA_AUTH_ROLE_EDITOR_GROUPSComma-separated groups that get editor role-
OMNIA_AUTH_ANONYMOUS_ROLERole for anonymous usersviewer
VariableDescriptionDefault
OMNIA_AUTH_PROXY_HEADER_USERHeader containing usernameX-Forwarded-User
OMNIA_AUTH_PROXY_HEADER_EMAILHeader containing emailX-Forwarded-Email
OMNIA_AUTH_PROXY_HEADER_GROUPSHeader containing groups (comma-separated)X-Forwarded-Groups
OMNIA_AUTH_PROXY_HEADER_DISPLAY_NAMEHeader containing display nameX-Forwarded-Preferred-Username
OMNIA_AUTH_PROXY_AUTO_SIGNUPAuto-create users on first logintrue
VariableDescriptionDefault
OMNIA_OAUTH_PROVIDERProvider type (see below)generic
OMNIA_OAUTH_CLIENT_IDOAuth client ID-
OMNIA_OAUTH_CLIENT_SECRETOAuth client secret-
OMNIA_OAUTH_CLIENT_SECRET_FILEPath to file containing client secret-
OMNIA_OAUTH_ISSUER_URLOIDC issuer URL (required for generic)-
OMNIA_OAUTH_SCOPESComma-separated OAuth scopesProvider-specific
VariableDescriptionDefault
OMNIA_OAUTH_CLAIM_USERNAMEClaim for usernamepreferred_username
OMNIA_OAUTH_CLAIM_EMAILClaim for emailemail
OMNIA_OAUTH_CLAIM_DISPLAY_NAMEClaim for display namename
OMNIA_OAUTH_CLAIM_GROUPSClaim for groupsgroups
VariableDescriptionRequired For
OMNIA_OAUTH_AZURE_TENANT_IDAzure AD tenant IDAzure
OMNIA_OAUTH_OKTA_DOMAINOkta organization domainOkta
VariableDescriptionDefault
OMNIA_AUTH_API_KEYS_ENABLEDEnable API key authenticationtrue
OMNIA_AUTH_API_KEYS_MAX_PER_USERMaximum keys per user10
OMNIA_AUTH_API_KEYS_DEFAULT_EXPIRATIONDefault expiration in days (0 = never)90
VariableDescriptionDefault
OMNIA_BUILTIN_STORE_TYPEStorage backend: sqlite or postgresqlsqlite
OMNIA_BUILTIN_SQLITE_PATHSQLite database file path./data/omnia-users.db
OMNIA_BUILTIN_POSTGRES_URLPostgreSQL connection URL-
OMNIA_BUILTIN_ALLOW_SIGNUPAllow public user registrationfalse
OMNIA_BUILTIN_VERIFY_EMAILRequire email verificationfalse
OMNIA_BUILTIN_MIN_PASSWORD_LENGTHMinimum password length8
OMNIA_BUILTIN_MAX_FAILED_ATTEMPTSFailed logins before lockout5
OMNIA_BUILTIN_LOCKOUT_DURATIONLockout duration in seconds900
OMNIA_BUILTIN_RESET_TOKEN_EXPIRATIONPassword reset token TTL (seconds)3600
OMNIA_BUILTIN_VERIFICATION_TOKEN_EXPIRATIONEmail verification token TTL (seconds)86400
OMNIA_BUILTIN_ADMIN_USERNAMEInitial admin usernameadmin
OMNIA_BUILTIN_ADMIN_EMAILInitial admin emailadmin@example.com
OMNIA_BUILTIN_ADMIN_PASSWORDInitial admin password-

For any OpenID Connect compliant provider.

Terminal window
OMNIA_OAUTH_PROVIDER=generic
OMNIA_OAUTH_ISSUER_URL=https://auth.example.com

Required: OMNIA_OAUTH_ISSUER_URL

Default scopes: openid, profile, email

Discovery: Automatic via /.well-known/openid-configuration

Terminal window
OMNIA_OAUTH_PROVIDER=google

Issuer: https://accounts.google.com

Default scopes: openid, profile, email

Callback URL: https://your-domain/api/auth/callback

Console: Google Cloud Console

Terminal window
OMNIA_OAUTH_PROVIDER=github

Note: GitHub uses OAuth 2.0, not OIDC. User info is fetched from GitHub API.

Default scopes: read:user, user:email

Callback URL: https://your-domain/api/auth/callback

Console: GitHub Developer Settings

Limitations:

  • No groups claim (all users get default role)
  • No OIDC discovery
  • No SSO logout
Terminal window
OMNIA_OAUTH_PROVIDER=azure
OMNIA_OAUTH_AZURE_TENANT_ID=your-tenant-id

Issuer: https://login.microsoftonline.com/{tenant}/v2.0

Default scopes: openid, profile, email

Callback URL: https://your-domain/api/auth/callback

Console: Azure Portal

Group claims: Configure in Token Configuration > Add groups claim

Terminal window
OMNIA_OAUTH_PROVIDER=okta
OMNIA_OAUTH_OKTA_DOMAIN=your-domain.okta.com

Issuer: https://{domain}/oauth2/default

Default scopes: openid, profile, email, groups

Callback URL: https://your-domain/api/auth/callback

Console: Okta Admin Console > Applications

POST /api/auth/login
GET /api/auth/login?returnTo=/agents

Initiates OAuth flow. Query parameter returnTo specifies redirect after login.

GET /api/auth/callback?code=xxx&state=xxx

OAuth callback endpoint. Handles authorization code exchange.

POST /api/auth/logout

Clears session. In OAuth mode, may redirect to IdP for SSO logout.

Response:

{
"success": true,
"redirectUrl": "https://idp.example.com/logout?..." // Optional
}
POST /api/auth/refresh

Refreshes OAuth access token using refresh token.

Response:

{
"success": true,
"expiresAt": 1704067200
}
GET /api/auth/me

Returns current user information.

Response:

{
"user": {
"id": "user-123",
"username": "jdoe",
"email": "jdoe@example.com",
"displayName": "John Doe",
"groups": ["omnia-admins"],
"role": "admin",
"provider": "oauth"
}
}
GET /api/settings/api-keys
POST /api/settings/api-keys
DELETE /api/settings/api-keys/:id

Manage API keys for the current user.

POST /api/auth/builtin/login

Authenticate with username/email and password.

Request:

{
"username": "user@example.com",
"password": "secret123"
}

Response:

{
"success": true,
"user": {
"id": "user-123",
"username": "jdoe",
"email": "jdoe@example.com",
"role": "editor"
}
}

Errors:

  • invalid_credentials - Wrong username/password
  • account_locked - Too many failed attempts
  • email_not_verified - Email verification required
POST /api/auth/builtin/signup

Register a new user (if OMNIA_BUILTIN_ALLOW_SIGNUP=true).

Request:

{
"username": "jdoe",
"email": "jdoe@example.com",
"password": "secret123",
"displayName": "John Doe"
}

Errors:

  • signup_disabled - Public registration disabled
  • email_exists - Email already registered
  • username_exists - Username taken
  • password_too_short - Below minimum length
POST /api/auth/builtin/forgot-password

Request a password reset token.

Request:

{
"email": "jdoe@example.com"
}

Response: Always returns success (prevents email enumeration).

POST /api/auth/builtin/reset-password

Set new password using reset token.

Request:

{
"token": "reset-token-from-email",
"password": "newpassword123"
}

Errors:

  • invalid_token - Token invalid or expired
  • password_too_short - Below minimum length
POST /api/auth/builtin/verify-email

Verify email address using verification token.

Request:

{
"token": "verification-token-from-email"
}

Errors:

  • invalid_token - Token invalid or expired

The session cookie contains encrypted JSON:

interface SessionData {
user?: {
id: string;
username: string;
email?: string;
displayName?: string;
groups: string[];
role: "admin" | "editor" | "viewer";
provider: "anonymous" | "proxy" | "oauth" | "builtin" | "api-key";
};
createdAt?: number;
oauth?: {
accessToken: string;
refreshToken?: string;
idToken?: string;
expiresAt?: number;
provider: string;
};
pkce?: {
codeVerifier: string;
codeChallenge: string;
state: string;
returnTo?: string;
};
}
ActionViewerEditorAdmin
View agentsYesYesYes
View logsYesYesYes
View metricsYesYesYes
Scale agentsNoYesYes
Create agentsNoYesYes
Delete agentsNoYesYes
Modify promptsNoYesYes
Modify toolsNoYesYes
Manage own API keysYesYesYes
Manage all API keysNoNoYes
View all usersNoNoYes
  1. Check admin groups
  2. Check editor groups
  3. Default to viewer

First match wins. Example:

Terminal window
OMNIA_AUTH_ROLE_ADMIN_GROUPS=admins,super-users
OMNIA_AUTH_ROLE_EDITOR_GROUPS=developers,ops

User with groups ["developers", "admins"] gets admin role (checked first).

API keys follow this format:

omnia_sk_[base64-encoded-data]

The encoded data contains:

  • Key ID
  • User ID
  • Creation timestamp
  • Signature

Example:

omnia_sk_eyJpZCI6ImtleS0xMjMiLCJ1c2VyIjoidXNlci00NTYiLCJjcmVhdGVkIjoxNzA0MDY3MjAwfQ.signature
HeaderDescription
AuthorizationBearer token: Bearer omnia_sk_... or Bearer <jwt>
X-API-KeyAlternative API key header
CookieSession cookie (browser requests)

Headers read from reverse proxy:

Default HeaderContains
X-Forwarded-UserUsername
X-Forwarded-EmailEmail address
X-Forwarded-GroupsComma-separated groups
X-Forwarded-Preferred-UsernameDisplay name
ErrorDescription
invalid_stateCSRF state mismatch
no_codeNo authorization code in callback
callback_failedToken exchange failed
access_deniedUser denied consent
invalid_claimsMissing required claims
config_errorOAuth misconfiguration
StatusErrorDescription
401unauthorizedNo valid authentication
403forbiddenInsufficient permissions
400invalid_requestMalformed request

The dashboard sets these security headers:

X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin

Session cookies include:

HttpOnly; Secure; SameSite=Lax; Path=/

Configure these URLs in your identity provider:

ProviderRedirect URI
Allhttps://your-domain/api/auth/callback

For logout (if supported):

ProviderPost-Logout URI
Allhttps://your-domain/login