The following worked with Elastic Cloud, Elasticsearch & Kibana v7.6.0. It should be pretty close for other kinds of deployments. Before starting, make sure you have the right license level that allows SAML.
-
Navigate to the SAML apps section of the admin console
-
Click the Add button and choose to "Add custom SAML app"
-
Write down the Entity ID and download the Idp metadata file
-
Choose application name, description and add logo
-
In the "Service Provider Details" screen add the following:
- ACS URL:
https://<kibana url>:9243/api/security/v1/saml
- Entity ID:
https://<kibana url>:9243/
- Start URL:
https://<kibana url>:9243/
- Name ID: Basic Information | Primary Email
- Name ID Format: Email
- ACS URL:
-
Skip attribute mapping and click "Finished"
-
Enable SAML app to be in "On for everyone" status
-
Rename the metadata file to
metadata.xml
-
Place the file in folder named
saml
-
Compress the folder into zip file.
-
Navigate to the custom plugins section under your Elastic account
-
Add a new plugin:
- Plugin name:
<whatever you like, e.g gsuite-saml>
- Version:
*
- Description:
<whatever you like>
- Plugin name:
-
Upload the zip file created above
-
In Kibana navigate to: Managment -> Security -> Role mappings
-
Create a new role mapping:
- Roles: Whatever roles you need
- Add the following mapping rule:
- User filed:
realm.name
- Type:
text
- Value: <realm name from elasticsearch.yml. e.g
gsuite
>
- User filed:
- Under the Elasticsearch deployment configuration go Edit screen
- Enable the
gsuite-saml
plugin under "Elasticsearch plugins and settings" - Paste the content of
elasticsearch.yml
to "User setting overrides" in the Elasticsearch section - Paste the content of
kibana.yml
to "User setting overrides" in the Kibana section - Click Save and wait for the re-deloyment to finish successfully
If everything went smooth, you should be able to point your browser to Kibana and get authenticated with your Google account.
Thank you for this helpful guide!
For the benefit of others, we managed to control Kibana permissions using Custom Schema attributes in Gsuite. So basically, setting a specific value in a user's custom attribute will match a Kibana role (via role mapping):
First, create a new Custom schema attribute for users in your Gsuite environment (in Gsuite admin console).
In your Custom SAML app for Kibana, Include the following

SAML attribute mapping
(we are controlling different permission sets for different Kibana environments too):Add the desired role name in the user's attributes in your Gsuite console:

In the Kibana Role Mapping, add a second rule:
groups
text
superuser
(from the Gsuite user's attribute)Then you can add multiple role mappings, matching the users' attributes on Gsuite according to the permission set you wish to give. To complement this, we also have a simple python script that periodically checks and updates the users' Kibana SSO attributes for members of a given GSuite group (Tech, business etc.), so adding a user to a Gsuite group would give the required Kibana roles automatically.