Skip to content

triauth for KibanaOIDC

Let your operations and security teams open Kibana with one approval on their own device, and no Kibana passwords.

  • Dashboards and monitoring
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

  1. Open oidc.triauth.org and enter your domain. Paste Kibana's redirect address, https://kibana.example.com/api/security/oidc/callback with your own Kibana address in place of kibana.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. On the Elasticsearch server, add the settings below to elasticsearch.yml. Replace example.com with your domain, kibana.example.com with your Kibana address, and the placeholder with the client ID from the bridge.

    yaml
    xpack.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: email

    Then store the client secret in the Elasticsearch keystore and restart Elasticsearch:

    sh
    bin/elasticsearch-keystore add xpack.security.authc.realms.oidc.triauth.rp.client_secret
  3. On the Kibana server, add the settings below to kibana.yml and restart Kibana. The second provider keeps the username and password form for the accounts that still need it.

    yaml
    xpack.security.authc.providers:
      oidc.triauth:
        order: 0
        realm: triauth
        description: Sign in with example.com
      basic.basic1:
        order: 1
  4. In 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.

  5. 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

SettingValue
Redirect addresshttps://<your-kibana>/api/security/oidc/callback
Whereelasticsearch.yml and the Elasticsearch keystore, then kibana.yml, then role mappings in Kibana
Addressesthe 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 authenticationrp.client_auth_method stays at its default, client_secret_basic. Elasticsearch does not use PKCE
Sign-outleave 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

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.