Hi Guys,
i am using kibana and elasticsearch version 7.6.2 free version and trying to enable SAML 2.0 on elasticsearch and kibana. Mentioned below are the configuration files that i am using:
elasticsearch log trace: [node1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-7][0]]]).
kibana log trace: Jun 08 10:45:47 elk kibana[158693]: {"type":"log","@timestamp":"2020-06-08T10:45:47Z","tags":["fatal","root"],"pid":158693,"message":"Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch\n at Object.createSecureContext (_tls_common.js:156:17)\n at Server (_tls_wrap.js:873:27)\n at new Server (https.js:62:14)\n at Object.createServer (https.js:85:10)\n at module.exports.internals.Core._createListener (/usr/share/kibana/node_modules/hapi/lib/core.js:491:79)\n at new module.exports.internals.Core (/usr/share/kibana/node_modules/hapi/lib/core.js:112:30)\n at new module.exports (/usr/share/kibana/node_modules/hapi/lib/server.js:25:18)\n at createServer (/usr/share/kibana/src/core/server/http/http_tools.js:106:18)\n at HttpServer.setup (/usr/share/kibana/src/core/server/http/http_server.js:76:48)\n at HttpService.runNotReadyServer (/usr/share/kibana/src/core/server/http/http_service.js:152:26)\n at HttpService.setup (/usr/share/kibana/src/core/server/http/http_service.js:74:18)"}
You never mentioned what your question is. Please take the time to fully structure your question with at mininum:
what you are trying to do
what you have done already
what do you expect to happen
what happens instead
what is the actual error you are getting, where and after which action
The kibana error I can see in your logs is unrelated to saml and is exactly what it says: your server.ssl.key doesn't correspond to server.ssl.certificate. In ssl, the ssl certificate binds a public key to a subject and that public key must be the from the same keypair as the private key.
I'm not sure if you'll be able to do this. SSO is a feature included in the platinum license and above whereas I am assuming you are using the basic (free) license?
It would be nice if this information was included in the docs next to the sso documentation. I implemented sso only to be met with an error message saying I needed the platinum license.
Hi, i have installed elastic search and kibana 7.6.2 free version on my local machine inside docker container.
i have configured saml 2.0 configuration on elasticsearch.yml file as you can see in the config file.
both elasticsearch and kibana yml files are pasted in question detail.
elasticsearch instance run fine. but when i try to run kibana service it gives me mentioned below error.
Well i have changed both elasticsearch.yml and kibana.yml. now i am able to enable https and communication is all done on ssl:
now when i try to https://localhost:5601/ it changes the url to https://localhost:5601/api/security/saml/start?redirectURLFragment=
and gives error {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"} by the way i have configured SAML auth provider in both kibana.yml and elasticsearch.yml
Moreover i have download SSO_PROVIDER_metadata.xml from the IDP provider website. Please also confirm if i am using correct file or i need to download or generate it from somewhere?
Now when i hit https://localhost:5601/ url in my browser i am getting mentioned below error: FBTSML238E The SAML message signature could not be validated.
using bin/elasticsearch-certutil utility i have generated instance.crt, ca.crt, instance.key
following is my elasticsearch.yml file configuration
TFIM cannot verify the signature of the SAML authentication request that we are sending. We can't know why from our side, as far as we know there is no bug with our SAML request signing. You should talk to your TFIM administrator and figure out if there is more in IBM's logs or if there is a known bug and a fixpack you can apply there.
this is strict requirement that we need to sign each saml payload. I mean every in/out should be signed.
I believe there must be signature tag that would identify that saml request is signed or not. In my request payload i dont any tag. Please confirm if the mentioned below request is signed or not.
We sign all messages when you configure signing material, so it is signed. I dont know where you copy this request from but Http-redirect binding doesn't use enveloped signatures so you shouldn't expect to see a signature element in there. Read 3.4.4.1 of https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf
the shared saml request is generated when i hit https://localhost:5601/ in the browser.
as you can see in the request payload it is binding http-post. ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
this is the error i get from sso IDP: FBTSML238E The SAML message signature could not be validated.
Yes, I know but I shared with you documentation that explains that the signature is not enveloped in the message in this case. So the signature is calculated and becomes part of the URL. If you look at this in the logs then you might look at a point where we just print out the AuthNRequest, this is no indication that it is not signed. I think we can move forward with this at this point.
No, it's not. Please read section 3.4.1 in https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf . The ProtocolBinding you see there doesn't dictate that this request is using that binding, but instructs the IDP that the response should use that binding.
Understood, but I have already shared with you the answer for that part:
Thank you for your response and detailed explanation.
after successful login. i am redirected to https://localhost:5601/api/security/v1/saml/ response is {"statusCode":404,"error":"Not Found","message":"Not Found"}
May be i am missing something.
I'm pretty sure you are using documentation for setting up saml for an older version than the one you are using. Please refer back to the docs for the actual elasticsearch version you use, double check and correct the errors. If this doesn't fix your issue, paste your actual and current saml realm configuration from elasticsearch.yml and kibana.yml here , maybe someone can help you spot an error in there
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.