I’m trying to grant host isolate perms configuring the "Role Mappings" but without success.
Tried the same configuration steps (same rule) for regular Kibana users and it works like a charm.
Have I missed something?
Thanks.
I’m trying to grant host isolate perms configuring the "Role Mappings" but without success.
Tried the same configuration steps (same rule) for regular Kibana users and it works like a charm.
Have I missed something?
Thanks.
Hi, when you create a role mapping in the "Role Mappings" page, you select an existing role and add rules that assign roles to users. If you have an existing role that grants the Kibana application privilege to perform host isolation actions, you should select that role in the Role Mappings page.
Hi Tim,
thanks for reply.
"If you have an existing role that grants the Kibana application privilege to perform host isolation actions, you should select that role in the Role Mappings page”
Yes, I did it. I created a specific role called “host_isolation” and “All” for:
. Endpoint List, Trusted Applications, Host Isolation Exceptions, Blocklist, Event Filter, Elastic Defender Policy History and Host Isolation, in Security Section and None for everything else.
When I create an local user and use the same role it works. So I’m assuming the host_isolation Role is correct and the issue is something related to Role Mapping itself.
I have to add I’m already using Role Mapping for others tasks with success.
Any hits?
Thanks Again
Hi, a couple questions to narrow this down:
host_isolation
role are you able to SSO into Kibana, but getting authorization errors when trying to execute host isolation related actions, or something else?host_isolation
and call GET /_security/authenticate
from Dev Tools? If you're okay with sharing these publicly, could you post the list of roles
you get in the response? It's also fine to just confirm if host_isolation
is among them or not. Also, it's worth looking at the user metadata; does it match what you would expect, based on your role mapping rules?host_isolation
authenticating with? There's additional logging we can enable to get more info, but it helps to know the authentication realm first.GET /_security/role/host_isolation
) and role mapping rule (GET /_security/role_mapping/<mapping-name>
) would help, if you're willing to share them.Hi Nikolaj,
thanks for the replay.
"Not working" means works for local kibana users and not for SSO ones.
8.11.4
I called GET .../authenticate and host_isolation isn't showed up.
That is the output sanitized[1]:
As I said others Role_Mapping are already working well for SSO users (custom_reporting i.e.) so, I'm assuming the authentication portion is ok.
Please find it in bellow [2] and [3] respectively the sanitized output.
Also to compare, I'm sending [4] the custom_reporting role (works with SSO).
Thanks again.
[1] - GET _security/authenticate
{
"username": "5510487348",
"roles": [
"viewer",
"editor"
],
"full_name": "user@domain.com",
"email": "user@domain.com",
"metadata": {
"saml_email": [
"user@domain.com"
],
"saml_nameid_format": "urn:oasis:names:tc:SAML:2.0:nameid-format:transient",
"saml(
http://saml.elastic-cloud.com/attributes/principal)":
[
"5510487348"
],
"saml_roles": [
"editor",
"viewer"
],
"saml_principal": [
"5510487348"
],
"saml_nameid": "_56aed318267b78e185d34c0a5cca8f2507814f23",
"saml(
http://saml.elastic-cloud.com/attributes/name)":
[
"user@domain.com"
],
"saml(
http://saml.elastic-cloud.com/attributes/email)":
[
"user@domain.com"
],
"saml(
http://saml.elastic-cloud.com/attributes/roles)":
[
"editor",
"viewer"
],
"saml_name": [
"user@ldomain.com"
]
},
"enabled": true,
"authentication_realm": {
"name": "cloud-saml-kibana",
"type": "saml",
"domain": "cloud-default"
},
"lookup_realm": {
"name": "cloud-saml-kibana",
"type": "saml",
"domain": "cloud-default"
},
"authentication_type": "token"
}
[3] - GET _security/role_mapping/dom-map
{
"DOM-MAP": {
"enabled": true,
"roles": [
"custom_reporting",
"host_isolation"
],
"rules": {
"all": [
{
"field": {
"groups": "dc=domain,dc=com"
}
}
]
},
"metadata": {}
}
}
[4] - GET _security/role/custom_reporting
{
"custom_reporting": {
"cluster": ,
"indices": [
{
"names": [
"logs-"
],
"privileges": [
"read",
"view_index_metadata",
"all"
],
"field_security": {
"grant": [
""
],
"except":
},
"allow_restricted_indices": false
}
],
"applications": [
{
"application": "kibana-.kibana",
"privileges": [
"feature_discover.all",
"feature_dashboard.all",
"feature_canvas.all",
"feature_maps.all",
"feature_ml.all",
"feature_graph.all",
"feature_visualize.all",
"feature_dev_tools.all"
],
"resources": [
"*"
]
}
],
"run_as": ,
"metadata": {},
"transient_metadata": {
"enabled": true
}
}
}
Thanks!
One request regarding the JSON payloads:
Could you edit your message to format those with the </>
icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted?
It's quite difficult to read otherwise.
Regarding the role mapping issue --
Based on the role-mapping definition you are mapping users based on:
"field": {
"groups": "dc=domain,dc=com"
}
However, in the authenticate response you posted I don't see any saml metadata fields that would match this. Could you check your SAML realm settings for attribute mapping, in particular that you have correctly configured attributes.groups
? This field needs to point to a SAML attribute that contains the value you expect in the field.groups
field of your role mapping definition. Note also that "groups": "dc=domain,dc=com"
is a literal match, so if you have a SAML attribute like "cn=users,dc=domain,dc=com"
the rule will not match.
One more useful debugging resource is our SAML trouble-shooting guide: Common SAML issues | Elasticsearch Guide [8.12] | Elastic
Hi Nikolai,
That role_mapping already works for "custom_reporting" role, so the SAML attributes are matching.
I added a new role " host_isolation" with:
"application": "kibana-.kibana",
"privileges": [
"feature_siem.minimal_all",
"feature_siem.endpoint_list_all",
"feature_siem.trusted_applications_all",
"feature_siem.host_isolation_exceptions_all",
"feature_siem.blocklist_all",
"feature_siem.event_filters_all",
"feature_siem.policy_management_all",
"feature_siem.actions_log_management_all",
"feature_siem.host_isolation_all"
And it doesn't work.
Thanks again.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.