Configure Keycloak or a generic OIDC provider.
This is the operator guide for wiring the BARRY UI against Keycloak — the default identity provider — or any other standards-compliant OpenID Connect provider (Authentik, Janssen, Auth0). For the concepts behind login and roles, read Authentication & Roles first.
The runtime uses the Backend-for-Frontend pattern: the SPA never sees tokens; the server runs the authorization-code + PKCE flow and issues a session cookie. Users and roles live entirely in Keycloak.
Two modes are supported, both selected by configuration:
The golden rule — one authority URL. The issuer Keycloak stamps into its tokens must equal the authority the server validates against, which must equal the URL the browser is redirected to. Almost every "it bounces back to login" problem traces to these three drifting apart.
All steps below happen inside a dedicated realm (named barry in the examples), not the master realm.
In the Keycloak admin console, create a realm named barry. Its name must match the …/realms/barry segment of the authority URL the runtime uses.
This is the confidential client the server authenticates as.
barry-io-ir (must match the runtime's Oidc:ClientId).…/signin-oidc entry per origin the UI is served from (e.g. https://<ui-host>/signin-oidc, and the local-dev origins).…/signout-callback-oidc entries.+ to mirror the redirect-URI origins.Then open the client's Credentials tab and copy the client secret — this becomes the runtime's Oidc:ClientSecret. Treat it like a password.
Create three realm roles. The names are case-sensitive and must be exactly:
Admin — full control.Operator — operate clients and trigger transports; no settings.Viewer — read-only.You do not need to compose the roles; the runtime treats them hierarchically.
The server reads roles off the ID token, but Keycloak by default emits realm roles only into the access token. Without this step every user lands on the Access-denied page.
In Client scopes → roles → Mappers → realm roles, turn Add to ID token on. Confirm the token claim name is realm_access.roles (the default the runtime expects).
For each user, open Role mapping → Assign role, filter by realm roles, and assign Admin, Operator, or Viewer. The role is read on the user's next sign-in. (You can also federate users from your corporate directory via Keycloak's Identity providers — that is outside this guide.)
The minimum configuration the server needs:
BARRY_AUTH_PROVIDER=Keycloak
BARRY_OIDC_AUTHORITY=<keycloak-base>/realms/barry
BARRY_OIDC_CLIENT_ID=barry-io-ir
BARRY_OIDC_CLIENT_SECRET=<from step 2>
Other useful settings:
Oidc:RoleClaim — defaults to realm_access.roles.Oidc:NameClaim — defaults to preferred_username.Oidc:AdminConsoleUrl — the deep link shown on Settings → Users.The provider is provider-agnostic; only configuration changes for Authentik, Janssen, or Auth0:
/.well-known/openid-configuration).groups claim, for example).Admin / Operator / Viewer.Beyond UI login, a Keycloak service-account client can authenticate the runtime to destinations, so a Keycloak identity reaches cloud storage with no cloud secret stored.
Create a second client (e.g. barry-machine) with Client authentication on and Service accounts roles enabled, and copy its secret. Then:
sub, and whose audience is api://AzureADTokenExchange; grant that app the right Azure role on the storage account or workspace; and add an audience mapper in Keycloak. On the BARRY destination, pick Workload Identity Federation and fill in the Entra tenant/client id and the Keycloak token endpoint and client id/secret.The runtime cannot create the federated credential itself — it is a one-time portal step done by an administrator.
/api/me returns 403 with empty roles — the user has no Admin/Operator/Viewer realm role (step 5), or the roles mapper is not emitting to the ID token.redirect_uri … invalid — the exact UI origin (scheme + host + port) is missing from the client's valid redirect URIs.You are currently viewing a placeholder content from Vimeo. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from YouTube. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou need to load content from reCAPTCHA to submit the form. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Vimeo. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from YouTube. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Bunny Stream. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Wistia. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More Information