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
{{ message }}
Repository navigation
Access multiple JFrog projects using OIDC authentication #247
We are using this composite action for OIDC authentication to enforce password-less authentication for secure access. One use case we have is to access multiple JFrog projects at the same time. We have multiple JFrog projects setup, and we setup the integration between one of our repositories and two JFrog projects. However, based on JWT token we obtained from Github Action workflow, the token is only specified to one JFrog project. Just wondering if this composite action is possible to access multiple JFrog projects at once, or we need to call it multiple time?
changed the title [-]Access multiple projects using OIDC authentication[/-][+]Access multiple JFrog projects using OIDC authentication[/+]on Feb 3, 2025
At the moment, you can't assign an OIDC token to multiple specific projects directly (e.g., project X, Y, and Z). However, you can configure a global OIDC setup that accepts requests only for certain repositories, effectively limiting access to a specific scope.
Multiple Values
From Artifactory version 7.94.1, multiple values are supported for JSON Claims. Identity mappings use JSON Claims to define the scope of generated access tokens. You can now define the scope of an access token for multiple values, for example for multiple repositories and environments.
Example
Following is an example of a JSON Claim definition for multiple repositories.
{
"repository":["jfrog/jfrog-cli", "jfrog/artifactory-client-java", "jfrog/setup-jfrog-cli"]
}
Hi @andregribeiro, thanks for the input — you’re right that the JFrog Platform allows defining multiple repositories in a single integration.
However, I believe the original question is about accessing multiple JFrog projects using OIDC within the same GitHub Actions workflow.
Currently, the setup-jfrog-cli action configures authentication for a single project context per invocation. So if you need to access multiple projects, you’ll need to run the action multiple times — once for each project — each time configuring it with the appropriate project parameter and ensuring the GitHub OIDC trust is set up correctly for each.
Let us know if that helps or if you’d like help structuring a multi-project setup.
If we want to generate tokens for multiple projects within a single job, it will fail by default. To obtain the token for 'project2', the environment variables from 'project1' must be cleared first using the following configuration:
8. If we want to generate tokens for multiple projects within a single job, it will fail by default. To obtain the token for 'project2', the environment variables from 'project1' must be cleared first using the following configuration: - name: clean first env run: | jf c remove --quiet echo "JFROG_CLI_BUILD_PROJECT=" >> $GITHUB_ENV echo "JFROG_CLI_BUILD_NAME=" >> $GITHUB_ENV echo "JFROG_CLI_BUILD_NUMBER=" >> $GITHUB_ENV
Is this the standard approach? Is it recommended/safe to use it this way?
Thanks
Hi, yes, this has been verified working well in our workflow, please JFrog official confirm if it is indeed your solution, if no problem , please note in your official Github actions, thanks,
Activity
[-]Access multiple projects using OIDC authentication[/-][+]Access multiple JFrog projects using OIDC authentication[/+]EyalDelarea commentedon Apr 8, 2025
Hey @andylim0221
At the moment, you can't assign an OIDC token to multiple specific projects directly (e.g., project X, Y, and Z). However, you can configure a global OIDC setup that accepts requests only for certain repositories, effectively limiting access to a specific scope.
andregribeiro commentedon May 14, 2025
But here (https://jfrog.com/help/r/jfrog-platform-administration-documentation/json-claims) says:
Multiple Values
From Artifactory version 7.94.1, multiple values are supported for JSON Claims. Identity mappings use JSON Claims to define the scope of generated access tokens. You can now define the scope of an access token for multiple values, for example for multiple repositories and environments.
Example
Following is an example of a JSON Claim definition for multiple repositories.
{
"repository":["jfrog/jfrog-cli", "jfrog/artifactory-client-java", "jfrog/setup-jfrog-cli"]
}
EyalDelarea commentedon May 14, 2025
Hi @andregribeiro, thanks for the input — you’re right that the JFrog Platform allows defining multiple repositories in a single integration.
However, I believe the original question is about accessing multiple JFrog projects using OIDC within the same GitHub Actions workflow.
Currently, the setup-jfrog-cli action configures authentication for a single project context per invocation. So if you need to access multiple projects, you’ll need to run the action multiple times — once for each project — each time configuring it with the appropriate project parameter and ensuring the GitHub OIDC trust is set up correctly for each.
Let us know if that helps or if you’d like help structuring a multi-project setup.
andylim0221 commentedon May 24, 2025
@EyalDelarea
We are moving towards integrating it with a global level identity mapping instead of project level, to access multiple projects at the same time.
This issue can be closed. :)
gyzong1 commentedon Oct 19, 2026
If we want to generate tokens for multiple projects within a single job, it will fail by default. To obtain the token for 'project2', the environment variables from 'project1' must be cleared first using the following configuration:
Is this the standard approach? Is it recommended/safe to use it this way?
Thanks
zrzzxw commentedon Oct 19, 2026
Hi, yes, this has been verified working well in our workflow, please JFrog official confirm if it is indeed your solution, if no problem , please note in your official Github actions, thanks,