Skip to content

Commit 6110e2c

Browse files
kbukum1lecoursen
andauthored
Document OIDC support for org-level private registries (#60652)
Co-authored-by: Laura Coursen <lecoursen@github.com>
1 parent 6df77cb commit 6110e2c

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed

content/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ You need to be an **organization owner** to set up access to private registries
4343
1. Use the **URL** and **Type** fields to define the location and type of the registry:
4444
* **URL** is the location where you access the private registry. For example, to use the {% data variables.product.prodname_registry %} registry for NuGet: `https://nuget.pkg.github.com/ORGANIZATION/index.json`, where `ORGANIZATION` is the name of your organization on {% data variables.product.github %}.
4545
* **Type** is the type of registry.
46-
1. Select either **Token** or **Username and password**, depending on the authentication method, then enter data into the appropriate fields.
47-
Some types of authentication tokens, such as a {% data variables.product.github %} {% data variables.product.pat_generic_title_case %}, are tied to a particular user identity. Select the **Username and password** option for these and enter the relevant username as **Username** and the token as **Password**.
46+
1. Select the authentication method for the registry:
47+
* **Token**: Enter the token used to authenticate with the registry.
48+
* **Username and password**: Enter the username and password used to authenticate with the registry. Some types of authentication tokens, such as a {% data variables.product.github %} {% data variables.product.pat_generic_title_case %}, are tied to a particular user identity. Select this option for these and enter the relevant username as **Username** and the token as **Password**.
49+
{% ifversion org-private-registry-oidc %}
50+
* **OIDC (OpenID Connect)**: Use short-lived credentials from a cloud identity provider instead of storing long-lived secrets. When you select this option, choose a provider and fill in the provider-specific fields. For more information, see [Configuring OIDC authentication for a private registry](#configuring-oidc-authentication-for-a-private-registry).
51+
{% endif %}
4852
1. Define which repositories in the organization can access the private registry using these details: all, private and internal, or selected repositories only.
4953
1. When you have finished defining the private registry, select **Add Registry** to save the registry information.
5054

5155
> [!TIP]
52-
> When you add a private registry to an organization the token or password is stored as an encrypted secret. Once the registry is created, the token or password cannot be viewed again.
56+
> When you add a private registry to an organization using **Token** or **Username and password** authentication, the token or password is stored as an encrypted secret. Once the registry is created, the token or password cannot be viewed again.
5357
5458
### Enabling {% data variables.product.prodname_code_scanning %} default setup to use a registry definition
5559

@@ -77,6 +81,27 @@ Any private registries used by the build must also be accessible to the workflow
7781

7882
When you configure access to one or more private registries, {% data variables.product.prodname_dependabot %} can propose pull requests to upgrade a vulnerable dependency or to maintain a dependency, see [AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot) and [AUTOTITLE](/code-security/dependabot/working-with-dependabot/guidance-for-the-configuration-of-private-registries-for-dependabot).
7983

84+
{% ifversion org-private-registry-oidc %}
85+
86+
### Configuring OIDC authentication for a private registry
87+
88+
OIDC (OpenID Connect) authentication allows {% data variables.product.prodname_dependabot %} to use short-lived credentials from your cloud identity provider to access private registries, eliminating the need to store long-lived secrets. With OIDC, credentials are generated dynamically for each {% data variables.product.prodname_dependabot %} update job. You must configure a trust relationship between your cloud provider and {% data variables.product.github %} before {% data variables.product.prodname_dependabot %} can authenticate.
89+
90+
> [!NOTE]
91+
> OIDC authentication for organization-level private registries is currently supported by {% data variables.product.prodname_dependabot %}. It is not supported by {% data variables.product.prodname_code_scanning %} default setup.
92+
93+
When you select **OIDC** as the authentication method for a private registry, choose one of the supported providers and fill in the required fields:
94+
95+
* **Azure**: Enter the **Tenant ID** (Azure AD tenant ID) and **Client ID** (Azure AD application client ID). You must configure a federated credential in Azure AD that trusts {% data variables.product.github %}'s OIDC provider.
96+
* **AWS CodeArtifact**: Enter the **AWS Region**, **Account ID** (AWS account ID), **Role Name** (IAM role name), **Domain** (CodeArtifact domain), and **Domain Owner** (CodeArtifact domain owner / AWS account ID). You can optionally provide an **Audience**. You must configure an IAM OIDC identity provider in AWS that trusts {% data variables.product.github %}'s OIDC provider.
97+
* **JFrog Artifactory**: Enter the **OIDC Provider Name**. You can optionally provide an **Audience** and **Identity Mapping Name**.
98+
99+
The authentication type of a private registry cannot be changed after creation. To switch from OIDC to another authentication method, or vice versa, delete the existing registry and create a new one.
100+
101+
For more information about how OIDC works, see [AUTOTITLE](/actions/concepts/security/openid-connect).
102+
103+
{% endif %}
104+
80105
{% ifversion code-quality %}
81106

82107
## {% data variables.product.prodname_code_quality_short %} access to private registries

content/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/configuring-access-to-private-registries-for-dependabot.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ For specific ecosystems, you can configure {% data variables.product.prodname_de
3232

3333
{% ifversion org-private-registry %}
3434

35-
You can configure {% data variables.product.prodname_dependabot %}'s access to private registries at the org-level. For more information on how to configure that, see [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/giving-org-access-private-registries).
35+
You can configure {% data variables.product.prodname_dependabot %}'s access to private registries at the org-level.
36+
{% ifversion org-private-registry-oidc %}
37+
Organization-level registries support **Token**, **Username and password**, and **OIDC** authentication.
38+
{% endif %}
39+
For more information about configuration, see [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/giving-org-access-private-registries).
3640

3741
{% endif %}
3842

@@ -126,6 +130,13 @@ If your private registry is configured with an IP allow list, you can find the I
126130

127131
With OIDC-based authentication, {% data variables.product.prodname_dependabot %} update jobs can dynamically obtain short-lived credentials from your cloud identity provider, just like {% data variables.product.prodname_actions %} workflows using OIDC federation.
128132

133+
{% ifversion org-private-registry-oidc %}
134+
135+
> [!TIP]
136+
> OIDC authentication is also available for **organization-level** private registries, which you can configure through the organization settings UI or the REST API. For more information, see [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/giving-org-access-private-registries#configuring-oidc-authentication-for-a-private-registry).
137+
138+
{% endif %}
139+
129140
{% data variables.product.prodname_dependabot %} supports OIDC authentication for any registry type that uses `username` and `password` authentication, when the registry is hosted on one of the following cloud providers:
130141

131142
* AWS CodeArtifact
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference: github/github#419577
2+
# OIDC authentication support for organization-level private registries used by Dependabot.
3+
# This allows organizations to authenticate with private registries using OpenID Connect
4+
# instead of storing long-lived secrets.
5+
versions:
6+
fpt: '*'
7+
ghec: '*'

0 commit comments

Comments
 (0)