Skip to content
Internal tools

Keycloak SSO for internal tools, from Grafana to Vault

Grafana, GitLab, Argo CD, Vault and most other engineering tools speak OpenID Connect or SAML. Point them all at one realm for your staff, fed by your LDAP or Active Directory, and people sign in once, with groups that decide what they may do.

Point here to play
A simplified drawing. The tools are examples: any OIDC or SAML application connects the same way.
The short answer

Create a realm for your staff. Bring people in through LDAP or Active Directory user federation, or broker the company identity provider you already have. Register each tool as a client: Grafana through its generic OAuth settings, GitLab through its OpenID Connect provider, Argo CD through oidc.config, Vault through its OIDC auth method. Add a group membership mapper so every token carries the person’s groups, and let each tool turn groups into its own roles.

How it works

Built from Keycloak’s own parts

Realms, clients, authentication flows and mappers, as the standard admin console has them. Nothing here needs a custom extension.

A realm for your staff

Keep staff in their own realm, apart from any customer realm. Their password policy, two-factor rules and session lengths can then be stricter than a public login’s, without touching your customers.

People reach the realm in one of two ways. Most teams with a directory use user federation. Teams whose staff already live in Microsoft Entra ID or Google Workspace broker that identity provider instead, and use the realm as the hub that every tool trusts.

Users and groups from LDAP or Active Directory

Under User federation, add an LDAP provider and pick Active Directory or your LDAP server as the vendor. Keycloak needs:

  • A connection URL, ideally ldaps:// on port 636.
  • A bind DN and password for a read-only service account.
  • The users DN, and a filter if only some people may sign in. The LDAP filter tool builds one.
  • An edit mode: read only, writable (changes go back to the directory) or unsynced.

Passwords stay in the directory: Keycloak checks them there at each sign-in. A group mapper brings directory groups into the realm, and periodic sync keeps users current.

Your directory must accept connections from your cluster’s region. We do not offer a VPN or private link today, so it needs an address reachable over the internet, with LDAPS and access limited to what you allow. Outbound traffic from your Keycloak is closed by default; we open it to your directory host.

Connecting each tool

Each tool is a client in the staff realm. For OpenID Connect, use a confidential client with the tool’s callback as the only valid redirect URI.

ToolProtocolWhere it is set
GrafanaOpenID ConnectThe generic OAuth section; role_attribute_path maps groups to Grafana roles
GitLabOpenID Connect or SAMLThe openid_connect or saml OmniAuth provider
Argo CDOpenID Connectoidc.config in argocd-cm, groups in argocd-rbac-cm
VaultOpenID ConnectThe OIDC auth method, with a role that sets groups_claim

Every tool reads the realm’s discovery document at https://auth.yourcompany.com/realms/staff/.well-known/openid-configuration. For SAML-only tools, the SAML client generator writes the client for you.

Groups in every token

Create a client scope with a Group Membership mapper, claim name groups, full group path off, and add it to each tool’s client. The tokens then carry:

Part of an ID token
"groups": ["platform", "sre", "readonly"]

Each tool maps those names to its own roles: a Grafana admin, an Argo CD project role, a Vault policy. Removing someone from a group in the directory removes their access everywhere at the next sign-in.

Two-factor sign-in and sessions

Make an authenticator app, a security key or a passkey required for staff, and keep sessions as long as a working day. One sign-in then covers every tool until the session ends, and signing out of the realm ends it everywhere that supports logout. Passkeys and MFA has the details.

Who does what

We run the server. You shape the realm.

RealmDeploy runs
  • A Keycloak cluster that every tool trusts, on your own domain
  • Outbound network rules to your LDAP or Active Directory host
  • Backups with point-in-time restore of the realm and its clients
  • Upgrades, monitoring and on-call
You configure, in the admin console
  • The staff realm, its password policy and two-factor rules
  • User federation, its bind account and group mapper
  • One client per tool, with exact redirect URIs
  • The groups claim and each tool’s role mapping
  • A local admin account in each tool for emergencies
Which plan

Usually Starter

The plans are sized by realms and by active users a month: people who sign in at least once in the month. These are sizing guides, not hard caps.

Fits this jobStarter$199 a month
  • Dedicated Keycloak, 1 replica
  • Up to 2 realms
  • Sized for about 5,000 active users a month
  • Best effort, no uptime SLA
Premium$999 a month
  • High-availability cluster, 2+ replicas
  • Up to 20 realms
  • Sized for about 100,000 active users a month
  • 99.9% monthly uptime SLA
Enterprise$2,499 a month
  • Larger high-availability cluster
  • Up to 100 realms
  • Sized for about 500,000 active users a month
  • 99.95% monthly uptime SLA

Starter is sized for about 5,000 active users and 2 realms, which covers most staff directories. It runs one Keycloak replica with no uptime SLA, so keep each tool’s local admin account for emergencies. Choose Premium, with two or more replicas and a 99.9% SLA, when sign-in to Vault or Argo CD must stay up during an incident, or when one cluster also serves your customers.

Every plan, feature by feature

Questions

Frequently asked questions

Do people need new passwords?

No, not with LDAP or Active Directory federation. Keycloak checks each password against the directory, so people keep the one they have.

Can our directory stay on a private network?

Not today. We do not offer a VPN or private link, so your directory must accept LDAPS connections from your cluster’s region. If it cannot, broker your company identity provider instead.

Can Keycloak write back to Active Directory?

Yes, in writable mode: changes made in Keycloak, such as a new password, go back to the directory. Most teams keep it read only and manage people in the directory.

We already use Microsoft Entra ID or Google Workspace. Do we still need this?

Only if a realm helps you: one place for groups and two-factor rules across tools, or tools your provider does not connect to. Broker your provider as an identity provider and point the tools at the realm.

Can it sign us in to Kubernetes?

A Kubernetes API server you run can trust the realm as an OpenID Connect issuer, with the groups claim for its role bindings. Managed services each have their own way to add an OIDC issuer.

What if Keycloak is down?

On Starter there is one replica and no SLA, so plan for it: keep a local admin in each tool. Premium and Enterprise run two or more replicas, and patch upgrades replace one pod at a time.

Run it on a cluster of your own

Order a realm in the dashboard, or write to us first about what you are building.