Cognito
Last updated
Last updated
This service give users an identity to interact with web or mobile application.
There are two services as part of this offering.
Provides sign in functionality to users.
It is used authentication.
Integrates with Application Load Balancer (ALB) and API gateway.
It is a serverless database of users.
It provides following functionality and more,
Handles simple login flows like username/email and password
Federated Identity users from Google, Fb, SAML, OIDC etc
MFA
Password rest
Email and Phone number verification
Blocks users if credentials are compromised
Provides synchronous lambda triggers for signup, signin, messaging etc.
A Login sends back a JWT token.
The list of operation and lambda triggers are summorized in the table here.
This hosted UI provided by Cognito allows to handle both sign-up
and sign-in
flows.
Customization of logos and styling is possible for this hosted UI.
Custom Domain
If a custom domain is created for hosted UI, the certificate should be hosted in ACM at us-east-1
region only.
This custom domain must be defined in App Integration section of Cognito.
This feature blocks user signin or requires MFA if the authentication appears suspicious.
This is achieved by calculating a risk score (based on location, IP and device used) for each sign-in attempt.
CloudWatch logs integration allows to monitor the authentication attempts trail.
ALB
ALB integration allows to offload the authentication process from application to the ALB.
Authentication can be done using
OpenID Connect
Cognito User Pool
SAML/LDAP/Microsoft AD
This require HTTPS
listener to set authenticate-oidc or authenticate-cognito rules.
Flow Diagram
Also known as Federated Identity.
It is used for authorization (access control).
It provides AWS credentials to outside users (i.e app/web users not part of AWS IAM) so that they can access AWS resources directly.
CIP provides temporary credentials to app/web users or guest (unauthenticated) user.
It also integrates with Cognito User Pool (CUP), OpenID Connect, SAML, custom login servers or public Identity providers (IdP) as an identity provider.
Once the temporary credentials are obtained, users can access the AWS resources directly or via API gateway.
Cognito Integration flow
OpenId connect Integration flow