How-tos

Set Up Identity Pool for Authentication

The Identity Pool IDP is a link between the Identity Pool and a specific workspace, allowing the users from a particular pool to log in to applications in the workspace where the IDP is registered.

Identity Pool IDP in a Nutshell

The Identity Pool authentication & identity provider is a Cloudentity-native IDP, allowing the Cloudentity Identity Pool users within a Cloudentity tenant to authenticate and confirm their identity. Identity Pool IDPs are always a unique representation of exactly one Identity Pool in the workspace - you cannot connect multiple IDPs to the same Identity Pool.

Identity Pool APIs are used in Cloudentity in the following way:

  • Self-registration by the user

    [mermaid-begin]
    sequenceDiagram autonumber participant userInactive as Inactive User participant Cloudentity participant userActive as Active User userInactive-->>Cloudentity: /createUser status: new userInactive-->>Cloudentity: /sendActivationMessage Cloudentity-->>userInactive: Activation message with OTP userInactive-->>Cloudentity: /activateSelfRegisteredUser with OTP Cloudentity-->>userInactive: Activate (set status: active) userInactive-->>userActive: Change status
  • Registration of user by administrator as performed by Cloudentity. Administrators can either register an inactive user who then must activate their account with an OTP, or set the password for the user directly.

    [mermaid-begin]
    sequenceDiagram participant userInactive as Inactive User participant userActive as Active User participant admin as Administrator participant Cloudentity alt Registration of inactive user admin-->>Cloudentity: /createUser status: new admin-->>Cloudentity: /sendActivationMessage Cloudentity-->>userInactive: Activation message with OTP userInactive-->>Cloudentity: /activateSelfRegisteredUser Cloudentity-->>userInactive: Activate (status: active) userInactive-->>userActive: Change status else Registration of active user with password admin-->>Cloudentity: /createUser status: active Cloudentity-->>userActive: Active user with password set end

Users registered in Identity Pools have the possibility to change their password from the client application. If they do, the following flow is triggered:

[mermaid-begin]
sequenceDiagram autonumber User-->>Cloudentity: /changePassword Cloudentity-->>User: Request old and new password User-->>Cloudentity: Provide old and new password Cloudentity-->>User: Password changed, log out

The Identity API, however, can be used differently if necessary. For more details, please check Identity Administration API reference.

Prerequisites

At least one Identity Pool must be created in your tenant.

Connect Identity Pool IDP

Basic Configuration

  1. In your workspace, go to Identity Data > Identity Providers > Create Identity.

  2. Under User Pools, select the user pool for the Identity Provider.

  3. Give your user pool a name and click Save. The configuration form opens.

  4. Optionally, enable Authentication context caching.

    Tip

    You can enable the authentication context caching if you want Cloudentity to store the user’s authentication data. If you do, specify the cache Time To Live as well. Learn more by reading Stateful authorization with Cloudentity.

  5. Select Save.

    Result

    Your new IDP connection is created. Users can now authenticate via the OIDC-compliant IDP.

Configure Advanced Settings

Advanced settings contain optional features which may be necessary to use in specific cases.

  1. From the Identity Data > Identity Providers > YOUR_IDENTITY > Configuration page, select Advanced settings at the bottom.

  2. In the Authentication Method Reference you can select an authentication method to be written into the amr object returned by the IDP.

    The amr object is created if it doesn’t exist. If it exists, its values are replaced with the selected item.

  3. Select Save.

Attributes and Mapping

In case of the Identity Pool IDP, please stick to the predefined configuration for attributes and mapping in case you have used the pre-defined schema for a given pool. If you have applied a custom schema for a given identity pool, then make sure the new schema attributes are mapped correctly, to ensure the attributes are made available to the Cloudentity authentication context on successful authentication.

Test Identity Pool IDP

  1. Open the user portal (to get the URL, go to Applications > Clients > User portal and copy the Redirect URL).

  2. Select your configured IDP. You have the following features at your disposal:

    • If you already have an active account, you can authenticate with your identifier (e-mail or phone) and the OTP or password (depending on which method is configured for the underlying Identity Pool).

    • You can register a new account if public registration is allowed by the underlying Identity Pool. You will be asked to provide data in accordance with the Payload Schema assigned to the Identity Pool.

    • You can send OTPs or reset your password

    Check the video below for an overview of the available features.

If you want to add users as an administrator, check the Configuring Identity Pools documentation, as this is done from the Identity Pool level.

Updated: Oct 14, 2022