Skip to content

Conversation

@EyalDelarea
Copy link
Contributor

@EyalDelarea EyalDelarea commented Apr 10, 2025

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • I used npm run format for formatting the code before submitting the pull request.

🔐 OIDC Authentication Flow Support

This project now supports two OpenID Connect (OIDC) authentication flows, depending on the JFrog CLI version and how it is used:


✅ Native OIDC Integration (Recommended)

  • Used when:

    • JFrog CLI version is >= 2.75.0 ( un-released )
    • You are not downloading the CLI from a remote Artifactory repository
  • Behavior:

    • Uses the JFrog CLI's built-in --oidc-token-id support
    • No need to manually exchange tokens

🔁 Manual OIDC Fallback (Legacy or Remote CLI Download)

  • Used when:

    • JFrog CLI version is older than 2.75.0, or
    • A CLI is downloaded using a remote Artifactory repository (via --download-repository)
  • Behavior:

    • Uses GitHub’s OIDC token to manually fetch a JFrog access token via the REST API
    • Ensures backward compatibility and support for remote execution contexts

🧪 Integration Test Workflows

To ensure correct behavior across environments:

  • cli-oidc-test.yml: Verifies native OIDC flow
  • manual-oidc-test.yml: Verifies manual fallback path

✅ Improvements & Cleanup

  • Deprecated and removed: setUsageEnvVars() legacy logic
  • Added test coverage for:
    • CLI version fallbacks
    • OIDC failures
    • Remote download cases
  • Introduced constants for clarity and maintainability:
    • MIN_CLI_OIDC_VERSION
    • DEFAULT_OIDC_AUDIENCE
    • CLI_REMOTE_ARG
  • Enhanced logging and credential-handling transparency

🧼 Future Outlook

Once all JFrog CLI usage paths—including remote downloads—support --oidc-token-id, the manual fallback logic will be removed for cleaner and more secure operation.

@EyalDelarea EyalDelarea added the improvement Automatically generated release notes label Apr 10, 2025
@EyalDelarea EyalDelarea changed the title Add OIDC CLI support Enable Dual OIDC Integration Flow with Backward Compatibility Apr 10, 2025
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Apr 10, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Apr 10, 2025
@EyalDelarea EyalDelarea requested a review from asafgabai April 10, 2025 10:36
@EyalDelarea EyalDelarea marked this pull request as ready for review April 10, 2025 10:37
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Apr 10, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Apr 10, 2025
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Apr 10, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Apr 10, 2025
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Apr 16, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Apr 16, 2025
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Apr 16, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Apr 16, 2025
@EyalDelarea EyalDelarea added the safe to test Approve running integration tests on a pull request label Apr 16, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Apr 16, 2025
@github-actions
Copy link

👍 Frogbot scanned this pull request and did not find any new security issues.


@EyalDelarea EyalDelarea merged commit d5efdc9 into jfrog:master Apr 16, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants