如何将 SAML 属性从您的 IdP 映射到 AWS Elastic Search 角色?

How to map a SAML Attribute from your IdP to an AWS Elastic Search Role?

最近为 AWS Elastic Search 解决方案添加的 SAML 支持: https://aws.amazon.com/about-aws/whats-new/2020/10/amazon-elasticsearch-service-adds-native-saml-authentication-kibana/

在其文档中列出支持后端角色: https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/saml.html

In Okta, for example, you might have a user, jdoe, who belongs to the group admins. If you add jdoe to the SAML master username field, only that user receives full permissions. If you add admins to the SAML master backend role field, any user who belongs to the admins group receives full permissions.

If you want to use backend roles (recommended), specify an attribute from the assertion in the Role key field, such as role or group. This is another situation in which tools like SAML-tracer can help.

但是有些用户在使用 AWS 控制台完成配置后会遇到问题。

答案不在 AWS 控制台范围内,必须在 Elastic Search 集群中使用您在集群中作为内部用户创建的主用户通过 IAM 角色或使用主用户字段在Elastic Search 的 AWS 控制台中修改身份验证向导的 SAML 配置部分。 你必须:

  1. 创建与您的 SAML 属性值匹配的后端角色
  2. 在新后端角色和实际 Elastic Search 角色之间创建映射

通过创建自定义 Attribute/Claim 角色或组等方式完成 IdP 配置并在 Elastic 搜索集群中配置 SAML 身份验证集成后。

1.-使用您的主用户登录 Kibana 2.-转到 OpenDistro -> 安全 -> 角色 -> 您要授予访问权限的角色,即 readall 3.-转到角色屏幕下的映射用户选项卡 4.- 在“后端角色”字段中,键入您通过以下步骤创建的 Azure 声明的值:https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-enterprise-app-role-management 作为参考,声明值为:user.assignedroles。 声明密钥是您将 Azure Enterprise 应用程序配置为的任何内容。 您将拥有“您选择的声明名称”的键值对:user.assignedroles 5.-在 Kibana 中保存映射

使用 Azure IdP 使用分配给他们的不同 Azure 声明的用户登录 Kibana。 Open Distro Security 插件将解析 SAML 令牌属性,找到 user.assignedroles 的字段,并将其作为 Kibana 后端角色映射到实际的 Elastic Search 角色。