Skip to main content

Configure OpenSearch SSO with Authentik

ClusterNest Managed OpenSearch can delegate Dashboards login to Authentik over either OIDC or SAML. Pick one - auth_type accepts only a single mode per cluster.

You'll need your cluster's OpenSearch Dashboards hostname before registering the app in Authentik. Set opensearch_dashboards_custom_hostname so you know it upfront, or create the cluster first with auth_type = "internal" and note the generated opensearch_dashboards_url output before switching it over.

OIDC

Authentik's default ID token doesn't include a groups claim unless the groups scope is attached to the provider - without it, drop roles_key and rely on OpenSearch's internal role mapping by username (subject_key, default preferred_username) instead.

  1. In Authentik, go to Applications > Providers > Create, type OAuth2/OpenID Provider.
    • Client type: Confidential
    • Redirect URIs: https://<dashboards-hostname>/auth/openid/login (Strict, or a regex match if the hostname isn't final yet)
    • Scopes: include openid, email, profile, and add groups if you want role mapping via group membership.
  2. Go to Applications > Applications > Create, give it a slug (e.g. opensearch), and link it to the provider above.
  3. Open the provider again - it now shows the Client ID and Client Secret.

connect_url is https://<authentik-host>/application/o/<app-slug>/.well-known/openid-configuration.

In the ClusterNest console, open the cluster's create/edit form and set Authentication Type to OIDC, then fill in:

  • Connect URL: https://auth.example.com/application/o/opensearch/.well-known/openid-configuration
  • Client ID / Client Secret: from the provider page
  • Roles Key: groups (leave blank to skip role mapping)

See the Terraform resource reference for the full field list.