Deployment in AWS with Amazon Cognito
This document assumes the use of the following:
- Cloud provider: Amazon Web Services (AWS)
- Kubernetes service: Elastic Kubernetes Service (EKS)
- Ingress Controller: AWS Load Balancer Controller
- Identity Provider (IdP): Amazon Cognito
- (Optional) ExternalDNS (to synchronize ingresses with the DNS service)
Configuring Patronus AI to use Amazon Cognito as an Identity Provider
Configuring Amazon Cognito
- 
Go to Amazon Cognito, select User pools then click on the Create user pool button. 
- 
In Define your application, select Traditional web application for the Application type option and add a name in Name your application. 
- 
In Configure options, select Email for the Options for sign-in identifiers option and select email in the Required attributes for sign-up option. 
- 
In Add a return URL add the following to the Return URL option: - https://<PATRONUS_APP_HOST>/oauth2/auth
 For example: 
- 
Click on Create user directory button. 
- 
After successfully created the user pool, go back to User pools then select the new user pool you just created. Go to App clients in the Applications section then select your app client. Go to Login pages then click on the Edit button in the Managed login pages configuration section. Add the following URL to Allowed sign-out URLs: - https://<PATRONUS_APP_HOST>
 For example: 
- 
In the OpenID Connect scopes section, check that Email, OpenID and Profile scopes are selected. 
- 
Click on Save changes. 
Configuring the Helm chart
Once you have created the Cognito user pool and app client, configure the values.yaml file with these values and apply the changes:
Configuring Admin Portal
Go to Admin Portal. In Accounts, create a new one with the following:
- Account Name: <ACCOUNT_NAME>
- Owner Email: <YOUR_EMAIL>
- Sign In Strategy: Domain
- Sign In Domain: <YOUR_DOMAIN>
- Limits Enabled: disabled
Then go to System Authentication and add a mapping.
- Account: <YOUR_NEWLY_CREATED_ACCOUNT>
- Claim JSON-path: $.aud[*]
- Match Claim Value: <CLIENT_ID>
- Grant Role: Owner/Member
Change the Claim JSON-path and Match Claim Value to suit your needs.
External documentation:
- What is Amazon EKS?
- AWS Load Balancer Controller
- What is Amazon Cognito?
- Vouch configuration example for OIDC
