Skip to content
Operate

Any OIDC provider

Connect the engine to Ping, AD FS, Keycloak, Google or any other OpenID Connect provider.

On this page

Any provider that implements OpenID Connect discovery and the authorization code flow works: PingFederate and PingOne, AD FS 2016 or later, Keycloak, Auth0, Google. The engine needs four things from it.

What the provider must offer

NeedWhy
A discovery documentThe engine reads <issuer>/.well-known/openid-configuration and refuses one whose issuer differs.
Authorization code with PKCEThe engine always sends an S256 code challenge.
RS256 or ES256 id_tokensHMAC-signed and unsigned tokens are refused.
A groups or roles claimWithout one, only ENGINE_OIDC_DEFAULT_ROLE can let people in.

The client authenticates with HTTP Basic (client_secret_basic). Set ENGINE_OIDC_TOKEN_AUTH=client_secret_post for a provider that only accepts the secret in the body.

Steps

1. Register a confidential client

Create a web (confidential) client with the redirect URI https://engine.example.test/api/auth/sso/oidc/callback, the scopes openid email profile, and a claim that lists the person's groups or roles.

2. Configure the engine

bash
ENGINE_OIDC_ISSUER=https://idp.example.test/realms/healthcare
ENGINE_OIDC_CLIENT_ID=medhook-engine
ENGINE_OIDC_CLIENT_SECRET=<from your secrets manager>
ENGINE_OIDC_GROUPS_CLAIM=groups
ENGINE_OIDC_GROUP_ROLES="medhook-admins=admin;medhook-operators=operator"

Use ENGINE_OIDC_SCOPES to ask for more scopes, for example openid email profile groups on a provider that only sends groups with that scope.

3. Test

Restart the engine and sign in from /sign-in. A failed sign-in is in the audit log as auth.signin_failed with a reason: discovery_failed, token_exchange_failed, invalid_token, nonce_mismatch, no_role, email_unverified or mfa_required.

Reference