Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SAML Attribute Mapping for Aws Cognito - Signup or Signin works but not both

I have setup my GSuite account as a SAML iDP for Cognito User Pools (not identity pools).

If i provide no attribute mappings a new user trying to signup via GSuite login gets the following error.

Error in SAML response processing: Invalid user attributes: email: Attribute is required.

However if I add an email mapping, the user can signup. But can't ever sign in again as they get this error (strange as email is writable by this app client)

Error in SAML response processing: Invalid user attributes: email: Attribute cannot be updated.

Ideas as to whats going on?

In browser, using Hosted UI.

like image 433
Adam Mills Avatar asked May 16 '18 08:05

Adam Mills


People also ask

Does Cognito supports SAML?

Amazon Cognito supports authentication with identity providers (IdPs) through Security Assertion Markup Language 2.0 (SAML 2.0). You can use an IdP that supports SAML with Amazon Cognito to provide a simple onboarding flow for your users.

What are SAML attributes?

A SAML (Security Assertion Markup Language) attribute assertion contains information about a user in the form of a series of attributes. The Retrieve from SAML Attribute Assertion can retrieve these attributes and store them in the attribute. lookup.

What is invalid SAML response?

If, when signing in to Apps on Demand, you see a message that says "Your request included an invalid SAML response," it means you are not included in the group authorized for access to this class's stream.

Is AWS Cognito an IdP or SP?

Amazon Cognito is the identity provider (IdP) to your app. The app is the service provider (SP) that retrieves tokens for authenticated users. However, when you use a third-party IdP to authenticate users, Amazon Cognito is the SP.


1 Answers

It turns out I had made the email address immutable during CloudFormation setup. Even though the email is not being modified, it needs to be mutable.

You can determine the mutability of email via the following command.

 aws --output table cognito-idp describe-user-pool --user-pool-id <user pool id>  | grep -B6 -A7 "  |  email  "
like image 163
Adam Mills Avatar answered Nov 03 '22 19:11

Adam Mills