Kibana SAML authentication error

I'm using elastic cloud and I followed the link tutorial below to enable SAML authentication on Kibana, but I'm having a problem.

Documentation I have followed:

Error that I am recceing after I log in to IdP and am redirected back to my_host_kibana / api / security / v1 / saml

{clue: admin / xpack / security / saml / authenticate} [action_code: 401, "error": "Unauthorized", "message": "[security_exception] unable to authenticate user [<unauthenticated-saml- \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ security \\\ "charset = \\\" UTF-8 \\\ "\"}}} "}

Elasticsearch configuration

                    type: saml
                    order: 2
                    attributes.principal: "nameid:persistent"
                    attributes.groups: ""
                    idp.metadata.path: ""
                    idp.entity_id: ""
                    sp.entity_id: ""
                    sp.acs: ""
                    sp.logout: ""

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

From what I saw the problem is with

attributes.principal:" nameid: persistent "

If I remove : persistent holding only nameid functions. Maybe I need to do some adjustment on the IdP side to accept the persistent, but I have no idea where yet, if anyone has a light.

Hey @leobaiano, when you're seeing unable to authenticate user in Kibana, per the SAML troubleshooting guide it's because:

This error indicates that Elasticsearch failed to process the incoming SAML authentication message. Since the message can’t be processed, Elasticsearch is not aware of who the to-be authenticated user is and the placeholder is used instead. To diagnose the actual problem, you must check the Elasticsearch logs for further details.

It is very possible that your attributes.principal is configured incorrectly. It all really depends on the IdP for what should be specified here per: I'd suggest by checking your Elasticsearch logs before going down this path though.

Many thanks for the feedback, I did not set the attributes and kept the nameid on the main because it is default. As I'm working on a PoC I'll keep it that way for the moment, the idea is just to see if the solution we plan meets the needs and if so we go to the details and more advanced settings.

Thank you very much.

1 Like

We also explain about nameid and nameid:persistent in , hope this is helpful

Thank you very much @ikakavas

I can not find where to mark the topic as resolved.

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