尝试通过 Okta 代入角色时,AWS STS 错误“指定的传递标签键必须包含在请求的标签中”

问题描述

我正在尝试从 Okta 传递属性语句(以会话标签的形式),以便它们可以在角色 IAM 策略中使用,以确定用户是否可以担任该角色。

目前,Okta 配置为通过以下内容:

  • aws.amazon.com/SAML/Attributes/PrincipalTag:Email user.email
  • aws.amazon.com/SAML/Attributes/TransitiveTagKeys {"Email"}

我尝试添加另一个属性并更新传递键以包含它:

但是,每当我尝试担任此角色时,都会收到以下错误

"The specified transitive tag key must be included in the requested tags. (Service: AWSSecurityTokenService; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 38d6a161-cdf8-453a-9a182hd83hr832; Proxy: null)"

作为参考,角色策略包括一个允许语句:

    {
      "Sid": "","Effect": "Allow","Principal": {
        "Federated": "arn:aws:iam::<my-account-id>:saml-provider/<my-provider>"
      },"Action": [
        "sts:TagSession","sts:AssumeRoleWithSAML"
      ],"Condition": {
        "StringEquals": {
          "SAML:aud": "https://signin.aws.amazon.com/saml"
        },"StringLike": {
          "aws:RequestTag/GroupDevOps": "*","aws:RequestTag/Email": "*"
        },"ForAnyValue:StringEquals": {
          "sts:TransitiveTagKeys": [
            "Email","GroupDevOps"
          ]
        }
      }

GroupDevops 属性将用于限制对后续角色的访问,而不是这个角色 ^^。所以我不明白为什么当我将它包含在请求的标签中时我会看到我看到的错误?

如果从 Okta 中删除 GroupDevOps 属性和 IAM 策略,它会正常工作。虽然我看不到 CloudTrail 日志中传递的电子邮件属性,所以我不确定这是否按预期 100% 工作。

感谢帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...