Keycloak and Dome
Your Keycloak realm and groups are checked on every agent call. An agent sends the user's Keycloak token with each call. Dome verifies it against your realm, and rules decide on that person's groups. Audit records the agent and the person, every time.
Dome provides verified identityand access control with Keycloak.
Verified against your realm
Dome checks each token's signature against the realm's keys, its issuer and its expiry. A token from another realm fails the issuer check.
Rules read group paths
With a group membership mapper, the person's groups reach every rule. Full paths keep /engineering/platform apart from /sales/platform.
Self-hosted is fine
Dome fetches your realm's discovery document over HTTPS. The realm needs a public URL Dome can reach.
Keycloakin three steps.
Register your realm with Dome, map groups into the token, and have the agent pass the token on. Dome needs no Keycloak credentials of its own.
Register your realm as a verification provider
The issuer is the realm URL. Keycloak releases before 17 serve it under /auth/realms instead.
shelldome verification-providers create \ --name corporate-keycloak \ --method oidc \ --oidc-url https://<host>/realms/<realm> \ --oidc-expected-audience <client-id>Map groups into the token
Add a group membership mapper named groups to the client, on the access token. Dome reads realm roles from realm_access as they are.
Pass the user's token with each call
The agent keeps its own Dome key and adds the person's Keycloak token as a header.
pythonfrom openai import OpenAI client = OpenAI( base_url=f"{GATEWAY_URL}/v1", api_key=DOME_AGENT_KEY, default_headers={"X-Dome-Act-As": user_keycloak_token},)
A ruleon a Keycloak group.
Only people in /engineering/platform may have an agent merge a pull request. The group path comes straight from their token.
cedar
forbid (principal, action == Dome::Action::"mcp:call", resource is Dome::MCPTool)when { resource.connection_name == "github" && resource.tool_name == "merge_pull_request"}unless { principal has act_as && principal.act_as.groups.contains("/engineering/platform")};One call,two outcomes.
Switch the caller or the argument and watch the same call decide differently, with every decision landing in audit.
Acting for
agent release-agent · acting as k.brandt
github/merge_pull_request(owner: "acme", repo: "infra", pullNumber: 1207)
- CallerToken verified against corporate-keycloak
- Groups/engineering/platform
- RuleMerges are open to /engineering/platform
DecisionAllowed
Bringing it alltogether.
Connecting Keycloak to registered agents, tools, and models in Dome completes a governed agent application.
Acting for
KeycloakIdentity
Agent
Control point
GatewayEvery call decided and audited
RulesGuardsQuotas
Tools
Models
Common questionsabout Keycloak.
More of whatDome works with.
Model
Claude Fable
Fable 5.1 from Anthropic and Amazon Bedrock in one failover pool, open to one group and capped by quota.
Provider
Anthropic
The Claude API behind the Model Broker: the key held in Dome, every call authorized, metered and audited.
MCP server
Atlassian
The Atlassian Rovo MCP server behind the Tool Gateway, with rules that decide each Jira and Confluence call on its tool and site.
Runtime
OpenAI Agents SDK
OpenAI Agents SDK agents with their models on the Model Broker and their MCP tools on the Tool Gateway.
Client
Claude Code
Claude Code on a Dome Gateway with per-developer sign-in, rules on every tool call, and audit by name.
Agent service
TinyFish
TinyFish's web agents behind the Tool Gateway, with rules that decide each run on the site it targets.
Talk with ourFDE team.
Or start free, and register your first agent in minutes. Connect it through a gateway, give it rules, and see every call it makes in one audit trail.
Talk with our FDE team
Our engineers design, build and run governed agents for the part of your business you want to change. You see what they deliver.
Identity providers for AI agents: a verified person on every call
Your identity provider already knows your people. Dome verifies that identity on every agent call, so rules and audit name the person an agent acted for.