AWS Cogneto Flashcards

1
Q

What is AWS Cognito?

A

It is an identity service, there are two parts, the user identity pool and the ident pool.

User identity pool is a complete identity services where users can sign up to an application and it manageds the sig up flow, validatyion, security for your application. Even provides SDV for copmmon languages to make integratio with the apoplication easy.

Identity pool is a solution that manages identity with common social media preoviders like Twitter (x), Facebook, etc onbahalf of the application and provides the application with a single common interfaces to have uses use there own social media accounts to sign in to the sapplication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

I am developing a new appliucation requiring OAuth2 with my mobile application, what AWS service could I use to implent OAuth2?

A

Cognito supports OAuth2 through it ‘Identity Pool’.

Amazon Cognito – Best for OAuth2 Implementation

Amazon Cognito provides:

OAuth2 Authorization Code Flow, Implicit Flow, and Client Credentials Flow.

Built-in user pools for user management (sign-up, sign-in, etc.).

Integration with federated identity providers (e.g., Google, Facebook, Apple, SAML, OpenID Connect).

Hosted UI for OAuth2 login, or you can build your own UI and integrate with Cognito APIs.

Token issuance: ID token, access token, refresh token.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

I am building a new application in AWS and requir an AWS service supporting OIDC with my new mobile application, what service could I use?

A

Cognito supports OICD through ‘Identity Pool’.

Why Amazon Cognito?

OIDC Support: Fully supports the OIDC protocol for authentication and authorization.

Mobile-Ready: Designed to work easily with iOS, Android, and web applications.

User Pools: Manages user sign-up, sign-in, and access control.

Federated Identities: Supports identity federation with external OIDC identity providers (like Google, Facebook, or your custom OIDC provider).

Secure Token Handling: Issues JWT tokens (ID, access, and refresh tokens) compliant with OIDC.

Integration with AWS Services: Seamless IAM role integration via Identity Pools.

Hosted UI: Optional pre-built authentication UI that supports OIDC flows like authorization code flow.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

I require JWTs with my new AWS mobile application, what AWS service could I use?

A

Cognito supports JWT through it ‘Identiy Pool’.

Why Amazon Cognito?

User Authentication: It provides user sign-up, sign-in, and access control.

JWT Token Issuance: After a successful authentication, Cognito issues JWTs (ID token, access token, and refresh token).

Integration: Easily integrates with AWS AppSync, API Gateway, and Lambda.

Federated Identities: Supports social identity providers (like Google, Facebook, Apple) and enterprise identity providers via SAML.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe what AWS Cognito ‘delegated access’ is? and how can I use AWS Cognito to provide delegated access?

A

AWS Cognito “delegated access” typically refers to the ability to authorize a user or application to act on behalf of another user—usually through temporary security credentials issued by AWS STS (Security Token Service) after successful authentication via Cognito.

This allows a user authenticated through AWS Cognito to temporarily access AWS services (like S3, DynamoDB, etc.) with scoped permissions defined in IAM roles.

🔍 What is Delegated Access in AWS Cognito?

Delegated access in Cognito involves:

Authentication via Cognito User Pools, Federated Identities or Identity Pools.

Authorization using IAM roles with limited permissions.

Temporary credentials are provided using AWS STS via Cognito Identity Pools.

This model is useful when:

A user signs in with Cognito, and you want them to access AWS resources (like S3) securely.

You want to restrict access to certain resources per user or group.

You need cross-account access or federated access (e.g., users signing in via Google, Facebook).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is OIDC?

A

Open ID connect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is JWT?

A

Java web token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is in a JWT?

A

Header
Payload
Signing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the two main sections/services in reference to Cognito?

A

User pools
Identity Pools

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

I am using AWS and I want to build an application fast and what to offload user UI management like user sign up, pass-reset, etc to service, what options do I have?

A

Cognito user pools offer this ability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Using AWS services, I am building a web-based application and I would like the ability to have the users use there existing social media accounts, what AWS services can i use?

A

Cognito identity pools

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In AWS when using Cogneto, can I use MFA with AWS Cogneto User Identitie Pool?

A

Yes 100%

Yes, Amazon Cognito allows you to implement Multi-Factor Authentication (MFA) for user identities within a user pool. MFA enhances security by requiring users to provide additional verification beyond their username and password. Cognito supports several MFA methods:​
AWS Documentation+7AWS Documentation+7AWS Documentation+7
AWS Documentation+1AWS Documentation+1

SMS-based MFA: Users receive a one-time code via SMS during sign-in. To enable this, configure Amazon Simple Notification Service (SNS) for your user pool to send SMS messages. ​
AWS Documentation

Time-based One-Time Password (TOTP) MFA: Users generate a temporary code using an authenticator app like Google Authenticator. This requires enabling TOTP in your user pool settings. ​
AWS Documentation+6AWS Documentation+6AWS Documentation+6

Email-based MFA: Users receive a one-time code via email. To use this method, your user pool must be in the Essentials or Plus feature plan and configured to send emails through Amazon Simple Email Service (SES). ​
AWS Documentation+2AWS Documentation+2AWS Documentation+2

You can set MFA as required, optional, or disabled in your user pool settings:​
AWS Documentation+9AWS Documentation+9AWS Documentation+9

Required: All users must set up and use MFA.​
AWS Documentation

Optional: Users can choose whether to enable MFA.​

Disabled: MFA is not used.​

To configure these settings in the Amazon Cognito console:​
AWS Documentation+4AWS Documentation+4AWS Documentation+4

Sign in to the Amazon Cognito console.​

Choose your user pool.​
AWS Documentation+10AWS Documentation+10AWS Documentation+10

Navigate to the "Sign-in" tab.​
AWS Documentation+2AWS Documentation+2AWS Documentation+2

Under "Multi-factor authentication," choose "Edit" to set your preferred MFA options.​
AWS Documentation+2AWS Documentation+2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can you customize the user pool user UI interface?

A

Yes 100%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Can you use identity and user pools at the same time?

A

Yes 100%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

As part of my signup, I require SMS verification and email verification, what is my option if I do not wnat to build it in my app to save time?

A

You can use Cognito

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

I wnat to use custom flows to the auth and sign up and even messages in Cognito, is this possible?

A

Yes 100%, using lambda

17
Q

What service does Cognito integrate with?

A

API Gateway

AWS ALB

18
Q

I have an application that uses ALB and being it is my app in an autoscaling group, I have been asked to add OAUTH authorization, how cna I do this?

A

The ALB has the ability to integrate with Cognito and Cognito supports OAUTH, So you have Cogneto preform the oTHUH for the user and provide the token to the ALB.

19
Q

I have an application that uses API with s my app in an autoscaling group, I have been asked to add OAUTH authorization, how cna I do this?

A

The API has the ability to integrate with Cognito and Cognito supports OAUTH, So you have Cogneto preform the oTHUH for the user and provide the token to the API GW.

20
Q

I have a mobile application, I intend to use a SynamoDBtable for each user to enable the user to store information but I need that ability to authorise again DynamoDB, what is my best option?

A

Cogneto can be used, Cognito will auth thet user and retrieve an STS token that cna be used to call other AWS services.

21
Q

When using user identity in Cogneto, what MFA types are supported MFA?

A
  • email

- sms

22
Q

When Cognito is used to sign in from, say google account, what is returned by AWS Cognito?

A

STS access key and secret key

23
Q

When Cognito is used to sign in from, say google account, what is returned by AWS Cognito?

A

STS access key and secret key

24
Q

How would I secure AWS Cognito?

A

Using the AWS WAF.