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: jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/oidc-authentication.md
+5-59Lines changed: 5 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,63 +4,9 @@ description: Authenticating using OpenID Connect (OIDC)
4
4
5
5
# OIDC Authentication
6
6
7
-
## **General**
7
+
**The JFrog Security documentation has a new home!**\
8
+
You can now find it [here](https://jfrog.com/help/p/security-home), including sections on:
8
9
9
-
The sensitive connection details, such as the access token used by JFrog Frogbot, can be automatically generated by the action instead of storing it as a secret in GitHub. This is made possible by leveraging the OpenID-Connect (OIDC) protocol. This protocol can authenticate the workflow issuer and supply a valid access token. Learn more about this integration in [this](https://jfrog.com/blog/secure-access-development-jfrog-github-oidc) blog post. To utilize the OIDC protocol, follow these steps:
10
-
11
-
## **JFrog Platform configuration**
12
-
13
-
1.**Configure an OIDC Integration**: This phase sets an integration between GitHub Actions to the JFrog platform.
14
-
1. Navigate to the Administration tab In the JFrog Platform UI
The 'Provider Name' value should be used as the 'oidc-provider-name' input in Workflow Configuration step 2 below.
23
-
24
-
The 'Audience' field does NOT represent the 'aud' claim that can be added to identity-mapping configured in the 'Claims JSON' (shown below). Only claims that are included in the 'Claims Json' created during step 2 will be validated.
25
-
{% endhint %}
26
-
27
-
2.**Configure an identity mapping**: This phase sets an integration between a particular GitHub repository to the JFrog platform.
28
-
29
-
An identity mapping is a configuration object utilized by the JFrog Platform to associate incoming OIDC claims with particular selected fields. These fields might include `repository`, `actor`, `workflow`, and others. To configure the identity mapping, click on the identity mapping created in section 1 and then click on `Add Identity Mapping`. In the 'priority' field insert the value '1' and fill in the rest of the required fields:\
You have the flexibility to define any valid list of claims required for request authentication. You can check a list of the possible claims [here](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token). Example Claims JSON:
33
-
34
-
```json
35
-
{
36
-
"repository": "repository-owner/my-repository"
37
-
}
38
-
```
39
-
40
-
## Workflow configuration
41
-
42
-
1. **Set required permissions**: In the course of the protocol's execution, it's imperative to acquire a JSON Web Token (JWT) from GitHub's OIDC provider. To request this token, it's essential to configure the specified permission in the workflow file:
43
-
44
-
```yml
45
-
permissions:
46
-
id-token: write
47
-
```
48
-
2. **Pass the 'oidc-provider-name' input to the Action (Required)**: The 'oidc-provider-name' parameter designates the OIDC configuration whose one of its identity mapping should align with the generated JWT claims. This input needs to align with the 'Provider Name' value established within the OIDC configuration in the JFrog Platform.
49
-
3. **Pass the 'oidc-audience' input to the Action (Optional)**: The 'oidc-audience' input defines the intended recipients of an ID token (JWT), ensuring access is restricted to authorized recipients for the JFrog Platform. By default, it contains the URL of the GitHub repository owner. It enforces a condition, allowing only workflows within the designated repository/organization to request an access token. Read more about it [here](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#customizing-the-audience-value).
50
-
51
-
## Example for OpenID Connect Usage
52
-
53
-
```
54
-
- uses: jfrog/frogbot@v2
55
-
env:
56
-
JF_URL: ${{ vars.JF_URL }}
57
-
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
-
with:
59
-
oidc-provider-name: frogbot-integration
60
-
```
61
-
62
-
## **Troubleshooting** 
63
-
64
-
### Scan failures due to token expiration 
65
-
66
-
When using OIDC integration, you might encounter failures in Xray scans or JFrog Advanced Security scans due to token expiration. If this occurs, try extending the 'Token Expiration Time' in the 'Identity Mapping Configuration' phase to ensure the token remains valid until all scanners are triggered, which may vary depending on the project's size.
0 commit comments