【问题标题】:How to cloudform cognito user pool authentication provider with custom mapping如何使用自定义映射 cloudform cognito 用户池身份验证提供程序
【发布时间】:2021-12-27 10:28:02
【问题描述】:

我已成功创建了一个认知身份池,但无法看到如何将自定义映射添加到 cloudformation 中的“认知”“身份验证提供程序”。

在控制台上的 Cognito 身份验证提供程序内,有一个下拉菜单,我必须手动选择“使用自定义映射”,然后我可以手动将映射添加到我的自定义用户属性。但是,我需要能够对其进行云化处理,并且正在努力为它找到正确的位置。

与此身份池一起使用的用户池将“SupportedIdentityProviders”设置为“COGNITO”

更新

我可以通过运行...获得身份提供者列表

aws cognito-identity list-identities --max-results 2 --identity-pool-id xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx

这会返回我

{
    "IdentityPoolId": "xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
    "Identities": [
        {
            "IdentityId": "yy-yyyy-y:yyyyyyyy-yyyy-yyyy-yyyyyyyyyy",
            "Logins": [
                "cognito-idp.eu-west-2.amazonaws.com/eu-west-2_tFT6FBwIO"
            ],
            "CreationDate": "2021-11-15T12:38:48.249000+00:00",
            "LastModifiedDate": "2021-11-15T12:38:48.263000+00:00"
        }
    ]
}

使用“登录”信息我现在可以运行...

aws cognito-identity get-principal-tag-attribute-map --identity-pool-id xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx --identity-provider-name "cognito-idp.eu-west-2.amazonaws.com/eu-west-2_tFT6FBwIO"

返回

{
    "IdentityPoolId": "xx-xxxx-x:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
    "IdentityProviderName": "cognito-idp.eu-west-2.amazonaws.com/eu-west-2_tFT6FBwIO",
    "UseDefaults": false,
    "PrincipalTags": {
        "attr_x": "custom:attr_x",
        "attr_y": "custom:attr_y",
        "attr_z": "custom:attr_z"
    }
}

但是,我仍然不知道如何通过 cloudformation 设置此映射...

问候 标记。

【问题讨论】:

    标签: amazon-cognito aws-userpools aws-identitypools


    【解决方案1】:

    CloudFormation 尚不支持设置 PrincipalTag 属性映射,但很快将支持 according to the CloudFormation roadmap。 同时,您必须创建一个CloudFormation Custom ResourceResource Provider 来实现此目的。

    【讨论】:

      猜你喜欢
      • 2020-09-28
      • 2017-12-13
      • 2018-08-02
      • 1970-01-01
      • 2017-01-04
      • 2018-02-23
      • 2012-04-05
      • 1970-01-01
      • 2012-11-09
      相关资源
      最近更新 更多