Elasticsearch Version: 7.5.2
Kibana Version: 7.5.2
Deployment: Elastic.co Cloud Managed
Hello, we are seeing strange issues when using saml on our production deployment, it all worked fine during our trial which is strange.
So if I go to log in via
https://x.eu-west-1.aws.found.io:9243, I see the following:
{"statusCode":403,"error":"Forbidden","message":"Forbidden"}
If I go to this url
https://x..eu-west-1.aws.found.io:9243/app/kibana, I see the following:
If I go to this url
https://x.eu-west-1.aws.found.io:9243/api/security/v1/me, I see the following:
{"username":"anthony.cleaves@x.com","roles":[],"full_name":null,"email":null,"metadata":{"saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname)":["Anthony"],"saml(http://schemas.microsoft.com/identity/claims/objectidentifier)":["{{REMOVED}}"],"saml_nameid_format":"urn:oasis:names:tc:SAML:2.0:nameid-format:transient","saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname)":["Cleaves"],"saml(http://schemas.microsoft.com/claims/authnmethodsreferences)":["http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password"],"saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress)":["anthony.cleaves@x.com"],"saml(http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name)":["anthony.cleaves@x.com"],"saml_nameid":"+MyMjID64szKm4YllGRf1ScSW/3GBxetUKW4OvMYpeI=","saml(http://schemas.microsoft.com/identity/claims/identityprovider)":["https://sts.windows.net/{{REMOVED}}/"],"saml(http://schemas.microsoft.com/identity/claims/tenantid)":["{{REMOVED}}"],"saml(http://schemas.microsoft.com/identity/claims/displayname)":["Anthony Cleaves"]},"enabled":true,"authentication_realm":{"name":"saml-to-azure","type":"saml"},"lookup_realm":{"name":"saml-to-azure","type":"saml"}}
I have no roles set, so we map "Kibana_Administrators" to superusers and kibana_users, via the following:
_security/role_mapping/CLOUD_SAML_ADADMIN_TO_SUPERUSER
{
"CLOUD_SAML_ADADMIN_TO_SUPERUSER": {
"rules": {
"all": [
{
"field": {
"realm.name": "saml-to-azure"
}
},
{
"field": {
"groups": "Kibana_Administrators"
}
}
]
},
"enabled": true,
"roles": [
"superuser",
"kibana_user"
],
"metadata": {
"version": 2
}
}
}
For completion here is my Elaticsearch config:
xpack:
security:
authc:
realms:
saml:
saml-to-azure:
order: 2
attributes.principal: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'
attributes.groups: 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groups'
idp.metadata.path: 'https://login.microsoftonline.com/{{REMOVED}}/federationmetadata/2007-06/federationmetadata.xml?appid={{REMOVED}}'
idp.entity_id: 'https://sts.windows.net/{{REMOVED}}/'
sp.entity_id: 'https://x.eu-west-1.aws.found.io:9243'
sp.acs: 'https://x.eu-west-1.aws.found.io:9243/api/security/v1/saml'
sp.logout: 'https://x.eu-west-1.aws.found.io:9243/logout'
And here is my kibana config:
xpack.security.authc.providers: ['saml','basic']
server.xsrf.whitelist: ['/api/security/v1/saml']
xpack.security.authc.saml.realm: 'saml-to-azure'
The strange thing is, last night it appeared to work for me fine, then I changed our realm name from the one in the example to saml-to-azure
and I now see this issue. My gut feeling is that it's not finding the correct group when talking to saml but I have no idea how I can debug it to view anything like that.
Any help would be appreciated.