Configuring a federated user group mapping
To configure user access to Yandex Cloud resources using group mapping:
-
Create user groups in Identity Hub.
-
Configure their access permissions to Yandex Cloud resources.
-
Create user groups in your identity provider and add users to them.
Note
You can use existing user groups.
-
Set up user group mapping in the identity provider's SAML attribute settings. To learn how to do this, consult the identity provider's documentation or contact their support.
Identity providers offer guides on how to set up group mapping:
-
Set up user group mapping in the federation settings:
Note
To configure user group mapping on the Yandex Cloud side, assign the user one of the following roles:
organization-manager.federations.editororganization-manager.federations.adminorganization-manager.editororganization-manager.admin
The role must be assigned for the groups you intend to map.
Cloud Center UITerraform-
Log in to Yandex Identity Hub
with an administrator or organization owner account. -
In the left-hand panel, select
Federations. -
Click the line with the required federation and go to the IdP group tab.
-
Enable Mapping group in IdP.
-
Click Add group and configure mapping:
- Group name: Enter the name of an identity provider group.
- IAM group: Select a Identity Hub group from the list.
-
Repeat the previous step for each group you want to map.
-
Click Save.
With Terraform
, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.Terraform is distributed under the Business Source License
. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.For more information about the provider resources, see the relevant documentation on the Terraform
website or its mirror.If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
-
In the Terraform configuration file, describe the resources you want to create:
# Enabling federated user group mapping resource "yandex_organizationmanager_group_mapping" "my_group_map" { federation_id = "<federation_ID>" enabled = true } # Configuring a federated user group mapping resource "yandex_organizationmanager_group_mapping_item" "group_mapping_item" { federation_id = "<federation_ID>" internal_group_id = "<Cloud_Organization_group>" external_group_id = "<identity_provider_group>" depends_on = [yandex_organizationmanager_group_mapping.my_group_map] } resource "yandex_organizationmanager_group_mapping_item" "group_mapping_item-2" { federation_id = "<federation_ID>" internal_group_id = "<Cloud_Organization_group>" external_group_id = "<identity_provider_group>" depends_on = [yandex_organizationmanager_group_mapping.my_group_map] }Where:
federation_id: Federation ID.internal_group_id: Identity Hub group name.external_group_id: Name of an identity provider group.
For more information about
yandex_organizationmanager_group_mapping_itemproperties, see the relevant provider documentation. -
Create the resources:
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is correct, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.
-
Apply the changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create all the required resources. You can check resource availability in Yandex Identity Hub
. -