jf exchange-oidc-token

Exchange an OIDC token ID from an OIDC provider for a valid JFrog access token. The command returns the access token and the username.

Synopsis

jf exchange-oidc-token <oidc-provider-name> <oidc-token-id> [options]

Aliases: jf eot

Arguments

ArgumentRequiredDescription
<oidc-provider-name>YesName of the OIDC provider
<oidc-token-id>YesOIDC token ID to exchange for an access token

Options

FlagShortDefaultDescription
--urlJFrog Artifactory URL
--oidc-token-idOIDC token ID (alternative to positional argument)
--oidc-audienceAudience for the OIDC token
--oidc-provider-nameOIDC provider name (alternative to positional argument)
--oidc-provider-typeGitHubOIDC provider type: GitHub, Azure, or GenericOidc
--application-keyJFrog Application Key
--projectJFrog Artifactory project key
--repositoryRepository name to filter resource

Environment Variables

VariableDescription
JFROG_CLI_OIDC_EXCHANGE_TOKEN_IDOIDC token ID for automatic authentication

Examples

Exchange an OIDC Token

jf eot <oidc-provider-name> <oidc-token-id> --url=<your-artifactory-url>

You pass the provider name and token ID. The command returns a JFrog access token and username.

Use GitHub Provider Type

jf eot my-oidc-provider <token-id> --oidc-provider-type=GitHub --url=<your-url>

Specify the provider type when it differs from the default.

When to Use

Use jf eot (exchange OIDC token) when your CI/CD platform supports OpenID Connect (OIDC) identity federation with JFrog. This is the recommended authentication method for:

  • GitHub Actions: Uses GitHub's built-in OIDC provider to generate short-lived tokens
  • Azure DevOps: Uses Azure AD as the OIDC provider
  • Other OIDC providers: Any provider compatible with the GenericOidc type

OIDC eliminates the need to store long-lived access tokens as CI/CD secrets. Instead, the CI platform generates a short-lived identity token that the CLI exchanges for a JFrog access token.

Note: OIDC (OpenID Connect) is an identity protocol built on top of OAuth 2.0. Your JFrog Platform administrator must configure the OIDC integration before you can use this command. See Administration > Security > OpenID Connect in the Artifactory UI.



What’s Next

After obtaining a token, add a server configuration to store it.