Group mapping
Group mapping lets you sync user groups from your identity provider (IdP) with teams in your Docker organization. This automates team membership management, keeping your Docker teams up to date based on changes in your IdP. You can use group mapping once you have configured single sign-on (SSO).
Tip
Group mapping is ideal for adding users to multiple organizations or multiple teams within one organization. If you don't need to set up multi-organization or multi-team assignment, you can use SCIM user-level attributes.
How group mapping works
With group mapping enabled, when a user authenticates through SSO, your IdP shares key attributes with Docker, such as the user's email address, name, and groups. Docker uses these attributes to create or update the user's profile, as well as to manage their team and organization assignments. With group mapping, users’ team memberships in Docker automatically reflect changes made in your IdP groups.
It's important to note that Docker uses the user's email address as a unique identifier. Each Docker account must always have a unique email address.
Use group mapping
To assign users to Docker teams through your IdP, you must create groups in your IdP following the naming pattern: organization:team
. For example, if your organization is called "moby" and you want to manage the "developers" team, the group name in your IdP should be moby:developers
. In this example, any user added to this group in your IdP is automatically assigned to the "developers" team in Docker.
You can also use this format to assign users to multiple organizations. For example, to add a user to the "backend" team in the "moby" organization and the "desktop" team in the "whale" organization, the group names would be moby:backend
and whale:desktop
.
Tip
Match the group names in your IdP with your Docker teams. When groups are synced, Docker creates a team if it doesn’t already exist.
The following lists the supported group mapping attributes:
Attribute | Description |
---|---|
id | Unique ID of the group in UUID format. This attribute is read-only. |
displayName | Name of the group following the group mapping format: organization:team . |
members | A list of users that are members of this group. |
members(x).value | Unique ID of the user that is a member of this group. Members are referenced by ID. |
The general steps to use group mapping are:
- In your IdP, create groups with the
organization:team
format. - Add users to the group.
- Add the Docker application that you created in your IdP to the group.
- Add attributes in the IdP.
- Push groups to Docker.
The exact configuration may vary depending on your IdP. You can use group mapping with SSO, or with SSO and SCIM enabled.
Use group mapping with SSO
The following steps describe how to set up and use group mapping with SSO connections that use the SAML authentication method. Note that group mapping with SSO isn't supported with the Azure AD (OIDC) authentication method. Additionally, SCIM isn't required for these configurations.
The user interface for your IdP may differ slightly from the following steps. You can refer to the Okta documentation to verify.
To set up group mapping:
- Sign in to Okta and open your application.
- Navigate to the SAML Settings page for your application.
- In the Group Attribute Statements (optional) section, configure like the following:
- Name:
groups
- Name format:
Unspecified
- Filter:
Starts with
+organization:
whereorganization
is the name of your organization The filter option will filter out the groups that aren't affiliated with your Docker organization.
- Name:
- Create your groups by selecting Directory, then Groups.
- Add your groups using the format
organization:team
that matches the names of your organization(s) and team(s) in Docker. - Assign users to the group(s) that you create.
The next time you sync your groups with Docker, your users will map to the Docker groups you defined.
The user interface for your IdP may differ slightly from the following steps. You can refer to the Entra ID documentation to verify.
To set up group mapping:
- Sign in to Entra ID and open your application.
- Select Manage, then Single sign-on.
- Select Add a group claim.
- In the Group Claims section, select Groups assigned to the application with the source attribute Cloud-only group display names (Preview).
- Select Advanced options, then the Filter groups option.
- Configure the attribute like the following:
- Attribute to match:
Display name
- Match with:
Contains
- String:
:
- Attribute to match:
- Select Save.
- Select Groups, All groups, then New group to create your group(s).
- Assign users to the group(s) that you create.
The next time you sync your groups with Docker, your users will map to the Docker groups you defined.
Use group mapping with SCIM
The following steps describe how to set up and use group mapping with SCIM. Before you begin, make sure you set up SCIM first.
The user interface for your IdP may differ slightly from the following steps. You can refer to the Okta documentation to verify.
To set up your groups:
- Sign in to Okta and open your application.
- Select Applications, then Provisioning, and Integration.
- Select Edit to enable groups on your connection, then select Push groups.
- Select Save. Saving this configuration will add the Push Groups tab to your application.
- Create your groups by navigating to Directory and selecting Groups.
- Add your groups using the format
organization:team
that matches the names of your organization(s) and team(s) in Docker. - Assign users to the group(s) that you create.
- Return to the Integration page, then select the Push Groups tab to open the view where you can control and manage how groups are provisioned.
- Select Push Groups, then Find groups by rule.
- Configure the groups by rule like the following:
- Enter a rule name, for example
Sync groups with Docker Hub
- Match group by name, for example starts with
docker:
or contains:
for multi-organization - If you enable Immediately push groups by rule, sync will happen as soon as there's a change to the group or group assignments. Enable this if you don't want to manually push groups.
- Enter a rule name, for example
Find your new rule under By rule in the Pushed Groups column. The groups that match that rule are listed in the groups table on the right-hand side.
To push the groups from this table:
- Select Group in Okta.
- Select the Push Status drop-down.
- Select Push Now.
The user interface for your IdP may differ slightly from the following steps. You can refer to the Entra ID documentation to verify.
Complete the following before configuring group mapping:
- Sign in to Entra ID and go to your application.
- In your application, select Provisioning, then Mappings.
- Select Provision Microsoft Entra ID Groups.
- Select Show advanced options, then Edit attribute list.
- Update the
externalId
type toreference
, then select the Multi-Value checkbox and choose the referenced object attributeurn:ietf:params:scim:schemas:core:2.0:Group
. - Select Save, then Yes to confirm.
- Go to Provisioning.
- Toggle Provision Status to On, then select Save.
Next, set up group mapping:
- Go to the application overview page.
- Under Provision user accounts, select Get started.
- Select Add user/group.
- Create your group(s) using the
organization:team
format. - Assign the group to the provisioning group.
- Select Start provisioning to start the sync.
To verify, select Monitor, then Provisioning logs to see that your groups were provisioned successfully. In your Docker organization, you can check that the groups were correctly provisioned and the members were added to the appropriate teams.
Once complete, a user who signs in to Docker through SSO is automatically added to the organizations and teams mapped in the IdP.
Tip
Enable SCIM to take advantage of automatic user provisioning and de-provisioning. If you don't enable SCIM users are only automatically provisioned. You have to de-provision them manually.
More resources
The following videos demonstrate how to use group mapping with your IdP with SCIM enabled: