Aws Cognito 的 SAML 属性映射 - 注册或登录有效但不能同时有效
SAML Attribute Mapping for Aws Cognito - Signup or Signin works but not both
我已将我的 GSuite 帐户设置为 Cognito 用户池(而非身份池)的 SAML iDP。
如果我不提供属性映射,则尝试通过 GSuite 登录注册的新用户会收到以下错误。
Error in SAML response processing: Invalid user attributes: email: Attribute is required.
但是,如果我添加电子邮件映射,用户就可以注册。但是因为他们收到此错误而无法再次登录(奇怪,因为此应用程序客户端可以写入电子邮件)
Error in SAML response processing: Invalid user attributes: email: Attribute cannot be updated.
有什么想法吗?
在浏览器中,使用托管 UI。
事实证明,我在 CloudFormation 设置期间将电子邮件地址设置为不可变。即使电子邮件没有被修改,它也需要是可变的。
您可以通过以下命令确定电子邮件的可变性。
aws --output table cognito-idp describe-user-pool --user-pool-id <user pool id> | grep -B6 -A7 " | email "
对于在使用 SAML 和 AD 作为身份提供者时遇到此问题的任何人,您必须配置属性映射。
转到联合下的属性映射,为 SAML 属性输入 http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
,为用户池属性输入 Select 电子邮件
我已将我的 GSuite 帐户设置为 Cognito 用户池(而非身份池)的 SAML iDP。
如果我不提供属性映射,则尝试通过 GSuite 登录注册的新用户会收到以下错误。
Error in SAML response processing: Invalid user attributes: email: Attribute is required.
但是,如果我添加电子邮件映射,用户就可以注册。但是因为他们收到此错误而无法再次登录(奇怪,因为此应用程序客户端可以写入电子邮件)
Error in SAML response processing: Invalid user attributes: email: Attribute cannot be updated.
有什么想法吗?
在浏览器中,使用托管 UI。
事实证明,我在 CloudFormation 设置期间将电子邮件地址设置为不可变。即使电子邮件没有被修改,它也需要是可变的。
您可以通过以下命令确定电子邮件的可变性。
aws --output table cognito-idp describe-user-pool --user-pool-id <user pool id> | grep -B6 -A7 " | email "
对于在使用 SAML 和 AD 作为身份提供者时遇到此问题的任何人,您必须配置属性映射。
转到联合下的属性映射,为 SAML 属性输入 http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
,为用户池属性输入 Select 电子邮件