1. Introduction
To use an OIDC Resource Scope Token, the IdP must include a claim that identifies the target Artifactory repository. This claim can then be used to define the Resource Scope in Artifactory and limit access to the specified repository.
This article explains how to configure this setup with GitHub Actions, using a GitHub repository custom property to add the Artifactory repository to the OIDC token.
2. Prerequisites
-
A GitHub organization with permissions to manage repository custom properties.
-
A GitHub Actions workflow configured to use OIDC authentication.
-
An Artifactory repository that the GitHub Actions workflow will access.
3. Step-by-step
Step 1: Add a custom repository property in GitHub
In GitHub, navigate to:
Organization → Settings → Custom Properties → Repository properties

Add a new custom property. For example:
Property name: jfrog_scope
Set the property value to the target Artifactory repository for the GitHub repository running the build.
For example:
noffarl-generic

Step 2: Verify the OIDC token claim
The GitHub OIDC token will include the custom property as a claim using the following format:
"repo_property_jfrog_scope": "noffarl-generic"
To verify the claim, decode the OIDC token in the GitHub Actions workflow. The following step can be used for troubleshooting:
- name: Debug - show raw GitHub OIDC claims
env: ID_TOKEN: ${{ env.ID_TOKEN }}
run: |
PAYLOAD=$(echo "$ID_TOKEN" | cut -d '.' -f2) MOD=$(( ${#PAYLOAD} % 4 )) if [ $MOD -eq 2 ]; then
PAYLOAD="${PAYLOAD}=="; fi if [ $MOD -eq 3 ]; then PAYLOAD="${PAYLOAD}="; fi echo "$PAYLOAD" | tr
'_-' '/+' | base64 -d 2>/dev/null | jq .
Step 3: Configure the Resource Scope in Artifactory
In Artifactory, navigate to the Identity Mapping and configure the Resource Scope Token.
Set the Resource Scope pattern to match the relevant claim from the GitHub OIDC token.
In this example:
"repo_property_jfrog_scope": "noffarl-generic"
Set the following:

Step 4: Run the GitHub Actions workflow
Related resources
Github Managing custom properties for repositories in your organization
JFrog Add a Resource Scope to an Identity Mapping