Skip to main content

OIDC sign-in

The problem

Users sign in with the company's identity provider, not a per-app password. You want SSO without bespoke code, with the IdP's group membership translating to Liberty roles.

The pattern

Two halves:

  1. On the IdP — register the framework as an OAuth2/OIDC client, expose a groups claim, register the redirect URI.
  2. On the framework — flip OIDC enabled on under Settings → Framework → Authentication, fill in the four standard values, click Test sign-in.

The recipe

Step 1 — register Liberty on the IdP

The procedure depends on the IdP but the shape is identical.

Authentik

  1. Applications → ProvidersCreateOAuth2/OpenID Provider.
  2. Redirect URIs: https://liberty.example.com/auth/oidc/callback.
  3. Property mappings: add the default openid email groups set.
  4. Note the Client ID + Client secret.
  5. Applications → ApplicationsCreate → link to the provider; pick which groups to expose.

Keycloak

  1. RealmClientsCreate — Client ID liberty, OpenID Connect protocol.
  2. Valid redirect URIs: https://liberty.example.com/auth/oidc/callback.
  3. Credentials tab → note the secret.
  4. Client scopesliberty-dedicatedAdd mapperGroup Membership → claim name groups, omit / prefix.

Azure AD / Entra

  1. App registrationsNew registration.
  2. Redirect URI: https://liberty.example.com/auth/oidc/callback (Web).
  3. Certificates & secretsNew client secret — note the value.
  4. Token configurationAdd groups claim → All groups; emit as groups (not object IDs).

Okta

  1. ApplicationsCreate App Integration → OIDC, Web Application.
  2. Sign-in redirect URI: https://liberty.example.com/auth/oidc/callback.
  3. Assignments — choose the groups.
  4. Authorization servers → default → Claims → add a groups claim, type Groups.

Step 2 — configure Liberty

Settings → Framework → Authentication:

FieldValue
OIDC enabled
Issuer URLThe IdP's issuer. Examples: https://auth.example.com/application/o/liberty/ (Authentik, trailing slash matters)https://kc.example.com/realms/<realm> (Keycloak)https://login.microsoftonline.com/<tenant>/v2.0 (Azure)https://<domain>.okta.com/oauth2/default (Okta).
Client IDFrom the IdP.
Client secret🔒 From the IdP — paste in encrypted mode.
Redirect URIhttps://liberty.example.com/auth/oidc/callback (must match what's registered on the IdP).
Email claimemail (default).
Groups claimgroups (default).
Auto-provision(creates a Liberty user on first SSO sign-in).

Click ▶ Test sign-in at the bottom of the OIDC sub-form. A new tab opens, you sign in on the IdP, the tab returns "OIDC test successful" plus the resolved claims (email, groups) so you can confirm the mapping.

Save & reload.

Step 3 — map IdP groups to Liberty roles

The framework maps the groups claim 1:1 to Liberty role identifiers. Open Settings → Roles, make sure each IdP group you care about has a matching Liberty role with the right permissions.

IdP groupLiberty rolePermissions
crm-salescrm-salessql:customers:*, sql:deals:*, screen:crm:*, menu:crm:*
crm-managerscrm-managerscrm-sales (inherits) + dashboard access
adminsadmin*

Step 4 — test as a real user

Sign out as admin. The login page now has a Sign in with SSO button. Click it, authenticate on the IdP, return to the framework — you have the roles the IdP claims you do, you see what those roles let you see.

Break-glass access

The local username/password form stays available alongside the SSO button. The admin user can still sign in directly even when the IdP is unreachable. Keep at least one local admin for this reason — never delete it.

Single sign-out

For end-session propagation back to the IdP, set End-session endpoint in the OIDC sub-form. The framework redirects through it on POST /auth/logout.

Variations

You want…Do this
Restrict to a specific email domainThe framework refuses sign-in if email_claim doesn't end with the value of [auth.oidc] allowed_domains (set in the sub-form). Multiple domains supported as a comma list.
Prevent auto-provisioningTurn Auto-provision off. Users must exist in Settings → Users before they can sign in. The IdP provides authentication; you control authorisation.
Multiple IdPsNot supported in one form; the typical alternative is to use the IdP-of-IdPs (Authentik / Keycloak federating Azure + Google + …) and point Liberty at the broker.
A custom claim instead of emailSet Email claim to whatever the IdP exposes (preferred_username, upn, etc.).

What's next