← All integrations

Security & Identity · Integration

Embed a Keycloak integration in your product

Add Keycloak to your product for your customers, and give your AI agents governed access to it.

Embed a Keycloak integration so your customers can let your product manage their own identity server instead of an admin working through the console. Each customer grants access to their own realm with only the scopes the actions you enable require, permissions are scoped per tenant, and every call is recorded so an access change can be traced to its source. That is what makes automated provisioning reviewable after the fact.

In your product

Embedded for your customers. Per-tenant auth, customized per customer, monitored by fastn.

  • Let customers create, update, enable, or disable their own Keycloak users from inside your product.
  • Read realms, clients, groups, and roles so your product mirrors each customer's access model.
  • Assign or remove a role or group membership when a permission changes in your product.
  • Read a user's roles and group membership to decide what they may see in your product.

For your AI agents

Governed, audited access for the agents you build, through the MCP server.

  • An agent checks a user's roles and groups before answering an access question.
  • An agent enables or disables an account within governed permissions, with each action audited.
  • An agent grants a role after an approval, so the change is attributable to the request behind it.

Example prompt

List users in this realm with an admin role and show which groups grant it.

Set up Keycloak in 4 steps

  1. 01Open the Keycloak connector from your fastn dashboard.
  2. 02Have each customer authenticate their own Keycloak server with least-privilege client credentials.
  3. 03Map the realms, clients, roles, and user fields your product uses, then enable actions.
  4. 04Call them from your product, or expose them to an agent through the MCP server.

Why teams use the Keycloak integration

  • Ship a Keycloak integration without building it. Your customers connect their own Keycloak account inside your product and work their users, groups and roles there, and nothing lands on your team.
  • Handle the part that actually costs time: the blast radius of an error is large, so least-privilege and auditability are non-negotiable. fastn handles the auth, token refresh, rate limits and pagination, and when Keycloak changes, its maintainer agent proposes a tested fix, so a Keycloak update does not start in your backlog.

Used by these teams

Keycloak integration FAQ

Can AI agents use this Keycloak integration?

Yes, through the fastn MCP gateway, scoped per customer and audited. An agent checks a user's roles and groups before answering an access question. For example: "List users in this realm with an admin role and show which groups grant it."

What permissions does the Keycloak integration need?

Only the scopes required for the actions you enable. Each customer grants access to their own Keycloak tenant, permissions are scoped per tenant, and every call is recorded so an access change can be traced to its source.

Can access changes be automated safely?

Yes. Provisioning and deprovisioning can be driven from your product or an agent within governed permissions, with every action audited, which is what makes automated access changes reviewable after the fact.

What can I build with the Keycloak integration?

A common starting point: create, update, enable, or disable their own Keycloak users from inside your product. The use cases above list the rest.

Add Keycloak to your product

Start free with 3 customer connections. No sales call required, and no per-customer integration code.