Automatically pull user attributes, realm roles, client roles, and group memberships from Keycloak into Cerbos policy evaluations, no application code changes required.
Automatically enrich authorization requests with user profiles, realm roles, client roles, and group memberships from Keycloak
Configurable TTLs cache enrichment results to balance data freshness against evaluation latency
Identity enrichment happens at the policy layer, your application code stays clean
Authorization decisions are only as good as the data behind them. Keycloak provides real-time context (user profiles, group memberships, or external attributes) that makes Cerbos policies richer and more accurate.
Cerbos lets you write fine-grained, context-aware authorization policies in human-readable YAML. With Keycloak as a context source, those policies can evaluate attributes beyond what's in the initial request.
Because enrichment happens at the policy layer, your application code stays clean, no custom plumbing to fetch and merge identity data before making authorization calls.
Keycloak's user store contains far more identity data than what fits in a JWT, including nested group hierarchies, client-specific roles, and custom user attributes. Cerbos identity enrichment bridges this gap by pulling the full user profile from Keycloak into every authorization decision.
When a user's roles or group memberships change in Keycloak, whether they switch teams, gain new client roles, or are removed from a group, those changes are reflected in Cerbos authorization decisions without a token refresh or application redeployment. Your policies always operate on current directory data.
Keycloak identity enrichment is available as part of Cerbos enterprise. Talk to us to learn more about enriching your authorization decisions with Keycloak data.
Cerbos queries the Keycloak Admin API at evaluation time to fetch the user's full profile, realm roles, client roles, and group memberships. This data is available as principal attributes in your policies, enabling rules based on any Keycloak user property.
The authentication integration uses whatever claims are in the Keycloak-issued JWT. Identity enrichment goes further, it fetches the full user profile from Keycloak's directory at authorization time, giving your policies access to data beyond what fits in a token, including nested group paths and user attributes that may not be mapped to token claims.
Yes. Cerbos caches enrichment data with configurable TTLs to balance freshness and performance. When a user's roles or group memberships change in Keycloak, those changes are reflected in Cerbos decisions once the cache expires, without a token refresh or application redeployment.


What is Cerbos?
Cerbos is an end-to-end enterprise authorization software for Zero Trust environments and AI-powered systems. It enforces fine-grained, contextual, and continuous authorization across apps, APIs, AI agents, MCP servers, services, and workloads.
Cerbos consists of an open-source Policy Decision Point, Enforcement Point integrations, and a centrally managed Policy Administration Plane (Cerbos Hub) that coordinates unified policy-based authorization across your architecture. Enforce least privilege & maintain full visibility into access decisions with Cerbos authorization.