website/integrations/platforms/elastic-cloud/index.mdx
Elastic Cloud is a hosted service for Elasticsearch and Kibana.
The following placeholders are used in this guide:
authentik.company is the FQDN of the authentik installation.example.com is a domain you control for Elastic Cloud login.:::info 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. :::
:::caution Elastic Cloud SAML SSO requires an Enterprise subscription and a claimed domain. Users can only authenticate if their email address matches a claimed domain. :::
To support the integration of Elastic Cloud with authentik, create SAML property mappings and an application/provider pair.
You first need to create property mappings to provide the specific SAML attribute names that Elastic Cloud expects.
Email Mapping (required):
emailreturn request.user.email
First name mapping (optional):
firstNamereturn request.user.name.split(" ", 1)[0] if request.user.name else ""
Last name mapping (optional):
lastNamereturn request.user.name.rsplit(" ", 1)[-1] if request.user.name else ""
Groups mapping (optional, required for role mappings):
groupsfor group in request.user.groups.all():
yield group.name
Log in to authentik as an administrator and open the authentik Admin interface.
Navigate to Applications > Applications and click Create with Provider to create an application and provider pair.
https://placeholder.invalid/acs). You will replace this after Elastic Cloud provides the real ACS URL.https://authentik.company.Post.https://placeholder.invalid/sp). You will replace this after Elastic Cloud provides the real service provider entity ID.authentik default SAML Mapping: Email.Click Submit to save the new application and provider.
To support the integration of authentik with Elastic Cloud, you need to claim your email domain and configure/enforce SSO in Elastic Cloud.
example.com._elastic_domain_challenge.example.com, to your DNS provider's configuration.https://authentik.companyhttps://authentik.company/application/saml/<application_slug>/sso/binding/post/mycorp-authentik-sso in cloud.elastic.co/sso/login/mycorp-authentik-sso). Use lowercase letters, numbers, and hyphens.https://cloud.elastic.co/login/sso/<login_identifier_prefix>) as the launch URL for users.Elastic Cloud requires the first role mapping in a SAML SSO configuration to include the Organization owner role. Make sure the groups SAML attribute mapping is enabled in authentik.
Organization Owner.groups attribute (for example, elastic-org-owners).Elastic Cloud requires the Organization owner role to be mapped to a group present in the SAML response before the role mapping can be saved.
:::caution IdP initiated sign in not supported Elastic Cloud does not support IdP-initiated SSO. Use the Elastic SSO Login URL to start sign-in. :::
Sign out of Elastic Cloud, click SSO on the login page, enter an email address that matches your claimed domain, and click Log in. You should be redirected to authentik and once authenticated, logged in to Elastic Cloud and have access to the organization.