You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-jfrog.md
+34-41Lines changed: 34 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -47,59 +47,52 @@ To use OIDC with JFrog, establish a trust relationship between {% data variables
47
47
48
48
## Updating your {% data variables.product.prodname_actions %} workflow
49
49
50
-
Once you establish a trust relationship between {% data variables.product.prodname_actions %} and the JFrog platform, you can update your {% data variables.product.prodname_actions %} workflow file.
50
+
### Authenticating with JFrog using OIDC
51
51
52
52
In your {% data variables.product.prodname_actions %} workflow file, ensure you are using the provider name and audience you configured in the JFrog Platform.
53
53
54
-
The following example uses the placeholder`YOUR_PROVIDER_NAME`.
54
+
The following example uses the placeholders`YOUR_PROVIDER_NAME` and `YOUR_AUDIENCE`.
Alternatively, you can set the audience as an environment variable using the `env` context. For more information about the `env` context, see [AUTOTITLE](/actions/learn-github-actions/contexts#env-context).
83
-
84
-
{% data reusables.actions.oidc-deployment-protection-rules %}
Then, in your workflow file, retrieve the value of the variables stored in the `env` context. The following example uses the `env` context to retrieve the OIDC audience.
78
+
> [!TIP]
79
+
> When OIDC authentication is used, the `setup-jfrog-cli` action automatically provides `oidc-user` and `oidc-token` as step outputs.
80
+
> These can be used for other integrations that require authentication with JFrog.
81
+
> To reference these outputs, ensure the step has an explicit `id` defined (for example `id: setup-jfrog-cli`).
95
82
83
+
### Using OIDC Credentials in other steps
96
84
```yaml
97
-
- name: Get ID Token (using env context)
98
-
uses: {% data reusables.actions.action-github-script %}
99
-
id: idtoken
85
+
- name: Sign in to Artifactory Docker registry
86
+
uses: docker/login-action@v3
100
87
with:
101
-
script: |
102
-
const coredemo = require('@actions/core');
103
-
let id_token = await coredemo.getIDToken(process.env.OIDC_AUDIENCE);
- [OpenID Connect Integration](https://jfrog.com/help/r/jfrog-platform-administration-documentation/openid-connect-integration) in the JFrog documentation
96
+
- [Identity Mappings](https://jfrog.com/help/r/jfrog-platform-administration-documentation/identity-mappings) in the JFrog documentation
0 commit comments