Skip to content

Commit

Permalink
Revert - New OIDC fields added, including the GitHub job name and run…
Browse files Browse the repository at this point in the history
… ID (#229)
  • Loading branch information
eyalbe4 authored Nov 29, 2024
1 parent 73cafc9 commit d788a32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,13 @@ class Utils {
const exchangeUrl = jfrogCredentials.jfrogUrl.replace(/\/$/, '') + '/access/api/v1/oidc/token';
core.debug('Exchanging GitHub JSON web token with a JFrog access token...');
let projectKey = process.env.JF_PROJECT || '';
let jobId = process.env.GITHUB_JOB || '';
let runId = process.env.GITHUB_RUN_ID || '';
const httpClient = new http_client_1.HttpClient();
const data = `{
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"subject_token_type": "urn:ietf:params:oauth:token-type:id_token",
"subject_token": "${jsonWebToken}",
"provider_name": "${oidcProviderName}",
"project_key": "${projectKey}",
"gh_job_id": "${jobId}",
"gh_run_id": "${runId}",
"project_key": "${projectKey}"
}`;
const additionalHeaders = {
'Content-Type': 'application/json',
Expand Down
2 changes: 0 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ export class Utils {
"subject_token": "${jsonWebToken}",
"provider_name": "${oidcProviderName}",
"project_key": "${projectKey}",
"gh_job_id": "${jobId}",
"gh_run_id": "${runId}",
}`;

const additionalHeaders: OutgoingHttpHeaders = {
Expand Down

0 comments on commit d788a32

Please sign in to comment.