please follow the below link for detailed explanation
"https://docs.google.com/document/d/10T_QPIxwGYAIIIuTaD_nUS8_d5FJbeHY5ER0B-cSoyQ/edit?usp=sharing".
Kibana SOS configuration with OKTA
Not able to login to the kibana through SOS .Getting the following error when trying to login to kibana
{"statusCode":401,"error":"Unauthorized","message":"[security_exception] unable to authenticate user [<unauthenticated-saml-user>] for action [cluster:admin/xpack/security/saml/authenticate], with { header={ WWW-Authenticate={ 0="Bearer realm=\"security\"" & 1="Basic realm=\"security\" charset=\"UTF-8\"" } } }
We created the users in kibana and okta with the same names and provided super user privileges .
In the Okta groups are created with name elasticadmin , same user is assigned to group .The user and groups are also assigned application
Created Deployment in elastic cloud and applied the configurations as follows.
We followed the steps from the below url and followed it in the same order
https://www.elastic.co/guide/en/cloud/current/ec-securing-clusters-SAML.html
Elasticsearch.yml
xpack:
security:
authc:
realms:
cloud-saml:
type: saml
order: 2
attributes.principal: "nameid:persistent"
attributes.groups: "groups"
idp.metadata.path: "https://dev-782126.oktapreview.com/app/exkhqawlen68fzSuB0h7/sso/saml/metadata"
idp.entity_id: "http://www.okta.com/exkhqawlen68fzSuB0h7"
sp.entity_id: "https://6213c4f5xxx.us-east-1.aws.found.io:9243/"
sp.acs: "https://6213c4fxxx.us-east-1.aws.found.io:9243/api/security/v1/saml"
sp.logout: "https://6213c4f57f8a4f7aa9f375d5e49dff30.us-east-1.aws.found.io:9243/logout"
We map an elasticadmin group to the superuser role as follows from API Console
POST /_xpack/security/role_mapping/CLOUD_SAML_ELASTICADMIN_TO_SUPERUSER
{
"enabled": true,
"roles": [ "superuser" ],
"rules": {
"field": { "groups": "elasticadmin" }
},
"metadata": { "version": 1 }
}
kibana.yml
xpack.security.authProviders: [saml]
server.xsrf.whitelist: [/api/security/v1/saml]
xpack.security.public:
protocol: https
hostname: 6213c4f57f8xxxxx.us-east-1.aws.found.io
port: 9243
We are using OKTA as IDP and its configurations is as follows
We found no errors in the Okta Log and it seems everything is fine there .
Please let me know what might be the cause and suggest us the solutions .
If there any other configurations are required or anything wrong in my configuration please let us know so that we will change accordingly and test it