Configure OIDC / SSO¶
OpenID Connect single sign-on — corporate users sign in with their existing Microsoft Entra ID, Google Workspace, or Okta account. Same JWT downstream, so all RBAC and permission checks work unchanged.
Why use it¶
- One password (the IdP's) instead of three (local + LDAP + per-product).
- MFA / conditional access enforced at the IdP automatically apply.
- Offboarding = disable the user in the IdP, MFCloud access dies on next login.
- Zero password-reset tickets — that's the IdP's problem.
Prerequisites¶
- Master reachable from the IdP at a stable URL (the redirect URI).
- Operator has
global_adminpermission. - An OIDC app registered at the IdP — see provider-specific sections below.
Quick steps (any provider)¶
- Settings → 🔑 Single Sign-On (OpenID Connect).
- Toggle Enable OIDC sign-in.
- Fill in:
- Issuer URL — the IdP's discovery base.
- Entra:
https://login.microsoftonline.com/<tenant-id>/v2.0 - Google:
https://accounts.google.com - Okta:
https://<your-domain>.okta.com
- Entra:
- Client ID — application/client ID from the IdP.
- Client Secret — paste the secret. Leave blank on subsequent saves to keep the existing value.
- Sign-in Button Label — what shows on the login page (default: Sign in with Microsoft).
- Default Role — the role assigned to new users on first SSO login.
- Email Claim — usually
email. Entra often needspreferred_username. - Save SSO Settings.
The login page now shows a "Sign in with X" button below the local form. Click → IdP authenticate → land back in the console with a fresh JWT.
Register the app at your IdP¶
Per-IdP step-by-step runbooks — pick the one that matches your provider:
- Microsoft Entra ID (Azure AD) — full walkthrough including front-channel logout and groups claim.
- Google Workspace — OAuth consent screen + client setup.
- Okta — OIDC app + group claim mapping.
The bullet-point summary below is enough if you've done OIDC app registration before.
Microsoft Entra ID¶
- Azure Portal → Entra ID → App registrations → New registration.
- Redirect URI (Web):
https://<your-mfcloud-host>/api/auth/oidc/callback. - After creation → Certificates & Secrets → + New client secret. Copy the Value (not Secret ID).
- Token configuration → + Add optional claim → tick
emailif you want the canonical email. - API permissions → ensure
openid,email,profileare granted (default). - Authentication → Front-channel logout URL =
https://<your-mfcloud-host>/so logout returns to MFCloud.
Google Workspace¶
- console.cloud.google.com → APIs & Services → Credentials → + Create Credentials → OAuth client ID.
- Application type: Web application.
- Authorized redirect URI:
https://<your-mfcloud-host>/api/auth/oidc/callback. - After creation, copy the Client ID and Client secret.
- Google has no
end_session_endpoint— logout clears MFCloud only.
Okta¶
- Admin console → Applications → Create App Integration → OIDC, Web Application.
- Sign-in redirect URI:
https://<your-mfcloud-host>/api/auth/oidc/callback. - Sign-out redirect URI:
https://<your-mfcloud-host>/. - Assignments: pick the groups that should have console access.
Behind the scenes¶
/api/auth/oidc/startgeneratesstate,nonce, and a PKCE S256 verifier; signs them into a 10-min HMAC cookie; 302s to the IdP./api/auth/oidc/callbackvalidates the cookie, exchanges the auth code for an ID token, verifies the JWT against the IdP's JWKS, looks up or auto-creates the user by(oidc_issuer, oidc_subject).- Discovery doc + JWKS cached for 60 min; key rotation handled automatically (cache busts on
kidmiss).
Safety net — local always wins¶
Local sign-in (/api/login) is tried first regardless of OIDC state. The local admin user is unconditionally promoted to Super Admin on every login. You cannot lock yourself out by misconfiguring SSO.
See also¶
- Troubleshooting → SSO callback 400
- Configure LDAP / AD — same coexist-with-local model.