Security, Identity & Compliance | Amazon Cognito Flashcards
What is Amazon Cognito?
General
Amazon Cognito | Security, Identity & Compliance
Amazon Cognito lets you easily add user sign-up and authentication to your mobile and web apps. Amazon Cognito also enables you to authenticate users through an external identity provider and provides temporary security credentials to access your app’s backend resources in AWS or any service behind Amazon API Gateway. Amazon Cognito works with external identity providers that support SAML or OpenID Connect, social identity providers (such as Facebook, Twitter, Amazon) and you can also integrate your own identity provider.
In addition, Amazon Cognito enables you to synchronize data across a user’s devices so that their app experience remains consistent when they switch between devices or upgrade to a new device. Your app can save data locally on users’ devices allowing your applications to work even when the devices are offline and then automatically synchronize the data when the device is back online.
With Amazon Cognito, you can focus on creating great app experiences instead of worrying about building, securing, and scaling a solution to handle user management, authentication, and sync across platforms and devices.
Who should use Amazon Cognito?
General
Amazon Cognito | Security, Identity & Compliance
Amazon Cognito is designed for developers who want to add user management and sync functionality to their mobile and web apps. Developers can use Cognito Identity to add sign-up and sign-in to their apps and to enable their users to securely access their app’s resources. Cognito also enables developers to sync data across devices, platforms, and applications.
How do I start using Amazon Cognito?
General
Amazon Cognito | Security, Identity & Compliance
You can easily get started by visiting the AWS Console. If you do not have an Amazon Web Services account, you can create an account when you sign in to the console. Once you have created a user pool for user management or an identity pool for federated identities or sync operations, you can download and integrate the AWS Mobile SDK with your app. Alternatively you can call the Cognito server-side APIs directly, instead of using the SDK. See our developer guide for more information.
Does Amazon Cognito expose server-side APIs?
General
Amazon Cognito | Security, Identity & Compliance
Yes. Cognito exposes server-side APIs. You can create your own custom interface to Cognito by calling these APIs directly. The server-side APIs are described in the Developer Guide.
Which platforms does Amazon Cognito support?
General
Amazon Cognito | Security, Identity & Compliance
Support for Cognito is included in the optional AWS Mobile SDK, which is available for iOS, Android, Unity, and Kindle Fire. Cognito is also available in the AWS SDK for JavaScript. Cognito Your User Pools is currently supported in the AWS Mobile SDKs for iOS and Android and in the JavaScript AWS SDK for Cognito. Visit our resource page to download the SDKs.
Do I have to use the AWS Mobile SDK?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
No. Cognito exposes its control and data APIs as web services. You can implement your own client library calling the server-side APIs directly.
Can I have my own identity provider to support user sign-up and sign-in?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, you can easily and securely add sign-up and sign-in functionality to your apps with Cognito Identity. Your users can sign-up and sign-in using email, phone number, or user name. You can also implement enhanced security features, such as email verification, phone number verification, and multi-factor authentication. Cognito Identity also enables you to customize workflows by, for example, adding app-specific logic to user registration for fraud detection and user validation through AWS Lambda. To learn more, visit our docs.
What is a User Pool?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
A User Pool is your user directory that you can configure for your web and mobile apps. A User Pool securely stores your users’ profile attributes. You can create and manage a User Pool using the AWS console, AWS CLI, or AWS SDK.
What user profile information is supported by Cognito Identity?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Developers can use either standard OpenID Connect-based user profile attributes (such as user name, phone number, address, time zone, etc.) or customize to add app-specific user attributes.
Can I enable my application’s users to sign up or sign in with an email address or phone number?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, you can use the aliasing feature to enable your users to sign up or sign in with an email address and a password or a phone number and a password. To learn more, visit our docs.
Can I set up password policies?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, you can set up password policies, such as strength of password and character type requirements, when setting up or configuring your user pool.
Can I verify the email addresses and phone numbers of my application’s users?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, with Cognito Identity you can require your users’ email addresses and phone numbers to be verified prior to providing them access to your application. During sign-up, a verification code will be sent to the user’s phone number or email address, and the user must input the verification code to complete sign-up and become confirmed.
Does Cognito Identity support SMS-based multi-factor authentication (MFA)?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, you can enable the end users of your application to sign in with SMS-based MFA. With SMS-based MFA enabled, your users will be prompted for their password (the first factor—what they know), and for a security code that can only be received on their mobile phone via SMS (the second factor—what they have).
Is it possible to customize user sign-up and sign-in workflows?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, you can customize sign-up and sign-in by adding app-specific logic to the user sign-up and sign-in flows using AWS Lambda. For example, you can create AWS Lambda functions to identify fraud or perform additional validations on user data. You are able to trigger developer-provided Lambda functions at pre-registration, at post-confirmation, at pre-authentication, during authentication to customize the challenges, and at post-authentication. You can also use Lambda functions to customize messages sent as part of email or phone number verification and multi-factor authentication.
Can I remember the devices associated with my application’s users in a Cognitio user pool?
Add User Sign-up & Sign-in to your mobile and web apps
Amazon Cognito | Security, Identity & Compliance
Yes, you can opt to remember devices used to access your application, and you associate these remembered devices with your application’s users in a Cognito user pool. You can also opt to use remembered devices to supress second factor challenges for your users when you have set up multi-factor authentication.
How can I migrate my existing users into an Amazon Cognito user pool?
Federate identities and provide secure access to AWS resources
Amazon Cognito | Security, Identity & Compliance
You can use our import tool to migrate your existing users into an Amazon Cognito user pool. User attribute values are imported from a .csv file, which can be uploaded through the console, our APIs, or CLI. When imported users first sign in, they confirm their account and create a new password with a code sent to their email address or phone. There is no additional cost for using the import tool. To learn more, see the import tool documentation.
The import tool does not migrate passwords. If you want to retain your users’ current passwords, you might consider an alternative approach to migrate users one at a time as they sign-in to your app during a transition period. With this approach, your app first tries to sign-in the user with your Cognito user pool. If that user doesn’t exist in the user pool, your app will sign the user in with your existing identity system and temporarily retain the username and password used to do so. After a user successfully signs in with your existing identity system, your app would then use the same username and password to create the user in your Cognito user pool. This approach requires maintaining your existing identity system during the transition period, but after the transition period ends, you can use our import tool to import the remaining users (without their passwords).
Can I use Cognito Identity to federate identities and secure access to AWS resources?
Federate identities and provide secure access to AWS resources
Amazon Cognito | Security, Identity & Compliance
Yes, Cognito Identity enables you to authenticate users through an external identity provider and provides temporary security credentials to access your app’s backend resources in AWS or any service behind Amazon API Gateway. Amazon Cognito works with external identity providers that support SAML or OpenID Connect, social identity providers (such as Facebook, Twitter, Amazon) and you can also integrate your own identity provider.
Which public identity providers can I use with Amazon Cognito Identity?
Federate identities and provide secure access to AWS resources
Amazon Cognito | Security, Identity & Compliance
You can use Amazon, Facebook, Twitter, Digits, Google and any other OpenID Connect compatible identity provider.
What is an Identity Pool?
Federate identities and provide secure access to AWS resources
Amazon Cognito | Security, Identity & Compliance
Identity pools are the containers that Cognito Identity uses to keep your apps’ federated identities organized. Identity Pool associates federated identities from social identity providers with a unique user specific identifier. Identity Pools do not store any user profiles. An identity pool can be associated with one or many apps. If you use two different identity pools for two apps then the same end user will have a different unique identifier in each Identity Pool.
How does the login flow work with public identity providers?
Federate identities and provide secure access to AWS resources
Amazon Cognito | Security, Identity & Compliance
Your mobile app authenticates with an Identity Provider (IdP) using the provider’s SDK. Once the end user is authenticated with the IdP, the OAuth or OpenID Connect token or the SAML assertion returned from the IdP is passed by your app to Cognito Identity, which returns a new Cognito ID for the user and a set of temporary, limited-privilege AWS credentials.
Can I register and authenticate my own users?
Federate identities and provide secure access to AWS resources
Amazon Cognito | Security, Identity & Compliance
Cognito Identity can integrate with your existing authentication system. With a simple API call you can retrieve a Cognito ID for your end users based on your own unique identifier for your users. Once you have retrieved the Cognito ID and OpenID Token Cognito Identity provides, you can use the Cognito Identity client SDK to access AWS resources and synchronize user data. Cognito Identity is a fully managed identity provider to make it easier for you to implement user sign-up and sign-in for your mobile and web apps.