Skip to content

Identity Providers

Configure external identity providers for Single Sign-On (SSO) authentication in Mantis.

Mantis supports integration with external identity providers (IdPs) using OpenID Connect (OIDC), enabling centralized authentication and automatic user provisioning.

FeatureDescription
OIDC SupportStandard OpenID Connect 1.0 protocol
Auto-DiscoveryAutomatic endpoint discovery via .well-known
User ProvisioningAuto-create users on first SSO login
Role MappingMap IdP groups to Mantis roles
Multi-TenantTenant-specific identity providers
PKCESecure authorization code flow with S256

All OIDC-compatible providers are supported:

ProviderStatusNotes
Okta✓ SupportedFull OIDC support
Azure AD✓ SupportedMicrosoft Entra ID
Keycloak✓ SupportedOpen source IdP
Auth0✓ SupportedDeveloper-friendly
Google✓ SupportedGoogle Workspace
OneLogin✓ SupportedHR integration
Ping Identity✓ SupportedEnterprise IdP
Custom OIDC✓ SupportedAny OIDC provider
MechanismPurpose
PKCE (S256)Prevents authorization code interception
State ParameterCSRF protection
NonceReplay attack prevention
ID Token ValidationSignature, issuer, audience verification
Encrypted SecretsClient secrets encrypted at rest
FieldTypeDescription
idUUIDUnique identifier
nameStringDisplay name (unique)
provider_typeEnumAlways oidc
issuer_urlURLOIDC issuer URL
client_idStringOAuth client ID
client_secret_encryptedStringEncrypted client secret
discovery_urlURLOptional custom discovery URL
scopesArrayOAuth scopes to request
is_enabledBooleanProvider enabled status
auto_create_usersBooleanAuto-provision on first login
default_role_idUUIDDefault role for new users
tenant_idUUIDOptional tenant scope
FieldDefaultDescription
groups_claimgroupsClaim containing user groups
username_claimpreferred_usernameClaim for username
email_claimemailClaim for email address
FieldDefaultDescription
token_endpoint_auth_methodclient_secret_basicToken endpoint auth
role_sync_modeadditiveHow to sync roles from groups
end_session_endpointNULL (manual only)Logout endpoint

Register a new OIDC application with your identity provider:

SettingValue
Sign-in redirect URIhttps://your-mantis.com/api/v1/auth/oidc/callback
Sign-out redirect URIhttps://your-mantis.com
Grant typeAuthorization Code
PKCERequired (S256)
Terminal window
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Corporate Okta",
"provider_type": "oidc",
"issuer_url": "https://company.okta.com",
"client_id": "0oa1234567890abcdef",
"client_secret": "your-client-secret",
"auto_create_users": true,
"default_role_id": "role_operator_id"
}' \
"https://api.mantis.local/api/v1/admin/identity-providers"
Terminal window
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.mantis.local/api/v1/admin/identity-providers/$IDP_ID/test"

The provider is enabled by default. Users can now login via SSO.

EndpointMethodDescription
/api/v1/admin/identity-providersGETList providers
/api/v1/admin/identity-providersPOSTCreate provider
/api/v1/admin/identity-providers/{id}GETGet provider details
/api/v1/admin/identity-providers/{id}PUTUpdate provider
/api/v1/admin/identity-providers/{id}DELETEDelete provider
/api/v1/admin/identity-providers/{id}/testPOSTTest connection
/api/v1/admin/identity-providers/discoverPOSTDiscover endpoints
/api/v1/auth/oidc/providersGETList enabled providers (public)
/api/v1/auth/oidc/{provider_id}/loginPOSTInitiate SSO login
/api/v1/auth/oidc/callbackGETHandle SSO callback
ActionRequired Permission
View providerssettings:read
Create providersettings:manage
Update providersettings:manage
Delete providersettings:manage
Test connectionsettings:read
CREATE TABLE identity_providers (
id UUID PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
provider_type TEXT NOT NULL,
issuer_url TEXT NOT NULL,
client_id TEXT NOT NULL,
client_secret_encrypted TEXT NOT NULL,
discovery_url TEXT,
authorization_endpoint TEXT,
token_endpoint TEXT,
userinfo_endpoint TEXT,
jwks_uri TEXT,
scopes TEXT[] NOT NULL DEFAULT '{openid,profile,email}',
is_enabled BOOLEAN NOT NULL DEFAULT TRUE,
auto_create_users BOOLEAN NOT NULL DEFAULT FALSE,
default_role_id UUID REFERENCES roles(id) ON DELETE SET NULL,
tenant_id UUID REFERENCES tenants(id) ON DELETE CASCADE,
trust_unverified_email BOOLEAN NOT NULL DEFAULT FALSE,
groups_claim TEXT NOT NULL DEFAULT 'groups',
username_claim TEXT NOT NULL DEFAULT 'preferred_username',
email_claim TEXT NOT NULL DEFAULT 'email',
end_session_endpoint TEXT,
token_endpoint_auth_method TEXT NOT NULL DEFAULT 'client_secret_basic',
role_sync_mode TEXT NOT NULL DEFAULT 'additive',
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP
);
  1. Use HTTPS - Always use TLS for callback URLs
  2. Enable PKCE - Required for public clients
  3. Minimal scopes - Request only needed scopes
  4. Regular rotation - Rotate client secrets periodically
  1. Enable auto-provisioning - Reduces admin overhead
  2. Set default roles - Appropriate access for new users
  3. Configure role mappings - Sync roles from IdP groups
  4. Review external identities - Audit linked accounts
  1. Tenant-specific IdPs - Isolate customer authentication
  2. System-wide IdPs - For platform administrators
  3. Consistent naming - Clear provider identification