Skip to main content

User group mapping

If you use federations and have user groups on the identity provider side, you can configure group mapping to integrate them into Selectel user groups.

How it works

Users from the mapped identity provider group will be automatically added to the Selectel group upon initial authentication. Users will be assigned the permissions that you specify for the Selectel user group when configuring group mapping.

If permissions or user data change on the identity provider side, the changes will be applied in Selectel upon re-authentication.

One Selectel user group can be mapped to one identity provider group. Mapping a Selectel group to multiple identity provider groups or vice versa is not allowed.

Configure group mapping

  1. Create user groups.
  2. Add group mapping.
  3. Configure mappings on the identity provider side.
  4. Add users to the group on the identity provider side.

1. Create user groups

  1. Make sure you have a user group on the identity provider side.

  2. If you already have a user group on the Selectel side and want to use it for mapping, you do not need to create a new group. If you do not have a group or want to use a new one:

    2.1. Add a user group.

    2.2. Assign permissions to the user group.

2. Add group mapping

  1. In the control panel, on the top menu, click IAM.

  2. Go to Federations.

  3. Open the federation page → Group mapping tab.

  4. Click Map groups.

  5. In the Mapped groups section:

    5.1. Select the Selectel group you created at step 1 or earlier.

    5.2. Enter the identity provider group name.

  6. Optional: To add another group mapping, click Add mapping and follow step 5.

  7. Click Save settings.

3. Configure mappings on the identity provider side

  1. In the Keycloak control panel, log in to the administrator account (Administration Console).

  2. Go to Client scopes → Setup tab.

  3. Select the client scope formatted as <client_id>-dedicated. Here, <client_id> is the URL you specified when configuring the SAML application in the Client ID field.

  4. Configure user group mapping:

    4.1. On the Mappers tab, click Add mapper → By configuration → Group list.

    4.2. In the Name field, enter a name for the mapping.

    4.3. In the Group attribute names field, enter groups.

    4.4. Turn on the Single Group Attribute toggle switch.

    4.5. Turn off the Full group path toggle switch.

    4.6. Click Save.

  5. Configure user email address mapping:

    5.1. On the Mappers tab, click Add mapper → From predefined mappers → x500 email.

    5.2. Open the x500 email mapping.

    5.3. In the SAML Attribute Name field, enter email.

    5.4. Click Save.

  6. Configure user name mapping:

    6.1. On the Mappers tab, click Add mapper → From predefined mappers → x500 givenName.

    6.2. Open the x500 givenName mapping.

    6.3. In the SAML Attribute Name field, enter firstName.

    6.4. Click Save.

  7. Configure user last name mapping:

    7.1. On the Mappers tab, click Add mapper → From predefined mappers → x500 lastName.

    7.2. Open the x500 lastName mapping.

    7.3. In the SAML Attribute Name field, enter lastName.

    7.4. Click Save.

4. Add users to the group on the identity provider side

  1. In the Keycloak management console, go to the Users section.

  2. Open the user page → Groups tab.

  3. Click Join Group.

  4. Select the group to which you want to add the user.

Disable group mapping

Once group mapping is disabled, users will no longer be able to authenticate in the control panel via SSO.

You can re-enable group mapping at any time.

  1. In the control panel, on the top menu, click IAM.
  2. Go to the Federations section.
  3. Open the federation page → Group Mapping tab.
  4. In the Settings enabled block, turn off the toggle switch.

Delete group mapping

Once group mapping is deleted, users from the identity provider group will no longer be able to authenticate in the control panel via SSO.

If users are added to another Selectel group that has mapping configured, they will retain access within the scope of that other group's mapping.

  1. In the control panel, on the top menu, click IAM.
  2. Go to the Federations section.
  3. Open the federation page → Group Mapping tab.
  4. In the Mapped Groups block, in the mapping row, click .
  5. Click Save settings.