Skip to content

Identity & Authentication

UDS Core centralizes authentication and authorization using Keycloak as the identity provider. When an application supports standard SSO flows — OIDC, OAuth2, or SAML — the UDS Operator automatically registers a Keycloak client for it and delivers credentials to the application namespace. The application handles its own token flow natively, which is the preferred approach.

Authservice is also available for applications that have no native SSO support. It intercepts requests and handles the OIDC flow on the application’s behalf. This is a useful escape hatch, but not the recommended default — if an application can speak OIDC natively, it should.

Applications deployed on regulated platforms cannot each maintain their own user stores or authentication logic. Centralizing identity provides:

  • A single audit trail — all authentication events flow through one system
  • Consistent access control — group membership and role assignments apply uniformly across services
  • Reduced developer burden — application teams declare SSO requirements in a Package CR; the platform handles client registration and token validation

Keycloak is the identity provider. It manages users, groups, and OAuth2/OIDC clients, and federates to external identity providers (Azure AD, Google, LDAP) when teams need to connect an existing directory service.

The UDS Operator automates Keycloak client registration. When a Package CR declares an sso block, the operator:

  • Creates a Keycloak OIDC client with the correct redirect URIs
  • Stores the client credentials in a Kubernetes secret in the application namespace

From there, how SSO works depends on whether the application supports OIDC natively.

Applications that implement OIDC natively use the credentials from the operator-managed secret to speak directly to Keycloak. The application handles login redirects, token validation, and session management itself.

Why this is preferred:

  • The application has full visibility into user identity, roles, and claims
  • Authentication behavior is observable and testable within the application
  • No additional proxy layer to configure or troubleshoot

UDS Core pre-configures two Keycloak groups that drive access to platform admin interfaces:

GroupPurposeWhat it protects
/UDS Core/AdminPlatform administratorsGrafana admin, Keycloak admin console, Alertmanager
/UDS Core/AuditorRead-only platform accessGrafana viewer, log browsing

Application teams can define their own group-based restrictions in their Package CR using the groups.anyOf field. A service protected with anyOf: ["/UDS Core/Admin"] will reject tokens that do not carry membership in that group, even if the user is otherwise authenticated.

UDS Core supports three layers of Keycloak customization, each suited to different use cases:

ApproachUse forRequires image rebuild?
Helm chart valuesSession policies, account settings, auth flow togglesNo
UDS Identity Config imageCustom themes, plugins, CA truststoreYes — themes and plugins apply when the Keycloak pod restarts; no realm re-import needed
OpenTofu / IaCManaging groups, clients, IdPs post-deployNo

Most operational configuration — session timeouts, lockout policies, authentication flows — is handled via Helm chart values without rebuilding anything. Custom themes, plugins, and truststore changes require building and deploying a custom UDS Identity Config image. Post-deploy management of Keycloak resources (groups, clients, IdPs) can be automated with OpenTofu.