Creating a user pool
-
Log in to Yandex Identity Hub
. -
In the left-hand panel, select
User pools. -
In the top-right corner of the page, click
Create user pool. -
Specify a name and description for the user pool.
The name must be unique within the organization and follow these naming requirements:
- It must be from 1 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
In the Default domain field, add the domain that will be used if there are no other domains associated with the pool.
-
Optionally, add labels:
- Click Add label.
- Enter a label in
key: valueformat. - Press Enter.
-
Optionally, in the Data available for editing field, select the user settings available for editing on the My account portal. By default, password management is allowed.
-
In the Lifetime session field, specify a time period for user sessions to remain active before requiring reauthentication in Yandex Identity Hub.
-
Click Create userpool.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
See the description of the CLI command for creating a user pool:
yc organization-manager idp userpool create --help -
Run this command:
yc organization-manager idp userpool create \ --organization-id <organization_ID> \ --userpool-name <pool_name> \ --description <pool_description> \ --default-subdomain <default_domain> \ --labels <key>=<value>[,<key>=<value>]Where:
-
--organization-id: ID of the organization you want to create a user pool in. -
--userpool-name: User pool name. The name must be unique within the organization and aligned with the naming requirements:- It must be from 1 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
--description: User pool description. This is an optional setting. -
--default-subdomain: Default domain. It will be used if no other domains are associated with the pool. -
--labels: List of labels. This is an optional setting. You can specify one or more labels separated by commas in<key1>=<value1>,<key2>=<value2>format.
-
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
-
Describe the user pool parameters in the configuration file:
resource "yandex_organizationmanager_idp_userpool" "example_userpool" { organization_id = "<organization_ID>" name = "<pool_name>" description = "<pool_description>" default_subdomain = "<default_domain>" labels = { <key> = "<value>" } user_settings { allow_edit_self_contacts = <true_or_false> allow_edit_self_info = <true_or_false> allow_edit_self_login = <true_or_false> allow_edit_self_password = <true_or_false> } }Where:
-
organization_id: ID of the organization you want to create a user pool in. -
name: User pool name. The name must be unique within the organization and aligned with the naming requirements:- It must be from 1 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
description: User pool description. This is an optional setting. -
default_subdomain: Default domain. It will be used if no other domains are associated with the pool. -
labels: List of labels. This is an optional setting. -
user_settings: User data available for editing on the My account portal. By default, password management is allowed. This is an optional setting. Includes the following options:allow_edit_self_contacts: Editing contact details.allow_edit_self_info: Editing personal data.allow_edit_self_login: Editing username.allow_edit_self_password: Editing password.
For more information about the
yandex_organizationmanager_idp_userpoolproperties, see this provider guide. -
-
Create the resources:
-
In the terminal, navigate to the configuration file directory.
-
Make sure the configuration is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create all the required resources. You can check the new resources and their settings in the Cloud Center UI
or using this CLI command:yc organization-manager idp userpool list --organization-id <organization_ID> -
Use the Userpool.Create REST API method for the Userpool resource or the UserpoolService/Create gRPC API call.