Skip to content

Access multiple JFrog projects using OIDC authentication #247

Closed

Description

@andylim0221

How can we help?

Hi team,

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?

Activity

  1. changed the title [-]Access multiple projects using OIDC authentication[/-] [+]Access multiple JFrog projects using OIDC authentication[/+] on Feb 3, 2025
  2. EyalDelarea commented on Apr 8, 2025

    @EyalDelarea

    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.

  3. andregribeiro commented on May 14, 2025

    @andregribeiro

    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"]
    }

  4. EyalDelarea commented on May 14, 2025

    @EyalDelarea

    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.

  5. andylim0221 commented on May 24, 2025

    @andylim0221
    Author

    @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. :)

  6. gyzong1 commented on Oct 19, 2026

    @gyzong1

    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

  7. zrzzxw commented on Oct 19, 2026

    @zrzzxw

    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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions