Integrate with Kibana
Support level: Community
What is Kibana?
Explore and visualize data stored in Elasticsearch with Kibana. Build dashboards, run queries, set alerts, and manage your deployment — all in one UI.
Kibana signs users in through an OpenID Connect realm in Elasticsearch, so this guide configures both. It covers self-managed deployments. For Elastic Cloud organizations, refer to the Elastic Cloud integration guide.
Preparation
The following placeholders are used in this guide:
kibana.companyis the FQDN of the Kibana installation.authentik.companyis the FQDN of the authentik installation.
This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.
OpenID Connect authentication requires a Platinum or Enterprise license. Under a Basic license, Elasticsearch disables the OpenID Connect realm. You can evaluate this integration with a trial license.
authentik configuration
To support the integration of Kibana with authentik, you need to create an application/provider pair and application entitlements in authentik.
Create an application and provider
In authentik versions earlier than 2026.5, all Redirect URIs are automatically treated as Authorization type. If you are using one of these older authentik versions, add only the Authorization URL to your Redirect URIs and do not configure a Post Logout URI.
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Applications and click New Application to open the application wizard.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the Slug value because it is required later.
- Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Note the Client ID and Client Secret values because they are required later.
- Add a Redirect URI of type
StrictAuthorizationashttps://kibana.company/api/security/oidc/callback. - Add a Redirect URI of type
StrictPost Logoutashttps://kibana.company/security/logged_out. - Select any available Signing Key.
- Under Advanced protocol settings > Selected Scopes, add
authentik default OAuth Mapping: Application Entitlements.
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
- Click Submit to save the new application and provider.
Create application entitlements
Elasticsearch reads the entitlement names from the entitlements claim as groups, and role mappings grant Elasticsearch roles to those groups.
- Open the application that you created in the authentik Admin interface.
- Click the Application entitlements tab.
- Create an entitlement for each level of access, such as
kibana-admin. - Bind the users or groups that should receive that access to each entitlement.
Kibana configuration
Add an OpenID Connect realm to Elasticsearch
The OpenID Connect realm uses the Elasticsearch token service, which requires TLS on the Elasticsearch HTTP layer. The authentik URLs must use HTTPS.
-
Add the following realm to
elasticsearch.ymlon every node. Keep your existing realms, and give the OpenID Connect realm a higherorderthan the native realm that Kibana's own user signs in with.config/elasticsearch.ymlxpack.security.authc.token.enabled: truexpack.security.authc.realms.oidc.authentik:order: 2rp.client_id: <Client ID from authentik>rp.response_type: coderp.redirect_uri: https://kibana.company/api/security/oidc/callbackrp.post_logout_redirect_uri: https://kibana.company/security/logged_outrp.requested_scopes: [profile, email, entitlements]op.issuer: https://authentik.company/application/o/<application_slug>/op.authorization_endpoint: https://authentik.company/application/o/authorize/op.token_endpoint: https://authentik.company/application/o/token/op.userinfo_endpoint: https://authentik.company/application/o/userinfo/op.endsession_endpoint: https://authentik.company/application/o/<application_slug>/end-session/op.jwkset_path: https://authentik.company/application/o/<application_slug>/jwks/claims.principal: preferred_usernameclaims.groups: entitlementsclaims.mail: emailclaims.name: nameIf the authentik certificate is not signed by a public CA, add
ssl.certificate_authoritieswith the path of the CA certificate, relative to the Elasticsearch configuration directory, to the realm. -
Add the client secret to the Elasticsearch keystore on every node:
bin/elasticsearch-keystore add xpack.security.authc.realms.oidc.authentik.rp.client_secret -
Restart Elasticsearch.
Map entitlements to roles
Create a role mapping for each entitlement. For example, the following request grants the superuser role to users with the kibana-admin entitlement. Run it in Kibana under Dev Tools > Console, or with any Elasticsearch client, as a user with the manage_security privilege.
PUT /_security/role_mapping/authentik-kibana-admin
{
"roles": ["superuser"],
"enabled": true,
"rules": {
"all": [
{ "field": { "realm.name": "authentik" } },
{ "field": { "groups": "kibana-admin" } }
]
}
}
Users who sign in without any mapped entitlement are authenticated but receive no roles, and Kibana refuses them.
Configure Kibana
Add the OpenID Connect provider to kibana.yml and restart Kibana. The basic provider keeps the username and password login available as a second option.
server.publicBaseUrl: https://kibana.company
xpack.security.authc.providers:
oidc.authentik:
order: 0
realm: authentik
description: Log in with authentik
basic.basic1:
order: 1
Configuration verification
To confirm that authentik is properly configured with Kibana, open Kibana and click Log in with authentik. After you log in to authentik, Kibana opens. Click the user menu and select Edit profile to confirm the roles that your entitlements granted.