Skip to content

Commit a44bfbd

Browse files
updating logic for token
1 parent c8f29f8 commit a44bfbd

File tree

1 file changed

+3
-3
lines changed
  • .github/scripts/ppc64le/self-hosted-builder/helpers

1 file changed

+3
-3
lines changed

.github/scripts/ppc64le/self-hosted-builder/helpers/app_token.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
set -o pipefail
1313

14-
APP_ID=$(cat $1) # Path to appid.env
15-
PRIVATE_KEY_PATH=$2 # Path to key_private.pem
14+
#APP_ID=$(cat $1) # Path to appid.env
15+
#PRIVATE_KEY_PATH=$2 # Path to key_private.pem
1616

1717
# Generate JWT
1818
header='{"alg":"RS256","typ":"JWT"}'
@@ -22,7 +22,7 @@ header_base64=$(echo -n "$header" | openssl base64 | tr -d '=' | tr '/+' '_-' |
2222
payload_base64=$(echo -n "$payload" | openssl base64 | tr -d '=' | tr '/+' '_-' | tr -d '\n')
2323

2424
signature=$(echo -n "${header_base64}.${payload_base64}" | \
25-
openssl dgst -sha256 -sign "$PRIVATE_KEY_PATH" | \
25+
openssl dgst -sha256 -sign "$APP_PRIVATE_KEY" | \
2626
openssl base64 | tr -d '=' | tr '/+' '_-' | tr -d '\n')
2727

2828
generated_jwt="${header_base64}.${payload_base64}.${signature}"

0 commit comments

Comments
 (0)