Skip to main content

User Group Mapping

Last update:

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 a mapped identity provider group will be added to the Selectel group automatically upon first 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.

You can map one identity provider group to one Selectel user group. You cannot map a Selectel group to multiple identity providers, or vice versa.

Configure group mapping

  1. Create user groups.
  2. Add group mapping.
  3. Configure mappings on the identity provider side.
  4. Add users to a 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 you want to use it for mapping, you do not need to create a new group. If you do not have a group or would like 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 the Federations section.

  3. Open the federation page → Group Mapping tab.

  4. Click Map groups.

  5. In the Mapped groups block:

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

    5.2. Enter the name of the identity provider group.

  6. Optional: to add another group mapping, click Add mapping and repeat 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 the Client scopes section → Setup tab.

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

  4. Configure user group mapping:

    4.1. On the Mappers tab, click Add mapperBy configurationGroup 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.

    4.5. Turn off the Full group path toggle.

    4.6. Click Save.

  5. Configure user email mapping:

    5.1. On the Mappers tab, click Add mapperFrom predefined mappersx500 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 mapperFrom predefined mappersx500 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 surname mapping:

    7.1. On the Mappers tab, click Add mapperFrom predefined mappersx500 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 a group on the identity provider side

  1. In the Keycloak control panel, go to the Users section.

  2. Open the user page → Groups tab.

  3. Click Join Group.

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

Disable group mapping

After disabling group mapping, users will no longer be able to authenticate to 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.

Delete group mapping

After deleting group mapping, users from the identity provider group will no longer be able to authenticate to the control panel via SSO.

If users are added to another Selectel group that has mapping configured, they will retain access as part of the 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.