triauth for KibanaOIDC
Let your operations and security teams open Kibana with one approval on their own device, and no Kibana passwords.
- Sign-in through
- OpenID Connect bridge
- Available in
- Elastic's paid subscriptions
- Set up in
- elasticsearch.yml and kibana.yml
About Kibana
Kibana is the window into the Elastic Stack. It searches and charts the logs, metrics, and security events that Elasticsearch stores, so operations, security, and product teams watch their systems from one place. Sign-in methods are set up on the Elasticsearch side and appear on Kibana's login page.
Connect Kibana to triauth
Kibana signs people in through the triauth OpenID Connect bridge, as an OpenID Connect realm of Elasticsearch. Once connected, Kibana's login page offers a button with the label you choose. People on your team click it, type their username, and approve on their own device. Nobody keeps a Kibana password, and when someone leaves, removing their identity records at your domain ends their access to Kibana as well.
How it works
Open oidc.triauth.org and enter your domain. Paste Kibana's redirect address,
https://kibana.example.com/api/security/oidc/callbackwith your own Kibana address in place ofkibana.example.com, and click Connect app. The bridge gives you a client ID and a client secret.On the Elasticsearch server, add the settings below to
elasticsearch.yml. Replaceexample.comwith your domain,kibana.example.comwith your Kibana address, and the placeholder with the client ID from the bridge.yamlxpack.security.authc.token.enabled: true xpack.security.authc.realms.oidc.triauth: order: 2 rp.client_id: <client ID from the bridge> rp.response_type: code rp.redirect_uri: https://kibana.example.com/api/security/oidc/callback rp.requested_scopes: [openid, email, profile, groups] op.issuer: https://oidc.triauth.org/example.com op.authorization_endpoint: https://oidc.triauth.org/example.com/authorize op.token_endpoint: https://oidc.triauth.org/example.com/token op.userinfo_endpoint: https://oidc.triauth.org/example.com/userinfo op.jwkset_path: https://oidc.triauth.org/example.com/jwks claims.principal: email claims.groups: groups claims.name: name claims.mail: emailThen store the client secret in the Elasticsearch keystore and restart Elasticsearch:
shbin/elasticsearch-keystore add xpack.security.authc.realms.oidc.triauth.rp.client_secretOn the Kibana server, add the settings below to
kibana.ymland restart Kibana. The second provider keeps the username and password form for the accounts that still need it.yamlxpack.security.authc.providers: oidc.triauth: order: 0 realm: triauth description: Sign in with example.com basic.basic1: order: 1In Kibana, open Stack Management › Security › Role Mappings and add a mapping that gives a role to everyone whose realm is
triauth, or to the members of one of your groups.Open Kibana's login page and click Sign in with example.com.
Checkpoint
Kibana's login page lists Sign in with example.com above the username and password form. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.
Good to know
- Everyone with an identity at your domain can sign in, but Kibana shows them nothing until a role mapping gives them a role. Map roles to the groups published at your domain, and limit the app to a group when you connect it to let only one team in.
- Single sign-on is part of Elastic's paid subscriptions, and Elasticsearch must serve HTTPS for it.
- The new sign-in is for people in a browser. Scripts and services keep signing in to Elasticsearch with their own accounts or API keys.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your-kibana>/api/security/oidc/callback |
| Where | elasticsearch.yml and the Elasticsearch keystore, then kibana.yml, then role mappings in Kibana |
| Addresses | the issuer and the four endpoints go in one by one, as above, since Elasticsearch does not read the discovery document. A path in the issuer is fine |
| Client authentication | rp.client_auth_method stays at its default, client_secret_basic. Elasticsearch does not use PKCE |
| Sign-out | leave op.endsession_endpoint unset, since the bridge has none. Signing out of Kibana ends the Kibana session |
Elasticsearch keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Elastic's OpenID Connect guide explains every setting, including role mapping rules.
Next steps
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to publish teams and map Kibana roles to them.
- Read Elastic's OpenID Connect guide for every setting Elasticsearch and Kibana offer.
All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.