Cannot find metadata for entity [...] in SAML xml despite it being there


We have been trying to implement SAML authentication on our ELK stack. The kibana version is 6.7.

Despite following the SAML configurations guide and double checking values we are encountering the following issue:

The xml has been acquired from an Enterprise Application that is enabled for SAML single-sign on in our Azure environment.

Google doesn't provide many answers.

Any solutions or information would be greatly appreciated.

                ... 6 more
        Caused by: org.elasticsearch.ElasticsearchSecurityException: Cannot find metadata for entity [
                at ~[?:?]
                at ~[?:?]
                at$parseFileSystemMetadata$10( ~[?:?]
                at ~[?:?]
                at ~[?:?]
                at$getFactories$5( ~[?:?]
                at ~[?:?]
                at<init>( ~[?:?]
                at ~[?:?]
                at ~[?:?]
                at org.elasticsearch.node.Node.lambda$new$11( ~[elasticsearch-6.7.0.jar:6.7.0]
                at$7$1.accept( ~[?:1.8.0_212]
                at java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ~[?:1.8.0_212]
                at ~[?:1.8.0_212]
                at ~[?:1.8.0_212]
                at$ReduceOp.evaluateSequential( ~[?:1.8.0_212]
                at ~[?:1.8.0_212]
                at ~[?:1.8.0_212]
                at org.elasticsearch.node.Node.<init>( ~[elasticsearch-6.7.0.jar:6.7.0]
                at org.elasticsearch.node.Node.<init>( ~[elasticsearch-6.7.0.jar:6.7.0]
                at org.elasticsearch.bootstrap.Bootstrap$5.<init>( ~[elasticsearch-6.7.0.jar:6.7.0]
                at org.elasticsearch.bootstrap.Bootstrap.setup( ~[elasticsearch-6.7.0.jar:6.7.0]
                at org.elasticsearch.bootstrap.Bootstrap.init( ~[elasticsearch-6.7.0.jar:6.7.0]
                at org.elasticsearch.bootstrap.Elasticsearch.init( ~[elasticsearch-6.7.0.jar:6.7.0]

Can you please share your saml realm configuration from elasticsearch.yml and the metadata file?

Aldo please take s look at number 3 here :

Finally, this line seems truncated

Caused by: org.elasticsearch.ElasticsearchSecurityException: Cannot find metadata for entity [

Is it like this in your log or was this truncated on copy paste?

The saml-metadata.xml is located in the /etc/elasticsearch, same folder as elasticsearch.yml.
the line is only truncated in the copy/paste, i have obfuscated it here as well as include a "mydomain" alias in place of our actual dns. We've tried step 3 on the common issues aswell to no avail.
      type: saml
      order: 2
      idp.metadata.path: saml-metadata.xml
      idp.entity_id: ""
      sp.entity_id:  ""
      sp.acs: ""
      sp.logout: ""
      attributes.principal: ""

Can you clarify what you have tried ? Is there an <EntityDescriptor ... entityID="your value here"> in the metadata of the Identity Provider ? Is it exactly the same String as the one you have configured in idp.entity_id: ?

Have you tried making this an absolute path i.e.

idp.metadata.path: /etc/elasticsearch/saml-metadata.xml

Also, does the elasticsearch user have necessary permissions to read this file?

We solved the issue.

It turns out there was a trailing "/" in the metadata file for the entityID value that we did not include in our SAML realm config.

So it was not an exact match.

Thanks for the help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.