triauth for OpenSearch DashboardsOIDC
Let your team open OpenSearch Dashboards with one approval on their own device, and no OpenSearch passwords.
- Sign-in through
- OpenID Connect bridge
- Available in
- Every OpenSearch, with the Security plugin
- Set up in
- opensearch_dashboards.yml and the cluster's config.yml
About OpenSearch Dashboards
OpenSearch Dashboards is the web interface of OpenSearch, the open-source search and analytics engine. Operations teams use it to search logs, watch metrics, and build dashboards and alerts from everything their systems record.
Connect OpenSearch Dashboards to triauth
OpenSearch Dashboards signs people in through the triauth OpenID Connect bridge, with the Security plugin that comes with OpenSearch. Once connected, opening Dashboards sends people straight to the bridge. They type their username and approve on their own device. Nobody keeps an OpenSearch password, and when someone leaves, removing their identity records at your domain ends their access to Dashboards as well.
How it works
Open oidc.triauth.org and enter your domain. Paste the redirect address,
https://dashboards.example.com/auth/openid/loginwith your own Dashboards address in place ofdashboards.example.com, and click Connect app. The bridge gives you a client ID and a client secret.Add the settings below to
opensearch_dashboards.yml. Replaceexample.comwith your domain,dashboards.example.comwith your Dashboards address, and the two placeholders with the client ID and the client secret from the bridge.yamlopensearch_security.auth.type: "openid" opensearch_security.openid.connect_url: "https://oidc.triauth.org/example.com/.well-known/openid-configuration" opensearch_security.openid.client_id: "<client ID from the bridge>" opensearch_security.openid.client_secret: "<client secret from the bridge>" opensearch_security.openid.scope: "openid profile email groups offline_access" opensearch_security.openid.logout_url: "https://dashboards.example.com/" opensearch_security.session.ttl: 43200000In the cluster's security
config.yml, add the sign-in domain below next to the existing ones, with your domain in place ofexample.com, and apply the file withsecurityadminor the Security API.yamlopenid_auth_domain: http_enabled: true transport_enabled: false order: 1 http_authenticator: type: openid challenge: false config: subject_key: sub roles_key: groups openid_connect_url: https://oidc.triauth.org/example.com/.well-known/openid-configuration authentication_backend: type: noopMap the groups published at your domain to OpenSearch roles, under Security › Roles in Dashboards or in
roles_mapping.yml, for exampleadmins@example.comas a backend role ofall_access. Restart Dashboards and open it.
Checkpoint
Opening Dashboards sends the browser to a page from the bridge that asks for the username, and the person's authenticator asks them to approve. Dashboards then opens with the person's identifier shown in the account menu.
Good to know
- OpenSearch creates no accounts. Everyone with an identity at your domain can sign in, and what they can see comes from the role mappings. To let only one team in, limit the app to a group when you connect it.
- The groups published at your domain arrive as backend roles, so one mapping per group gives a whole team its OpenSearch roles.
- Dashboards renews the sign-in through the bridge whenever its short-lived token expires, without anyone noticing. So a changed group reaches OpenSearch at the next renewal, and a removed identity is signed out then.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your-dashboards>/auth/openid/login, with opensearch_security.openid.base_redirect_url set when Dashboards runs behind a reverse proxy |
| Where | opensearch_dashboards.yml for Dashboards, and the Security plugin's config.yml for the cluster, which verifies the tokens itself |
| Discovery | both files take the full discovery address, https://oidc.triauth.org/<your domain>/.well-known/openid-configuration |
| Scopes | space-separated, in place of the usual default openid profile email address phone, and with offline_access so that Dashboards can renew the sign-in. A failed renewal, also one during a bridge outage, sends the person through the sign-in again |
| Session | opensearch_security.session.ttl ends a session after some time without activity, usually an hour, whatever the bridge does. The value above keeps people signed in through a twelve-hour day |
| Sign-out | opensearch_security.openid.logout_url must be set, to any page of your own, since the bridge has no sign-out endpoint and Dashboards builds its sign-out link from one |
| Internal users | keep the basic_internal_auth_domain in config.yml, so that admin and securityadmin keep working |
| User names | subject_key: sub makes the user name the identifier. preferred_username makes it the username instead |
OpenSearch Dashboards keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. OpenSearch's OpenID Connect guide explains every setting in both files.
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 them to OpenSearch roles.
- Read OpenSearch's OpenID Connect guide for every setting the Security plugin offers.
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.