Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d53a952
Add WIF reproduction workflow for ASM-17037
avivm-lang Mar 15, 2026
8ae83a2
Test use akeyless-js-cloud-id fix branch
avivm-lang Mar 16, 2026
ade2298
Enable ACTIONS_RUNNER_DEBUG to capture real error
avivm-lang Mar 16, 2026
5e01b91
Include actual error in failure message for debugging
avivm-lang Mar 16, 2026
8d2776a
Show actual error in failure output
avivm-lang Mar 16, 2026
b33ab14
Add console.error to capture raw error
avivm-lang Mar 16, 2026
7344bdf
Add Node+curl test step to debug auth flow
avivm-lang Mar 16, 2026
6d2c44b
ASM-17037: Rebuild action with akeyless-cloud-id WIF fix
avivm-lang Mar 16, 2026
89de39f
ASM-17037: Add debug step for WIF credential structure
avivm-lang Mar 16, 2026
e0f4041
ASM-17037: Rebuild action with latest akeyless-cloud-id WIF fix
avivm-lang Mar 16, 2026
ab98ef6
ASM-17037: Rebuild action with latest akeyless-cloud-id from fix branch
avivm-lang Mar 16, 2026
40ecc13
ASM-17037: Pin akeyless-cloud-id to WIF fix commit 8631522
avivm-lang Mar 16, 2026
9cc513d
add logs and use akeyless-js-cloud-id commit 27142b5 (GCP WIF fix)
avivm-lang Mar 17, 2026
7b17567
Use akeyless-js-cloud-id 62bf293 (with getGcpCloudID logs)
avivm-lang Mar 17, 2026
3d774f3
align akeyless-cloud-id to dda190ad (akeyless-js-cloud-id)
avivm-lang Mar 17, 2026
83d57c9
add token_format
avivm-lang Mar 17, 2026
8a17c4c
add token_audience
avivm-lang Mar 17, 2026
634f910
align akeyless-cloud-id to 4acef18c (WIF IAM Credentials fallback)
avivm-lang Mar 17, 2026
9669bcb
align akeyless-cloud-id to 83555bd (includeEmail for GCP WIF)
avivm-lang Mar 17, 2026
56c9232
chore: align akeyless-cloud-id to 7ecef2a (ASM-17037 GCP WIF support)
avivm-lang Mar 17, 2026
28cdf1b
new workflow for testing
avivm-lang Mar 20, 2026
c0ce60c
Add WIF reproduction workflow for ASM-17037
avivm-lang Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/gcp_wif_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Minimal workflow to verify GCP Workload Identity Federation (WIF) auth works end-to-end.
# TODO: Replace with repo secrets for generic use (GCP_WIF_PROVIDER, GCP_SERVICE_ACCOUNT, AKEYLESS_ACCESS_ID, AKEYLESS_API_URL)
name: gcp_wif_test

on:
workflow_dispatch:

jobs:
test_gcp_wif:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

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

- name: Authenticate to GCP via WIF
uses: google-github-actions/auth@v2
with:
workload_identity_provider: "projects/717477426588/locations/global/workloadIdentityPools/akeyless-gh-action-test/providers/github-oidc"
service_account: "akeyless-gh-action-test@akeyless-test-env.iam.gserviceaccount.com"
create_credentials_file: true
token_format: id_token
id_token_audience: akeyless.io

- name: Akeyless Auth via GCP
uses: ./
with:
access-id: "p-27xqnb0jl0segm"
access-type: gcp
api-url: "https://api.akeyless.io"
gcp-audience: akeyless.io
static-secrets: |
- name: "/gcp-wif-test"
output-name: "my_secret"
108 changes: 108 additions & 0 deletions .github/workflows/test_gcp_wif_auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Test GCP WIF Auth (Reproduce ASM-17037)
on:
workflow_dispatch:

jobs:
test_gcp_wif:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
ACTIONS_RUNNER_DEBUG: "true"

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

# Step 1: Authenticate to GCP using Workload Identity Federation
- name: Authenticate to GCP via WIF
id: gcp-auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: "projects/717477426588/locations/global/workloadIdentityPools/akeyless-gh-action-test/providers/github-oidc"
service_account: "aviv-gh-action-test@akeyless-test-env.iam.gserviceaccount.com"
create_credentials_file: true
token_format: "id_token"
id_token_audience: "akeyless.io"

# Step 1b: Print input params BEFORE Akeyless auth
- name: Print Akeyless auth input params
run: |
echo "=== BEFORE Akeyless auth - input params ==="
echo "access-id: p-t0d5hos7sfxqgb"
echo "access-type: gcp"
echo "api-url: https://api.dbk.akeyless.dev"
echo "gcp-audience: akeyless.io"
echo "GOOGLE_APPLICATION_CREDENTIALS: $GOOGLE_APPLICATION_CREDENTIALS"
echo "Credentials file exists: $([ -f "$GOOGLE_APPLICATION_CREDENTIALS" ] && echo yes || echo no)"
echo "============================================"

# Step 2: This step FAIL — reproduces the bug
- name: Akeyless Auth via GCP (fail)
id: akeyless-gcp
uses: ./
continue-on-error: true
with:
access-id: "p-t0d5hos7sfxqgb"
access-type: gcp
api-url: "https://api.dbk.akeyless.dev"
gcp-audience: "akeyless.io"
static-secrets: |
- name: "/gcp-wif-test"
output-name: "my_secret"

# Step 2b: Print error pointer when auth fails
- name: Error summary (see failed step above for details)
if: steps.akeyless-gcp.outcome == 'failure'
run: |
echo "=== ERROR: Akeyless auth failed ==="
echo "The error is in the 'Akeyless Auth via GCP (fail)' step output above."
echo "Source: akeyless-js-cloud-id (GCP token fetch) or auth.js (Akeyless API)."
echo "Look for: 'Cannot fetch ID token' = cloudid.js ; 'Failed to login to Akeyless' = auth.js"
echo "=========================="

- name: Check if Akeyless auth failed as expected
run: |
if [ "${{ steps.akeyless-gcp.outcome }}" == "failure" ]; then
echo "REPRODUCED: Akeyless GCP auth failed under WIF as expected"
echo "This confirms the bug in ASM-17037"
else
echo "UNEXPECTED: Akeyless GCP auth succeeded — the bug may already be fixed"
fi

# Step 3: Manual workaround — proves the token itself is valid
- name: Manual auth workaround (using ID token directly)
if: always()
run: |
CRED_FILE="${{ steps.gcp-auth.outputs.credentials_file_path }}"
echo "Credentials file: $CRED_FILE"
echo "Credentials type:"
cat "$CRED_FILE" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('type','unknown'))"

echo ""
echo "Attempting to get ID token via gcloud..."
gcloud auth login --cred-file="$CRED_FILE" --quiet 2>&1 || true
ID_TOKEN=$(gcloud auth print-identity-token --audiences=akeyless.io 2>&1) || true

if echo "$ID_TOKEN" | grep -q "eyJ"; then
CLOUD_ID=$(echo -n "$ID_TOKEN" | base64 -w0)
echo "Got ID token, length: ${#ID_TOKEN}"

RESPONSE=$(curl -s -X POST https://api.dbk.akeyless.dev/auth \
-H "Content-Type: application/json" \
-d "{
\"access-id\": \"p-t0d5hos7sfxqgb\",
\"access-type\": \"gcp\",
\"cloud-id\": \"${CLOUD_ID}\",
\"gcp-audience\": \"akeyless.io\"
}")
if echo "$RESPONSE" | grep -q "token"; then
echo "WORKAROUND SUCCESS: Manual auth with ID token worked"
else
echo "WORKAROUND FAILED: $RESPONSE"
fi
else
echo "Could not get ID token: $ID_TOKEN"
echo "(This is expected — gcloud may not support WIF credential files for print-identity-token)"
fi
Loading
Loading