Using GSuite for SAML integration with Elastic Stack (ElasticSearch + Kibana)


(Chirag Shah) #1

I am trying to use GSuite to integration into my ElasticCloud Stack (ElasticSearch + Kibana) and am stuck at what attribute values to state. According to the documentation:, I have added the below for both elasticsearch.yml and kibana.yml files.


        type: saml
        order: 2
        attributes.principal:        “”
        attributes.groups:           “groups”
        idp.metadata.path:           “”
        idp.entity_id:               “”
        sp.entity_id:                “”
        sp.acs:                      “”
        sp.logout:                   “”

kibana.yml [saml]
server.xsrf.whitelist: [/api/security/v1/saml]
protocol: https
port: 9243

After reading the following: Issue connecting google saml with es stack, I edited the attributes.principal to "urn:oid:0.9.2342.19200300.100.1.1" and that threw an error. I am not sure if I am missing anything.

I've tried the following for attributes.principal:

The Error message I get it is:

instance-0000000009] Metadata Resolver FilesystemMetadataResolver cloud-saml: Metadata provider failed to properly initialize, fail-fast=true, halting Error refreshing metadata during init at org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver.initMetadataResolver( ~[?:?] at org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver.doInitialize( ~[?:?] at ~[?:?] at$initialiseResolver$11( ~[?:?] at Method) ~[?:1.8.0_144] at ~[?:?] at ~[?:?] at ~[?:?] at ~[?:?] at$getFactories$5( ~[?:?] at ~[?:?] at<init>( ~[?:?] at ~[?:?] at ~[?:?] at org.elasticsearch.node.Node.lambda$new$11( ~[elasticsearch-6.5.1.jar:6.5.1] at$7$1.accept( [?:1.8.0_144] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining( [?:1.8.0_144] at [?:1.8.0_144]

Please let me know if you have any thoughts on the above error message. says I need to enter GSuite specific attributes for attributes.principal and attributes.groups. GSuite support says that I can keep attributes.principal to be "nameid:persistent" and attributes.groups to be "groups".

Thank you!

(Ioannis Kakavas) #2

Please don't post unformatted configurations and logs as they're very hard to read.

Instead paste the text and format it with </> icon, and check the preview
window to make sure it's properly formatted before posting it. This makes it
more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

(Ioannis Kakavas) #3

This error doesn't have to do with your attribute mapping. It means that Elasticsearch cannot load your metadata from GSuite's Identity Provider. Reading through their instructions it doesn't look like they host their metadata on an URL that can be accessible and the you have used is the SSO URL.

Since this is actually not ECE ,you can take a look at our documentation, see step 7 here

Tbe following would apply for elastic cloud enterprise:

You need to download the SAML Metadata XML Document from GSuite and use that as follows:

  1. Prepare a ZIP file with a custom bundle that contains your Identity Provider’s metadata ( metadata.xml ) inside of a saml folder. This bundle allows all Elasticsearch containers to access the metadata file.

  2. Update your Elasticsearch cluster with the advanced configuration editor to use the bundles you prepared in the previous step. You need to modify the user_bundles JSON attribute similar to the following example:

    { "cluster_name": "xxxxxxx", 
      "plan": { 
       "elasticsearch": { 
         "version": "6.4.1", 
         "user_bundles": [ 
              "name": "saml-metadata", 
              "url": "",
              "elasticsearch_version": "6.4.1"

    Custom bundles are unzipped under the path /app/config/BUNDLE_DIRECTORY_STRUCTURE , where BUNDLE_DIRECTORY_STRUCTURE is the directory structure in the ZIP file. Make sure to save the file location where custom bundles get unzipped, as you will need it in the next step.
    In this example, the SAML metadata file will be located in the path /app/config/saml/metadata.xml :

  3. Adjust your saml realm configuration accordingly:

    idp.metadata.path: /app/config/saml/metadata.xml