oblivion
BlogsPortfolioContact
cloud Dispatch13 min read

The 403 Before the Build: Debugging GitHub Actions OIDC Authentication with JFrog

An SRE investigation into GitHub Actions failing to exchange an OIDC identity token for a JFrog access token, returning HTTP 403 from the JFrog Access token exchange API.

endpoint/access/api/v1/oidc/token
response CodeHTTP 403 Forbidden
failure DomainOIDC Token Exchange Trust Policy
resolutionClaims matrix alignment & audience validation

1. Incident Overview

Modern CI/CD pipelines increasingly use short-lived credentials instead of long-lived access tokens and passwords.

OpenID Connect (OIDC) makes this possible by allowing a CI platform to establish its identity with an external service and exchange that identity for a short-lived access token.

In this incident, a GitHub Actions workflow was attempting to authenticate with JFrog Artifactory using OIDC.

The token exchange request was sent to:

TEXT
https://packages.orbit.bmwgroup.net/access/api/v1/oidc/token

Instead of receiving a JFrog access token, the request returned:

TEXT
HTTP 403 Forbidden

The initial temptation was to investigate Maven configuration or Artifactory availability. However, several of those checks had already passed.

Maven installation, settings.xml, network connectivity, TLS connectivity, and Artifactory availability were verified successfully.

This changed the direction of the investigation.

The failure was occurring during the identity-token exchange, before the pipeline could establish the intended JFrog authentication context.

The key question became: why was JFrog Access rejecting the identity presented by GitHub Actions?

Incident metadata

AttributeDetails
CI platformGitHub Actions
Artifact platformJFrog Artifactory
Authentication methodOpenID Connect
Token exchange endpoint/access/api/v1/oidc/token
JFrog hostnamepackages.orbit.bmwgroup.net
Observed responseHTTP 403 Forbidden
Maven installationVerified
Maven settings.xmlChecked
Network connectivityVerified
TLS connectivityVerified
Artifactory availabilityVerified
Investigation areaOIDC trust and identity mapping
Confirmed root causeExact rejected claim or configuration mismatch not established

2. Understanding the Authentication Flow

Before troubleshooting the 403, it is important to understand how GitHub Actions and JFrog establish trust.

OIDC authentication is not simply a username and password exchange.

The CI platform issues an identity token containing claims that describe the workload requesting access.

JFrog validates that token against its configured identity provider and identity mapping. If the identity satisfies the configured trust conditions, JFrog can issue a short-lived access token.

The simplified flow is:

Technical Architecture FlowMermaid.js
Rendering architectural diagram...
Figure 1: GitHub Actions to JFrog OIDC Token Exchange Failure Boundary
Download .excalidrawExcalidraw Vector
GitHub Actions → JFrog OIDC token exchange: HTTP 403Investigation map — authentication boundary, evidence and unproven hypothesesGitHub ActionsWorkflow identityOIDC ID tokenJFrog AccessOIDC token exchange API/access/api/v1/oidc/tokenShort-lived JFrogaccess token(expected)Observed response: HTTP 403Checks that passed• Maven installation• settings.xml validation• Network connectivity• TLS connectivity• Artifactory availabilityPrimary areas to investigate• OIDC provider name / issuer• Audience and token claims• Identity mapping conditions• Organization / repository claims• JFrog-side authorizationEvidence still required• Sanitized JWT claim set• Provider and mapping config• Exact response body / logs• Workflow run context• Result after config correction403 occurred at token exchange — do not misdiagnose as a Maven repository deploy failure.

The important distinction is that GitHub issuing a valid OIDC token does not automatically mean JFrog will trust it.

Both sides must agree on the identity provider and the claims used to establish trust.

3. The First Investigation: Eliminate Basic Connectivity Issues

A common troubleshooting mistake is to investigate the wrong layer.

When a Maven pipeline fails, engineers often begin by checking:

  • Maven installation.
  • Repository URLs.
  • settings.xml.
  • Credentials.
  • Network connectivity.
  • TLS certificates.
  • Artifactory availability.

These are valid checks, but they do not all explain a failure occurring during OIDC token exchange.

The investigation had already established that the following checks were successful.

ComponentInvestigation result
Maven installationSuccessful
Maven configurationChecked
settings.xmlChecked
Network connectivityVerified
TLS connectivityVerified
Artifactory availabilityVerified
OIDC token exchangeHTTP 403

This narrowed the investigation to the authentication boundary.

A successful connection to Artifactory only proves that the endpoint is reachable. It does not prove that the identity presented by the workflow is trusted.

4. Locate the Exact Failure Boundary

The token exchange endpoint was:

TEXT
POST https://packages.orbit.bmwgroup.net/access/api/v1/oidc/token

The endpoint is part of the JFrog Access authentication flow.

The important diagnostic question is whether the failure occurs:

  1. Before GitHub issues the OIDC token.
  2. While sending the token to JFrog.
  3. While JFrog validates the token.
  4. After authentication, while accessing an Artifactory repository.

In this incident, the observed 403 was associated with the token exchange request.

That is materially different from a Maven deployment request returning 403 from a repository.

Authentication failure versus repository authorization failure

Failure pointWhat it generally indicates
GitHub cannot issue an OIDC tokenWorkflow permission or identity-provider issue
JFrog OIDC exchange returns 403Trust, claims, identity mapping, or authorization needs investigation
Token exchange succeeds but repository returns 403Repository permission or token authorization issue
Maven cannot resolve repositoryRepository configuration, credentials, network, or dependency resolution issue

This distinction prevents teams from changing Maven repository permissions when the pipeline has not successfully authenticated in the first place.

5. Investigation: Validate the OIDC Configuration

The next step is to compare the identity GitHub presents with the identity JFrog expects.

Step 1: Verify GitHub Actions permissions

GitHub Actions must be permitted to request an OIDC token.

The workflow or job needs:

YAML
permissions:
  id-token: write
  contents: read

Without id-token: write, the workflow cannot request the OIDC identity token from GitHub.

The permission should be scoped to the workflow or job that needs it rather than granting unnecessary permissions globally.

Step 2: Verify the JFrog OIDC provider

In the JFrog Platform, inspect the configured OIDC integration.

The relevant configuration includes:

  • Provider name.
  • Provider type.
  • Provider URL / issuer.
  • Audience, where configured.
  • Organization restrictions, where applicable.
  • Identity mappings.

The provider name used by the GitHub workflow must match the provider configured in JFrog.

For example, a GitHub Actions workflow using the JFrog CLI may look like:

YAML
name: Build and Publish

on:
  push:
    branches:
      - main

permissions:
  id-token: write
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup JFrog CLI
        uses: jfrog/setup-jfrog-cli@v5
        env:
          JF_URL: ${{ vars.JF_URL }}
        with:
          oidc-provider-name: YOUR_JFROG_PROVIDER_NAME

      - name: Verify JFrog connection
        run: jf rt ping

This is an illustrative workflow. The provider name and platform URL must match the actual JFrog integration.

Step 3: Inspect identity mapping claims

This is one of the most important parts of OIDC troubleshooting.

An identity mapping determines which identities are allowed to exchange their OIDC token for a JFrog access token.

For GitHub Actions, useful claims to inspect include:

ClaimPurpose
issIdentifies the token issuer
subIdentifies the subject/workload
audIdentifies the intended audience
repositoryIdentifies the GitHub repository
repository_ownerIdentifies the repository owner
refIdentifies the Git reference
event_nameIdentifies the workflow trigger event

For example, a GitHub identity mapping might contain conditions similar to:

JSON
{
  "iss": "https://token.actions.githubusercontent.com",
  "repository": "example-org/example-repository",
  "event_name": "push"
}

The values above are illustrative, not the incident's actual claims.

The important point is that identity mappings must match the claims actually issued by GitHub.

A mapping configured for one repository or event should not be assumed to authorize another repository or event.

Step 4: Verify audience configuration

The audience claim is another important part of the trust relationship.

The workflow and JFrog integration must use compatible audience settings.

If JFrog expects a specific audience but GitHub issues a token with a different one, the token may not satisfy the configured trust policy.

Do not assume that the provider audience field and the aud claim in an identity mapping are interchangeable configuration fields. Check the exact JFrog integration behavior and documentation for the deployed version.

Step 5: Verify organization restrictions

JFrog's GitHub OIDC integration can restrict authentication based on the GitHub organization.

If the configured organization does not match the organization owning the repository, JFrog can reject the identity.

This is especially relevant when workflows are moved, repositories are transferred, or shared workflow templates are reused across organizations.

Do not enable permissive configuration simply to make the pipeline pass. The objective is to establish the narrowest trust policy that supports the intended workflow.

6. Debugging the Token Exchange Safely

The most useful diagnostic information is the set of claims inside the OIDC token.

A JWT contains three parts:

TEXT
HEADER.PAYLOAD.SIGNATURE

The payload contains identity claims.

For troubleshooting, inspect the claims without exposing the raw token in logs, tickets, screenshots, or chat messages.

A safe diagnostic process should:

  1. Obtain the OIDC token inside the CI job.
  2. Decode the payload in memory.
  3. Print only approved, non-sensitive claim values.
  4. Never print the complete JWT or its signature.
  5. Compare the values with the JFrog identity mapping.

For example, a workflow can use the GitHub Actions toolkit to request an ID token and inspect selected claims in a controlled debugging step.

The exact implementation depends on the workflow and runner environment.

Avoid using public JWT decoder websites for company-issued identity tokens. Treat the token as a credential even when it is short-lived.

7. A Structured Troubleshooting Decision Tree

The following flow separates token issuance, token exchange, and repository authorization.

Technical Architecture FlowMermaid.js
Rendering architectural diagram...

8. What Should Be Checked in JFrog?

A useful investigation should not stop at the GitHub workflow.

The JFrog administrator should validate the server-side trust configuration.

ConfigurationWhat to verify
OIDC providerCorrect provider exists and is enabled
Provider nameMatches workflow configuration
Provider URLCorrect issuer
Provider typeMatches GitHub or the intended provider
AudienceCompatible with the issued token
Identity mappingMatches actual workflow claims
OrganizationCorrect GitHub organization
RepositoryCorrect repository identity
PermissionsExchanged identity has intended access
Server-side logsIdentify the rejection reason where available

The most valuable evidence is the exact rejection reason recorded by JFrog Access, correlated with the relevant workflow run.

A generic HTTP 403 alone is not enough to identify which trust condition failed.

9. Why This Was Not Yet a Maven Deployment RCA

It is tempting to describe this as a Maven deployment failure because Maven and Artifactory were part of the overall pipeline.

But the failure boundary matters.

The known failure occurred during the GitHub-to-JFrog OIDC token exchange.

The intended sequence was:

TEXT
GitHub Actions
      |
      v
Request GitHub OIDC token
      |
      v
Exchange token with JFrog Access
      |
      v
Receive JFrog access token
      |
      v
Authenticate with Artifactory
      |
      v
Run Maven deployment

The observed 403 occurred at the token exchange stage.

Therefore, changing Maven repository URLs or deployment configuration would not be the first corrective action supported by the evidence.

Repository permissions become the primary investigation area only if token exchange succeeds and a subsequent repository operation is denied.

10. Remediation and Verification Strategy

Because the exact rejected claim or trust configuration was not conclusively established in the available incident findings, remediation should be conditional on the evidence.

A safe remediation process is:

  1. Capture the workflow's relevant OIDC claims securely.
  2. Compare them with the configured JFrog provider and identity mapping.
  3. Identify the exact mismatch or rejected condition from JFrog-side evidence.
  4. Correct only the relevant provider or mapping configuration.
  5. Re-run the same workflow.
  6. Verify successful token exchange.
  7. Verify the intended Artifactory operation separately.

Verification checklist

TestExpected result
GitHub OIDC token requestSuccessful
Provider name validationMatch
Issuer validationMatch
Audience validationMatch
Identity mappingIntended workflow is accepted
JFrog token exchangeSuccessful
JFrog authenticationSuccessful
Maven repository accessAuthorized
Maven deploymentSuccessful, if deployment is the intended operation

A successful jf rt ping can validate basic authenticated connectivity, but it does not prove that the identity has permission to deploy to a particular repository.

Always validate the actual operation required by the pipeline.

11. Lessons for SRE and DevSecOps

1. Identify the failing authentication boundary

A 403 from a token exchange API is not the same as a 403 from an artifact repository.

Always identify the exact request that failed.

2. OIDC is a trust relationship, not just token generation

A valid token from GitHub can still be rejected by JFrog if the issuer, audience, provider, or identity mapping does not satisfy the trust configuration.

3. Validate claims, not assumptions

Repository transfers, branch changes, workflow triggers, and reusable workflows can affect the identity claims presented to the relying party.

Compare the actual claims with the configured mapping.

4. Avoid weakening trust to fix a pipeline

Enabling permissive authentication or broadening identity mappings may hide the immediate problem while increasing the security exposure.

Make the smallest required change.

5. Keep authentication and authorization separate

Successful token exchange proves that JFrog accepted the federated identity. It does not automatically grant permission to every repository or operation.

6. Preserve evidence from both sides

CI logs explain what the workflow requested. JFrog-side logs explain why the request was accepted or rejected.

Both are necessary for a conclusive investigation.

12. Final Takeaway

The important lesson from this incident is that CI/CD authentication failures should be investigated at the layer where they occur.

Maven installation, repository configuration, network connectivity, and TLS can all be healthy while the pipeline still fails because the identity presented to JFrog is not accepted.

When an OIDC token exchange returns HTTP 403, investigate the trust relationship before changing Maven deployment configuration.

The pipeline can reach JFrog. The real question is whether JFrog trusts the identity requesting access.

---

References

This postmortem documents the observed HTTP 403 at the JFrog OIDC token exchange boundary and the checks already completed. It does not claim a specific identity-mapping defect or a confirmed configuration fix because that evidence was not available in the incident record.

Referenced In & Suggested Next Reads

Bidirectionally cross-referenced across technical domains.