- Go to https://console.aws.amazon.com/cognito and select "Manage User Pools"
- Click on "Create a user pool"
- Set a name for you user pool and click on "Step trough settings" then move for the next step
- Select the Authentication Method - Username / Email address or phone number and, set email and name as required attributes then move for the next step
- Set the password strenght, allow / do not allow users to sign themselves up and, how long a password set by an admistration will expire then move for the next step
- Set if you want to enable Multi-Factor Authentication (MFA), attrubutes that should be verified and, if you want to create a role to allow Amazon Congnito send SMS messages then move for the next step
- Customize email settings (email addresss, custom verification messages and custom ivitation messages) then move for the next step
- Customize tags then move for the next step
- Set if you want to remember your user's devices then move for the next step
- Create a new app client clicking on "Add an app client", set your app client name like: QSEfK8S and, enable "Generate client secret", enable "Enable sign-in API for server-based authentication (ADMIN_NO_SRP_AUTH)" and "Enable username-password (non-SRP) flow for app-based authentication (USER_PASSWORD_AUTH)" options
- Click on Create app client, then move for the next step
- You can skip triggers
- Review and Create pool
In the console under "App integration" click on "Domain name", check a domain availability and save changes.
In the console under "App integration" click on "App client settings":
- Select all "Enabled Identity Provicers"
- Type your Callback URL
Example for Minikube Scenario https://elastic.example:32443/login/callback
- Select "Authorization code grant" and "Implicit grant" over "Allowed OAuth Flows"
- Select "openid" and "aws.cognito.signin.user.admin" over "Allowed OAuth Scopes" and save changes
In the console under "General Settings" click on "App Clients", click on "Show Details" to get all settings.
In the console click on "General Settings" and get the Pool Id value.
You should add the following values inside your YAML file and change the values in curly brackets {} for your own values.
edge-auth:
oidc:
redirectUri: {redirectUrl}
identity-providers:
secrets:
idpConfigs:
- discoveryUrl: "https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/openid-configuration"
clientId: "{clientId}"
clientSecret : "{clientSecret}"
realm: "cognito"
hostname: "{hostname}"
primary: true
scope: openid
Example:
edge-auth:
oidc:
redirectUri: https://elastic.example:32443/login/callback
identity-providers:
secrets:
idpConfigs:
- discoveryUrl: "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ABC1234/.well-known/openid-configuration"
clientId: "25a3r3syah18fhkigfadban2pa"
clientSecret : "ipoppat3li456ssdo14pnaulrrj521q3b2p456ds0vihi"
realm: "cognito"
hostname: "elastic.example"
primary: true
scope: openid