Create an SSO connection
Creating a single sign-on (SSO) connection requires setting up the connection in Docker first, followed by setting up the connection in your identity provider (IdP). This guide provides steps for setting up your SSO connection in Docker and your IdP.
情報
This guide requires copying and pasting values in both Docker and your IdP. To ensure a seamless connection process, complete all the steps in this guide in one session and keep separate browsers open for both Docker and your IdP.
Prerequisites
Make sure you have completed the following before you begin:
- Your domain is verified
- You have an account set up with an IdP
- You have completed the steps in the Configure single sign-on guide
Step one: Create an SSO connection in Docker
メモ
Before creating an SSO connection in Docker, you must verify at least one domain.
早期アクセス
Docker Admin Console は early access 製品です。
It's available to all company owners and organization owners. You can still manage organizations in Docker Hub, but the Admin Console includes company-level management and enhanced features for organization management.
- Sign in to the Admin Console.
- Select your organization or company from the Choose profile page. Note that when an organization is part of a company, you must select the company and configure the domain for the organization at the company level.
- Under Security and access, select SSO and SCIM.
- Select Create Connection and provide a name for the connection.
- Select an authentication method, SAML or Azure AD (OIDC).
- Copy the following fields to add to your IdP:
- Okta SAML: Entity ID, ACS URL
- Azure OIDC: Redirect URL
- Keep this window open so you can paste the connection information from your IdP here at the end of this guide.
- Sign in to Docker Hub.
- Select Organizations and then your organization from the list.
- On your organization page, select Settings and then Security.
- In the SSO connection table, select Create Connection and provide a name for the connection.
- Select an authentication method, SAML or Azure AD (OIDC).
- Copy the following fields to add to your IdP:
- Okta SAML: Entity ID, ACS URL
- Azure OIDC: Redirect URL
- Keep this window open so you can paste the connection information from your IdP here at the end of this guide.
Step two: Create an SSO connection in your IdP
The user interface for your IdP may differ slightly from the following steps. Refer to the documentation for your IdP to verify.
- Sign in to your Okta account.
- Select Admin to open the Okta Admin portal.
- From the left-hand navigation, select Administration.
- Select Administration and then Create App Integration.
- Select SAML 2.0 and then Next.
- Enter "Docker Hub" as your App Name.
- Optional. Upload a logo.
- Select Next.
- Enter the following values from Docker into their corresponding Okta fields:
- Docker ACS URL: Single Sign On URL
- Docker Entity ID: Audience URI (SP Entity ID)
- Configure the following settings in Okta:
- Name ID format:
EmailAddress
- Application username:
Email
- Update application on:
Create and update
- Name ID format:
- Select Next.
- Select the This is an internal app that we have created checkbox.
- Select Finish.
- Sign in to your Azure AD admin portal.
- Select Default Directory and then Add.
- Choose Enterprise Application and select Create your own application.
- Enter "Docker" for application name and select the non-gallery option.
- After the application is created, go to Single Sign-On and select SAML.
- Select Edit on the Basic SAML configuration section.
- Enter the following values from Docker into their corresponding Azure fields:
- Docker Entity ID: Identifier
- Docker ACS URL: Reply URL
- Save configuration.
- From the SAML Signing Certificate section, download your Certificate (Base64).
To create an Azure Connect (OIDC) connection, you must create an app registration, client secrets, and configure API permissions for Docker:
Create app registration
- Sign in to your Azure AD admin portal.
- Select App Registration and then New Registration.
- Enter "Docker Hub SSO" or similar for application name.
- Under Supported account types, specify who can use this application or access the app.
- In the Redirect URI section, select Web from the drop-down menu and paste the Redirect URI value from the Docker console into this field.
- Select Register to register the app.
- Copy the Client ID from the app's overview page. You need this information to continue configuring SSO in Docker.
Create client secrets
- Open your app in Azure AD and select Certificates & secrets.
- Select + New client secret.
- Specify the description of the secret and set how long keys can be used.
- Select Add to continue.
- Copy the secret Value field. You need this to continue configuring SSO in Docker.
Configure API permissions
- Open your app in Azure AD and navigate to your app settings.
- Select API permission and then Grant admin consent for [your tenant name].
- Select Yes to confirm.
- After confirming, select Add a permission and then Delegated permissions.
- Search for
User.Read
and select this option. - Select Add permissions to confirm.
- Verify admin consent was granted for each permission by checking the Status column.
Step three: Connect Docker and your IdP
After creating your connection in Docker and your IdP, you can cross-connect them to complete your SSO connection:
- Open your app you created in Okta and select View SAML setup instructions.
- Copy the following values from the Okta SAML setup instruction page:
- SAML Sign-in URL
- x509 Certificate
- Open Docker Hub or the Admin Console. Your SSO configuration page should still be open from Step one of this guide.
- Select Next to open the Update single-sign on connection page.
- Paste your Okta SAML Sign-in URL and x509 Certificate values in Docker.
- Select Next.
- Optional. Select a default team to provision users to and select Next.
- Verify your SSO connection details and select Create Connection.
- Open your app in Azure AD.
- Open your downloaded Certificate (Base64) in a text editor.
- Copy the following values:
- From Azure AD: Login URL
- Copy your the contents of your Certificate (Base64) file from your text editor
- Open Docker Hub or the Admin Console. Your SSO configuration page should still be open from Step one of this guide.
- Paste your Login URL and Certificate (Base64) values in Docker.
- Select Next.
- Optional. Select a default team to provision users to and select Next.
- Verify your SSO connection details and select Create Connection.
- Open Docker Hub or the Admin Console. Your SSO configuration page should still be open from Step one of this guide.
- Paste the following values from Azure AD in to Docker:
- Client ID
- Client Secret
- Azure AD Domain
- Select Next.
- Optional. Select a default team to provision users to and select Next.
- Verify your SSO connection details and select Create Connection.
Step four: Test your connection
After you've completed the SSO connection process in Docker, we recommend testing it:
- Open an incognito browser.
- Sign in to the Admin Console using your domain email address.
- The browser will redirect to your IdP's login page to authenticate.
- Authenticate through your domain email instead of using your Docker ID.
You can also test your SSO connection through the command-line interface (CLI). If you want to test through the CLI, your users must have a personal access token (PAT).
Optional: Enforce SSO
重要
If SSO isn't enforced, users can choose to sign in with either their Docker username and password or SSO.
Enforcing SSO requires users to use SSO when signing into Docker. This centralizes authentication and enforces policies set by the IdP.
- Sign in to the Admin Console.
- Select your organization or company from the Choose profile page. Note that when an organization is part of a company, you must select the company and configure the domain for the organization at the company level.
- Under Security and access, select SSO and SCIM.
- In the SSO connections table, select the Action icon and then Enable enforcement. When SSO is enforced, your users are unable to modify their email address and password, convert a user account to an organization, or set up 2FA through Docker Hub. If you want to use 2FA, you must enable 2FA through your IdP.
- Continue with the on-screen instructions and verify you've completed all tasks.
- Select Turn on enforcement to complete.
Your users must now sign in to Docker with SSO.
More resources
The following videos demonstrate how to enforce SSO.