Skip to content
Unified Defense StackUnified Defense Stack

Identity & Authorization

UDS Core uses Keycloak as its central identity provider. Applications can own their OIDC or SAML authentication flow and use OAuth2 for delegated authorization, or UDS Core can provide operator-managed Authservice protection at the Istio mesh boundary. Choose the pattern based on the application requirements and the desired ownership boundary.

Authservice is a first-class security option, not only a compatibility mechanism for applications without native SSO. It keeps the browser OIDC implementation and enforcement in the platform, which can reduce application-specific mistakes and maintenance. This separation can provide a stronger security posture when a native integration is difficult to assess or maintain. Native SSO remains appropriate when the application must own public and protected routes, session behavior, or domain-specific authorization.

Applications deployed on regulated platforms should not each maintain independent identity systems or repeat the same authentication implementation. 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 implementation burden: application teams declare SSO requirements in a Package CR; the operator handles client registration and, when Authservice is enabled, the browser OIDC flow and token enforcement

These benefits apply to both native SSO and Authservice. Authservice adds platform-owned browser authentication and mesh-level enforcement without requiring each application to implement that flow.

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

The UDS Operator supports two SSO integration patterns.

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. Native SSO can be the right choice for a mature application with a robust integration and application-specific identity requirements.

Use native SSO when:

  • The application needs to combine public and authenticated routes
  • The application needs to control login, logout, or session behavior
  • The application requires an application-specific machine-authentication flow that cannot use platform-issued tokens
  • The application owns fine-grained authorization or user-management behavior

Authentication and authorization boundaries

Section titled “Authentication and authorization boundaries”

Authservice provides authentication enforcement at the platform boundary. The Package CR can declare group-based access requirements for an SSO client, which UDS Core enforces as a coarse-grained gate during browser-based authentication. Authservice does not replace application user management or fine-grained, domain-specific authorization. After the platform grants access, application teams still own decisions that depend on application data, business roles, resource ownership, or workflow state.

Authservice protection is intended for complete protection of the selected workload. In the current UDS Core implementation, application traffic to a protected workload requires a valid UDS JWT. The operator adds exceptions for configured Prometheus endpoints and the sidecar metrics endpoint. If an application requires unauthenticated routes or a machine-authentication flow that cannot use a Keycloak-issued service-account token, evaluate native SSO or another supported application design before enabling Authservice.

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. During the browser-based authentication flow, an SSO client configured with groups.anyOf: ["/UDS Core/Admin"] will reject users who are not members of that group, even if they are otherwise authenticated. Client-credentials callers are not subject to this restriction; authorize machine identities separately.

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.