File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,12 @@ jobs:
3030 set -euo pipefail
3131
3232 echo "=== Authenticating with AquaSec ==="
33+ echo "${{ github.repository_id }}"
3334
3435 METHOD="POST"
3536 AUTH_ENDPOINT="https://eu-1.api.cloudsploit.com/v2/tokens"
3637 TIMESTAMP=$(date -u +%s)
37- POST_BODY='{
38- "group_id": 1228,
39- "allowed_endpoints": ["GET"],
40- "validity": 240
41- }'
38+ POST_BODY='{"group_id":1228,"allowed_endpoints":["GET"],"validity":240}'
4239 STRING_TO_SIGN="${TIMESTAMP}${METHOD}/v2/tokens${POST_BODY}"
4340 SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$AQUA_SECRET" -hex | sed 's/.*= //g')
4441
5451 if [ "$RESPONSE_STATUS" = "200" ]; then
5552 echo "Login successful."
5653 BEARER_TOKEN=$(echo "$AUTH_RESPONSE" | jq -r '.data')
57- echo "::add-mask::$BEARER_TOKEN"
5854 else
59- echo "Login failed"
55+ echo "Login failed with error message: $(echo "$AUTH_RESPONSE" | jq -r '.errors') "
6056 exit 1
6157 fi
6258
You can’t perform that action at this time.
0 commit comments