Keycloak vs Authelia for Grafana SSO

Keycloak is the better fit for Grafana SSO when you need a full identity provider, LDAP or Active Directory federation or SAML on Grafana Enterprise. Authelia fits a small HTTPS stack, but its Grafana guide is community-supported and relies on a documented workaround.

On this page

Keycloak vs Authelia for Grafana SSO: which one fits your setup

Choose Keycloak when Grafana is one of several applications that need a full identity provider, and you want the path Grafana documents. Grafana's Keycloak guide configures the [auth.generic_oauth] section with auth_url, token_url and api_url pointing at your Keycloak realm, then maps Keycloak claims to Grafana's email, login, name, role_attribute_path and groups attributes. Keycloak also brings the pieces a reverse-proxy authenticator does not: SAML 2.0 clients, LDAP or Active Directory federation and an admin console your identity team can operate. Keycloak is the stronger choice if you expect to add SAML sign-in to Grafana, which Grafana documents for Grafana Enterprise and Grafana Cloud.

Choose Authelia when Grafana is one service in a small stack that already serves everything over HTTPS, and your team can accept a community-supported integration. Authelia's Grafana OpenID Connect guide was tested with Authelia v4.39.28 and Grafana v13.1.0, but its Known Bugs section says Grafana does not honor the standard claims retrieval process, so the guide relies on a documented configuration escape hatch. Before you commit, have someone sign in with a test user and confirm that the role Grafana assigns matches the claims Authelia sends. Repeat that test on every Grafana upgrade, since the workaround depends on how Grafana reads claims. Authelia only works over HTTPS, so plan your certificates before you start.

Grafana's edition decides which login and team sync options you can use, and that often matters as much as the identity provider itself. Team sync for Keycloak is available in Grafana Enterprise and Grafana Cloud, and SAML authentication sits in the same tier, so open source Grafana gives you OAuth 2.0 and OIDC sign-in through Generic OAuth without provider-driven team membership. Confirm your Grafana edition and its license terms with your Grafana account team before you design group mapping. The general comparison of Keycloak and Authelia, including licensing and operating effort, is covered on its own page, so this section stays with what Grafana requires from the identity provider.

Grafana SSO options side by side for Keycloak and Authelia

This table compares what Grafana needs from each identity provider, from protocols and documentation status to team sync, SCIM, logout, HTTPS and database requirements. Read each unanswered cell as a question to settle in your own environment, since a missing answer in the documentation is not proof of a missing feature. The main takeaway: Keycloak has a Grafana docs page and documented edition limits, while the Authelia path is a community guide with a known claims workaround.

RequirementKeycloakAuthelia
Protocols with GrafanaOpenID Connect through Grafana's Generic OAuth provider. Keycloak also supports SAML 2.0, but Grafana SAML needs Enterprise or Cloud.OpenID Connect 1.0 through Grafana's Generic OAuth provider. Confirm with Authelia whether you need any other protocol.
Documentation statusGrafana publishes a Configure Keycloak OAuth2 authentication page in its docs.Community-supported OpenID Connect guide in Authelia's docs. Support is community-level, so plan your own test.
Tested versionsKeycloak 26.8.1 is the current release (October 13, 2026). Confirm the Grafana version you run in your own test.Guide tested with Authelia v4.39.28 and Grafana v13.1.0. Authelia v4.39.28 was released September 17, 2026.
Claims and role mappingGrafana's page maps Keycloak claims to email, login, name, role and groups attributes.Guide uses a configuration workaround because Grafana does not honor the standard claims retrieval process. Test role mapping.
Team sync and Grafana editionGrafana's team sync listing for Keycloak names Enterprise and Cloud. Generic OAuth sign-in works in the open source edition.Confirm that the Keycloak team sync listing applies to this Authelia setup. Test group mapping in your Grafana edition.
SCIM provisioningKeycloak has a SCIM API for provisioning users into Keycloak. Grafana's SCIM support is documented for SAML with Entra ID and Okta.The Authelia guide does not cover SCIM provisioning. Confirm the option with Authelia before you plan provisioning.
Single logoutOptional single logout through a signout redirect URL in Grafana's Keycloak configuration. Test it end to end.The guide does not document single logout for Grafana. Confirm the behavior in your own test.
HTTPS requirementNot covered on this page. Confirm your production TLS and hostname requirements with Keycloak's documentation.Required. Authelia's session cookies need HTTPS, and the project does not support plain HTTP.
License and database needsApache-2.0. Production needs a relational database: PostgreSQL 14 to 18, MariaDB, MySQL, Microsoft SQL Server, Oracle Database or Amazon Aurora PostgreSQL.Apache-2.0. Database and storage needs for a Grafana setup are not covered here. Confirm them in Authelia's docs.

What Grafana SSO requires: protocols, editions and provisioning

Start with the login protocol you need, because Grafana's documented paths differ by protocol and by edition. Grafana documents OAuth 2.0 and OpenID Connect sign-in through its Generic OAuth provider ([auth.generic_oauth]), and its Keycloak provider page sets auth_url, token_url and api_url to point at Keycloak. That page maps Keycloak claims to the email, login, name, role (role_attribute_path) and groups attributes, and supports optional single logout through signout_redirect_url. SAML authentication, team sync and active sync are documented only for Grafana Enterprise and Grafana Cloud. If you need SAML or team sync from the identity provider, confirm your Grafana edition before you choose the platform, since Keycloak's SAML 2.0 support only helps if Grafana accepts it in your tier.

Authelia's path into Grafana is OpenID Connect only. Its docs include a community-supported OpenID Connect 1.0 client guide for Grafana, tested with Authelia v4.39.28 and Grafana v13.1.0, and that guide lists a known bug: Grafana does not honor the standard claims retrieval process, so the guide uses a documented configuration escape hatch as a workaround. Have your security team review that workaround before go-live, and retest the group and role mapping after every Grafana upgrade. The sources for this comparison document no SAML path for Authelia, so any SAML requirement, or any need for Grafana's Enterprise team sync, points toward Keycloak. Grafana also documents LDAP and JWT proxy authentication. Confirm which of these your edition and network design allow before you assume either provider covers them.

How the Grafana SSO setup differs between Keycloak and Authelia

Grafana's Keycloak page configures sign-in through the Generic OAuth provider, which lives in the [auth.generic_oauth] section of Grafana's configuration. You point auth_url, token_url and api_url at your Keycloak realm, so Grafana sends users to Keycloak to sign in, exchanges the returned code for tokens and reads the user profile from the API endpoint. Take the exact endpoint paths from the Grafana Keycloak guide and match them to your own hostnames.

  • OpenID Connect client: Create an OpenID Connect client for Grafana in the Keycloak realm, with the redirect URI that Grafana's page specifies. Store the client secret in a secrets manager and keep it out of version control.
  • Endpoint block: Set the client credentials and the three endpoint keys in the Generic OAuth block so that every URL points at the same Keycloak realm.
  • Claim mapping: Grafana's page maps Keycloak claims to the email, login, name, role (role_attribute_path) and groups attributes, so the claim names must match what your realm emits.
  • Optional sign-out: signout_redirect_url enables single logout to Keycloak. Leave it unset if you do not need logout to reach the identity provider.

Confirm the claim names and the redirect URI against the Grafana version you plan to run before you move the configuration to production.

Which hand-offs in the Grafana login flow need checking?

The diagram starts when a user opens Grafana, which redirects the browser to the identity provider's authorization endpoint. After the user signs in, the provider returns a code to Grafana. Grafana exchanges that code at the token endpoint, reads user details from the API endpoint, and maps email, login, name, role and groups. Check two points: the optional single logout through signout_redirect_url, which the Grafana Keycloak page documents, and the claims workaround in Authelia's Grafana guide, which exists because Grafana does not honor the standard claims retrieval process.

Grafana login sequence with the Keycloak logout and Authelia claims checkpoints marked.

Why the Authelia Grafana guide needs a claims workaround

The Authelia Grafana guide has a Known Bugs entry that changes how you should judge its role and group mapping. The entry says Grafana does not honor the standard claims retrieval process, so the guide uses a documented configuration escape hatch to get identity data into Grafana. The guide is labeled community-supported and was tested only with Authelia v4.39.28 and Grafana v13.1.0. Read the Authelia Grafana OpenID Connect guide and its Known Bugs section before you commit, and ask who will maintain the workaround if it breaks after an upgrade. Treat the workaround as part of your production configuration and record it in your change documentation.

Role and group mapping is where the workaround shows up in daily use. Grafana's Keycloak page maps Keycloak claims to the role_attribute_path and groups attributes, so a mismatch can mean a user signs in with the wrong Grafana role or without the team memberships they expect. Before go-live, create one test user per Keycloak group, sign in to Grafana with each one, and record the role and team result. Team sync for Keycloak is marked available in Grafana Enterprise and Grafana Cloud, and open source Grafana does not include it, so confirm your edition before you plan group-based team membership. Repeat the same test after every Grafana or Authelia upgrade, because the workaround sits on a claims path that both products control.

The Keycloak side needs the same scrutiny, but the evidence differs. The Keycloak page in Grafana's docs shows no comparable known-bug note, which may mean Keycloak's claims path works without a workaround, though this guide does not establish that. Check the current Grafana release notes for any Keycloak or generic OAuth entries before you assume parity. If Keycloak is your choice, run the same group and role test against a Keycloak realm you control, then compare the results side by side. If an upgrade on either side changes the outcome, the retest should be written into your fixed scope so it is not left to chance. DeployOpen can include that retest in an agreed scope, but the choice of identity provider stays with your team.

How users, groups and roles reach Grafana from each provider

Grafana takes identity from what the provider sends at login and from any directory or sync the provider supports, so the provider decides which accounts, groups and roles arrive and how departures are handled. The four cards below separate these items because each has a different owner and a different license condition. Where the documentation does not settle a point for Authelia, the card names what to confirm.

User accounts and directories

Keycloak keeps its own user store and can federate users from LDAP or Active Directory, so accounts can stay in the directory your organization already runs. Its SCIM API lets external systems provision users into Keycloak, and the 26.8 release notes list it as supported. That provisioning feeds Keycloak, and Grafana sees the account when the user signs in. For Authelia, confirm the user backend first: which backend your deployment reads, who maintains accounts there, and how a disabled account is reflected at login.

Keycloak admin guide

Groups and team sync

Grafana's Keycloak page maps a groups attribute from the token, but mapping a claim is a different step from placing users into Grafana teams. Grafana lists team sync for Keycloak as available in Grafana Enterprise and Grafana Cloud, and open source Grafana does not include it. If team membership must follow Keycloak groups, plan for an Enterprise or Cloud license before design starts. For Authelia, the supplied documentation shows no team sync, so confirm with Authelia and Grafana whether group claims can drive team membership on your versions.

Grafana Keycloak page

Role mapping from claims

Grafana documents role_attribute_path on its Keycloak page, so a role claim in the token can set the Grafana role at login. Keep that expression in version-controlled configuration and test it with one user from each group before go-live. Authelia's community guide was tested with Authelia v4.39.28 and Grafana v13.1.0, and its Known Bugs section says Grafana does not honor the standard claims retrieval process. The guide relies on a documented configuration escape hatch, so confirm that workaround on your exact versions before role claims control admin access.

Authelia Grafana guide

Deprovisioning and logout

Grafana's Keycloak page supports optional single logout through signout_redirect_url, so set it if sessions must end at the identity provider. Grafana lists active sync with SAML as an Enterprise and Cloud feature, so do not assume that disabling a Keycloak account removes the user from open source Grafana. Test offboarding before go-live: disable a test account, then confirm how long its Grafana session stays valid. For Authelia, confirm its logout behavior and what happens to open Grafana sessions when a user is disabled.

Grafana Generic OAuth docs

Grafana SSO questions buyers ask before hiring help

What effort drives a Grafana SSO project?

Four workstreams drive the effort: the Grafana edition decision, the identity provider client setup, HTTPS and DNS for both services, and claims and role tests. The edition decision shapes everything else. Grafana's documentation lists SAML, team sync and active sync under Grafana Enterprise and Grafana Cloud. Open source Grafana can still sign users in over OAuth 2.0 and OpenID Connect through the Generic OAuth provider. Client setup covers redirect URIs, client secrets and the scopes Grafana requests. Claims and role tests confirm that email, login, name, role and group attributes map to the right Grafana roles before any team depends on them. The work grows with the number of groups, roles and Grafana environments you need.

How long does a Grafana SSO project take?

The timeline depends on scope, so ask for it as a dated item in the written scope before work starts. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing first. The main drivers are:

  • The number of identity provider clients and Grafana environments, such as development, staging and production.
  • Whether you need Grafana Enterprise features like SAML or team sync, which adds the edition decision and its licensing step.
  • How much group and role design exists before the work starts.
  • Whether DNS names, TLS certificates and HTTPS endpoints are ready.
  • How many claims and role test cases your security or compliance reviewers expect, and how many review rounds they need.

Ask the proposal to show milestones, buyer responsibilities and the retest step.

What does the buyer need to provide for Grafana SSO?

The buyer provides access, decisions and reviewers. Access means admin rights on the identity provider, Keycloak or Authelia, to create the client and claim mappings, plus admin rights on Grafana to change its authentication settings and check role results. Decisions cover which groups map to which Grafana roles, who owns that mapping after handover, and which users are in scope for SSO. Infrastructure inputs include DNS names and TLS certificates for Grafana and the identity provider, and a test environment where sign-in can be tried safely. Finally, name a reviewer from security or compliance who can approve the role design and the test results before the project closes.

Can our own team set up Grafana SSO without a partner?

Your own team can set up the OIDC path with Keycloak if it has identity and Grafana administration skills, but SAML and team sync sit outside open source Grafana, and Authelia needs a workaround.

  • Keycloak: Grafana's Keycloak page documents the Generic OAuth setup with auth_url, token_url and api_url, maps claims to email, login, name, role and groups, and offers optional single logout through signout_redirect_url.
  • Authelia: its Grafana OpenID Connect guide is community-supported, was tested with Authelia v4.39.28 and Grafana v13.1.0, and its Known Bugs section says Grafana does not honor the standard claims retrieval process, so the guide relies on a configuration escape hatch.
  • Both paths: HTTPS is required on the identity side, and your team still has to prove the claims and role mappings with its own tests.
What are the cost components of Grafana SSO?

The cost has four parts: the identity software, the Grafana edition, the infrastructure you run, and the people who build and operate it. Keycloak and Authelia are both Apache-2.0 software, so the identity server itself carries no license fee. Grafana Enterprise is a separate edition, and its licensing should be confirmed with Grafana before you choose SAML or team sync. Keycloak needs a relational database in production, and PostgreSQL 14 to 18 is among the supported options. Implementation is a separate cost: DeployOpen quotes follow the written scope, and DeployOpen does not publish a price list. One-time costs are design, build and testing. Recurring costs are hosting, upgrades, the Grafana subscription and any support retainer. Ask each quote to list deliverables, environments, role count, retest and handover.

What changes if we switch identity providers later?

Switching later changes how Grafana identifies each user, so plan a full retest. A new identity source can change user identifiers and claims, which means email, login, name, role and group values may arrive in a different form. Existing Grafana accounts and role mappings may then fail to match or land on the wrong role. Before a switch, export the current claim names and group mappings, confirm with Grafana how existing users are matched, and rebuild the role mappings in the new provider. Then retest every role, sign-in, sign-out and group path with test accounts, and keep the old provider available until the retest passes. A move away from an Authelia workaround setup also needs the configuration escape hatch reviewed.

Which identity provider should we pick for Grafana SSO?

Choose Keycloak when Grafana is one of many applications and you need a full identity provider with an admin console, federation and SAML. Choose Authelia when you want a lightweight companion in front of reverse-proxied services and can accept a community-supported Grafana guide and a documented workaround.

  • Keycloak: suits a shared identity layer with SAML, LDAP or Active Directory federation and a SCIM API for provisioning. Grafana's SAML support still requires Enterprise.
  • Authelia: suits forward authentication for web services behind a reverse proxy, and it works only over HTTPS because its session cookies require it.

Confirm either choice against your Grafana edition, your claims tests and the team that will run the identity service.

How DeployOpen sets up Grafana SSO without favoring either provider

DeployOpen scopes, builds and documents Grafana sign-in in your own infrastructure for either Keycloak or Authelia, so the choice follows your protocol, user store and operating requirements. The written scope names the protocol, identity provider settings, Grafana configuration, and claim and role mapping before work starts. Each option carries different limits for Grafana, so the scope records those limits as agreed decisions.

How we scope

  • Written scope that names Keycloak or Authelia as the identity provider for Grafana before work starts.
  • Scope records your Grafana edition, because SAML, team sync and active sync need Enterprise or Cloud.
  • Most engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • Map Keycloak or Authelia claims to Grafana email, login, name, role and groups attributes, then test each mapping.
  • For Keycloak, configure the Generic OAuth provider with auth_url, token_url and api_url pointing at your Keycloak OpenID Connect endpoints.
  • For Authelia, follow its community-supported OpenID Connect guide and document the escape-hatch workaround for the Grafana claims retrieval bug.

How we hand over

  • Written documentation of the Grafana configuration, claim and role mappings, and any Authelia workaround, for your admins.
  • Test sign-in, role assignment and logout, including signout_redirect_url if you enable single logout.
  • Confirm HTTPS on every Grafana and Authelia hostname, since Authelia session cookies require it, before go-live.

How we support

  • Retainers can cover ongoing support, upgrades and continuous testing for Grafana and the chosen identity provider.
  • Keycloak plans four minor releases a year, so schedule a test run for each upgrade.
  • Authelia and Grafana upgrades each need a sign-in regression check, because the Authelia guide is community-supported.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.