Documentation Index
Fetch the complete documentation index at: https://cubed3-docs-cub-2416-update-semantic-snowflake-semantic-vie.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
In this guide, you’ll learn how to integrate AWS Cognito authentication with a Cube deployment. If you already have a pre-existing Cognito User Pool in AWS that you’d like to re-use, please skip ahead to Configure Cube.Create and configure a User Pool
If you haven’t already created a User Pool, please follow the instructions in the AWS Cognito documentation to create one, along with enabling the Hosted UI.Custom claims
To add custom claims to the JWT, you will need to associate a Lambda function to the Pre Token Generation event trigger available on your User Pool. First, go to the AWS Lambda Console and create new a Lambda function:Configure Cube
Now we’re ready to configure Cube to use AWS Cognito. Go to your Cube project and open the.env file and add the following, replacing the values wrapped in
<>.
Testing with the Developer Playground
Retrieving a JWT
Go to the OpenID Playground from Auth0 to and click Configuration.- Discovery Document URL:
https://cognito-idp.<AWS_REGION>.amazonaws.com/<USER_POOL_ID>/.well-known/openid-configuration - OIDC Client ID: Retrieve from App Client settings page in AWS Cognito User Pool Console
- OIDC Client Secret: Retrieve from App Client settings page in AWS Cognito User Pool Console
Set JWT in Developer Playground
Now open the Developer Playground (athttp://localhost:4000) and on the Build
page, click Add Security Context.
id_token from OpenID Playground and click the
Save button.