Skip to content

triauth for KeycloakOIDC

Let your team sign in to Keycloak, and to every app behind it, with one approval on their own device.

  • Identity and access
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every Keycloak installation
Set up in
Admin console › Identity providers

About Keycloak

Keycloak is an identity server that companies run themselves. It holds user accounts, signs people into applications over OpenID Connect and SAML, and can hand the actual login to another identity provider. Teams put it in front of dozens of internal apps, so each app only knows Keycloak.

Connect Keycloak to triauth

Keycloak signs people in through the triauth OpenID Connect bridge, as an identity provider of a realm. Once connected, Keycloak's login page shows a button with your domain's name. People on your team click it, type their username, and approve on their own device, and Keycloak signs them into every app behind it. One connection covers them all, and when someone leaves, removing their identity records at your domain ends their access to every one of them.

How it works

  1. In the admin console, choose the realm, open Identity providers, and pick OpenID Connect v1.0 from Add provider. Enter the alias triauth and the display name example.com, and copy the Redirect URI the form shows, https://keycloak.example.com/realms/<realm>/broker/triauth/endpoint with your own address.

  2. Open oidc.triauth.org and enter your domain. Paste the redirect URI and click Connect app. The bridge gives you a client ID and a client secret.

  3. Back in the form, fill in the fields below with your domain in place of example.com, and add the provider. Then, on its Settings tab, set Scopes to openid email profile groups, turn Trust Email on, and save.

    FieldValue
    Use discovery endpointon, with https://oidc.triauth.org/example.com/.well-known/openid-configuration
    Client authenticationClient secret sent as HTTP Basic authentication
    Client ID and Client Secretfrom the bridge
    Use PKCEon, with the method S256
  4. Open the realm's login page and click example.com.

Checkpoint

Keycloak's login page shows a button labelled example.com. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • Everyone with an identity at your domain gets a Keycloak account the first time they sign in, through the realm's first broker login flow. To let only one team in, limit the app to a group when you connect it. The flow's Review Profile step may ask for a first and last name, since the bridge sends one full name. Make those fields optional in the realm's user profile, or turn the step off.
  • The groups published at your domain reach Keycloak through mappers: one Advanced Claim to Group mapper per group, with the claim groups, its value the group's full name such as admins@example.com, and the sync mode Force.
  • Apps can skip Keycloak's login page with kc_idp_hint=triauth, and Hide on login page keeps the button out of sight for everyone else.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-keycloak>/realms/<realm>/broker/<alias>/endpoint, shown read-only on the form
Where in KeycloakAdmin console › the realm › Identity providers, then the provider's Settings and Mappers tabs
Discoverythe discovery endpoint fills the issuer and every address. The path in the issuer is fine
ClientHTTP Basic or request body, both accepted by the bridge, and PKCE S256 on
Leave offLogout URL empty and Backchannel logout off, since the bridge has no sign-out endpoint. Store tokens off. Keycloak would keep the bridge's tokens only for applications that fetch them through its broker API, and its own sessions never depend on them. Accepts prompt=none forward from client off, since the bridge rejects it
Keycloak's Add OpenID Connect provider form with the Redirect URI, Alias, Display name, and Discovery endpoint fields
Keycloak's form for a new OpenID Connect provider. Source: the Keycloak documentation, Apache License 2.0.

Keycloak's identity broker guide explains every field, the first login flow, and the mappers.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.