Skip to content

Commit fe270fc

Browse files
Nishnhamchammer01Copilot
authored
Open ID connect for Dependabot docs (#59494)
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8a735e7 commit fe270fc

File tree

4 files changed

+90
-8
lines changed

4 files changed

+90
-8
lines changed

content/actions/concepts/security/openid-connect.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ For more information, see [AUTOTITLE](/actions/reference/openid-connect-referenc
115115

116116
{% data variables.product.prodname_actions %} workflows can use OIDC tokens instead of secrets to authenticate with cloud providers. Many popular cloud providers offer official login actions that simplify the process of using OIDC in your workflows. For more information about updating your workflows with specific cloud providers, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments).
117117

118+
## OIDC support for {% data variables.product.prodname_dependabot %}
119+
120+
{% data variables.product.prodname_dependabot %} can use OIDC to authenticate with private registries, eliminating the need to store long-lived credentials as repository secrets. With OIDC-based authentication, {% data variables.product.prodname_dependabot %} update jobs can dynamically obtain short-lived credentials from your cloud identity provider.
121+
122+
{% data variables.product.prodname_dependabot %} supports OIDC authentication for any registry type that uses `username` and `password` authentication, when the registry is hosted on AWS CodeArtifact, Azure DevOps Artifacts, or JFrog Artifactory.
123+
124+
The benefits of OIDC authentication for {% data variables.product.prodname_dependabot %} are:
125+
126+
* **Enhanced security:** Eliminates static, long-lived credentials from your repositories.
127+
* **Simpler management:** Enables secure, policy-compliant access to private registries.
128+
* **Avoid rate limiting:** Dynamic credentials help you avoid hitting rate limits associated with static tokens.
129+
130+
For more information, see [AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#using-oidc-for-authentication).
131+
118132
## Next steps
119133

120134
For more information about configuring OIDC, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments).

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

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,22 @@ If your private registry is configured with an IP allow list, you can find the I
124124

125125
{% endif %}
126126

127+
## Using OIDC for authentication
128+
129+
{% data variables.product.prodname_dependabot %} can use OpenID Connect (OIDC) to authenticate with private registries, eliminating the need to store long-lived credentials as repository secrets.
130+
131+
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.
132+
133+
{% 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:
134+
135+
* AWS CodeArtifact
136+
* Azure DevOps Artifacts
137+
* JFrog Artifactory
138+
139+
To configure OIDC authentication, you need to specify `tenant-id` and `client-id` instead of `username` and `password` in your registry configuration.
140+
141+
For more information about how OIDC works, see [AUTOTITLE](/actions/concepts/security/openid-connect).
142+
127143
## Allowing external code execution
128144

129145
When you give {% data variables.product.prodname_dependabot %} access to one or more registries, external code execution is automatically disabled to protect your code from compromised packages. However, some version updates may fail.
@@ -363,6 +379,22 @@ registries:
363379

364380
{% endraw %}
365381

382+
You can also use OIDC authentication to access JFrog Artifactory. {% data reusables.dependabot.dependabot-oidc-credentials %}
383+
384+
{% raw %}
385+
386+
```yaml copy
387+
registries:
388+
maven-artifactory-oidc:
389+
type: maven-repository
390+
url: https://acme.jfrog.io/artifactory/my-maven-registry
391+
tenant-id: ${{secrets.ARTIFACTORY_TENANT_ID}}
392+
client-id: ${{secrets.ARTIFACTORY_CLIENT_ID}}
393+
replaces-base: true
394+
```
395+
396+
{% endraw %}
397+
366398
### `npm-registry`
367399

368400
The `npm-registry` type supports username and password, or token. {% data reusables.dependabot.password-definition %}
@@ -433,6 +465,23 @@ registries:
433465

434466
{% endraw %}
435467

468+
You can also use OIDC authentication to access Azure DevOps Artifacts. {% data reusables.dependabot.dependabot-oidc-credentials %}
469+
470+
{% raw %}
471+
472+
```yaml copy
473+
registries:
474+
nuget-azure-devops-oidc:
475+
type: nuget-feed
476+
url: https://pkgs.dev.azure.com/MyOrganization/MyProject/_packaging/MyArtifactFeedName/nuget/v3/index.json
477+
tenant-id: ${{secrets.AZURE_TENANT_ID}}
478+
client-id: ${{secrets.AZURE_CLIENT_ID}}
479+
```
480+
481+
{% endraw %}
482+
483+
The `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` values can be obtained from the overview page of your Entra ID app registration.
484+
436485
### `pub-repository`
437486

438487
The `pub-repository` type supports a URL and a token.
@@ -490,6 +539,22 @@ registries:
490539

491540
{% endraw %}
492541

542+
You can also use OIDC authentication to access Azure DevOps Artifacts. {% data reusables.dependabot.dependabot-oidc-credentials %}
543+
544+
{% raw %}
545+
546+
```yaml copy
547+
registries:
548+
python-azure-oidc:
549+
type: python-index
550+
url: https://pkgs.dev.azure.com/octocat/_packaging/my-feed/pypi/example
551+
tenant-id: ${{secrets.AZURE_TENANT_ID}}
552+
client-id: ${{secrets.AZURE_CLIENT_ID}}
553+
replaces-base: true
554+
```
555+
556+
{% endraw %}
557+
493558
### `rubygems-server`
494559

495560
The `rubygems-server` type supports username and password, or token. {% data reusables.dependabot.password-definition %}

content/code-security/reference/supply-chain-security/dependabot-options-reference.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -932,24 +932,26 @@ The parameters used to provide authentication details for access to a private re
932932
| Registry `type` | Required authentication parameters |
933933
|--|--|
934934
| `cargo-registry` | `token` |
935-
| `composer-repository` | `username` and `password` |
936-
| `docker-registry` | `username` and `password` |
937-
| `git` | `username` and `password` |
935+
| `composer-repository` | `username` and `password`<br>or OIDC with `tenant-id` and `client-id` |
936+
| `docker-registry` | `username` and `password`<br>or OIDC with `tenant-id` and `client-id` |
937+
| `git` | `username` and `password`<br>or OIDC with `tenant-id` and `client-id` |
938938
| `hex-organization` | `organization` and `key` |
939939
| `hex-repository` | `repo` and `auth-key` optionally with the corresponding `public-key-fingerprint` |
940-
| `maven-repository` | `username` and `password` |
941-
| `npm-registry` | `username` and `password`<br>or `token` |
942-
| `nuget-feed` | `username` and `password`<br>or `token` |
940+
| `maven-repository` | `username` and `password`<br>or OIDC with `tenant-id` and `client-id` |
941+
| `npm-registry` | `username` and `password`<br>or `token`<br>or OIDC with `tenant-id` and `client-id` |
942+
| `nuget-feed` | `username` and `password`<br>or `token`<br>or OIDC with `tenant-id` and `client-id` |
943943
| `pub-registry` | `token` |
944-
| `python-index` | `username` and `password`<br>or `token` |
945-
| `rubygems-server` | `username` and `password`<br>or `token` |
944+
| `python-index` | `username` and `password`<br>or `token`<br>or OIDC with `tenant-id` and `client-id` |
945+
| `rubygems-server` | `username` and `password`<br>or `token`<br>or OIDC with `tenant-id` and `client-id` |
946946
| `terraform-registry` | `token` |
947947

948948
All sensitive data used for authentication should be stored securely and referenced from that secure location, see [AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot).
949949

950950
> [!TIP]
951951
> {% data reusables.dependabot.password-definition %}
952952

953+
For more information about OIDC support for {% data variables.product.prodname_dependabot %}, see [AUTOTITLE](/actions/concepts/security/openid-connect#oidc-support-for-dependabot) and [AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot#using-oidc-for-authentication).
954+
953955
### `url` and `replaces-base`
954956

955957
The `url` parameter defines where to access a registry. When the optional `replaces-base` parameter is enabled (`true`), {% data variables.product.prodname_dependabot %} resolves dependencies using the value of `url` rather than the base URL of that specific ecosystem.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
With OIDC, {% data variables.product.prodname_dependabot %} dynamically obtains short-lived credentials instead of using static credentials.

0 commit comments

Comments
 (0)