AWS Cognito Users Sync Tool Plugin

Introduction

The AWS Cognito Users Sync Tool allows you to synchronize users and groups from an AWS Cognito user pool with Joget. AWS Cognito is a managed service provided by Amazon Web Services (AWS) that helps you manage users, groups, and other services efficiently.

Note:
This tool is useful for syncing user data from AWS Cognito into Joget, particularly in scenarios requiring integration between the two platforms.

Plugin information

This plugin is part of the AWS Cognito Users Sync Tool bundle and is compatible with Joget DX 8.

Get started

Where to get the plugin

You can find the plugin source code and download the latest release from the following links:

How to install

  1. Download the plugin JAR file from the releases page.
  2. Go to Settings > Manage Plugins > Upload Plugin.
  3.  Once uploaded, the plugin will be available in your Joget environment.

How to use it

AWS cognito setup process

Retrieving access key and secret key

  1. Log in to the AWS Console.
  2. Click Security Credentials in the upper-right corner.
  3. Under Access Keys, click Create access key.
  4. Save the Access Key and Secret Key for later use when configuring the plugin.

Sample setup

Introduction

If you are new to AWS Cognito, you may continue reading this section. In this section, we will set up:-

  • a new user pool,
  • creating users,
  • creating groups,
  • assign users to groups

If you have already set up the user pool, you may skip this section.

Getting into AWS cognito

  1. Search for Cognito in the Search bar, and select Cognito.

Create AWS cognito user pool

  1. Create a user pool in the AWS Cognito service. You can create your user pool based on your preferences. 
  2. Note down the Region to be used for the plugin for later use.
    Configure Message Delivery

    Integrate Your App

    Initial App Client

  3. Save the User Pool ID to configure the plugin later.
  4. If you missed out on the Region, you can find it in the Messaging section after clicking into the user pool.

Create AWS cognito user

  1. Within the created User Pool, create a user.


  2. Click on the newly created user and modify the User Attributes.
  3. Add given_name and family_name as the attributes. This will be saved in the database for the plugin later.

Create AWS cognito group

  1. Create a Group in AWS Cognito.

  2. Assign a user to the group. Click on the user and Add the user to the group.


Demo setup summary

After going through all the steps above, here's what we have achieved so far:-

  • We have created 2 users - Demo User 1, Demo User 2.
  • We have created 1 group - JogetGroup1.

Here are the mappings of user with the respective group:

  • Demo User 1 - JogetGroup1
  • Demo User 2 - No group

Using the plugin

This tool can be configured in a scheduler, form post processing, or a tool which is part of a process. In this demo, we will run the tool upon form submission (post-form processing).

When we submit the form, the tool will run, the group and users from AWS Cognito will be imported into the selected Joget organization.

Groups Imported Into the Selected Organization in Joget


Users Imported Into Joget


Users Imported Into Joget

Configure AWS cognito users sync tool properties

Fields to configure:

  • Organization: Select an existing organization in Joget where AWS Cognito groups will be mapped.
  • Region: Select the AWS region. Ensure that it matches the region where your user pool is located.
  • Access Key: Provide the AWS Access Key (retrieved from your AWS account).  For more information, see how to retrieve the key.
  • Secret Key: Provide the AWS Secret Access Key (retrieved from your AWS account). For more information, see how to retrieve the key.
  • User Pool ID: Enter the User Pool ID from AWS Cognito.

Download plugin

Created by Julieth Last modified by Aadrian on Nov 19, 2024