Error: google-github-actions/auth failed with: retry function failed after 1 attempt: failed to parse service account key JSON credentials: unexpected token \ in JSON at position 1 #316
Labels
bug
Something isn't working
TL;DR
I am fetching raw JSON file similar to (#315) from vault secrets in github actions, but the format is getting changed while trying to retrieve with this action. The issue started yesterday, I had tried with github secrets and is working fine, but not with vault secrets.
No change is done in JSON file/configurations.
Expected behavior
Proper JSON format for vault secrets for github actions
Observed behavior
Original JSON file from vault is getting changed to {\n"type": "*******",\n"project_id": "",\n"private_key_id":........\n} while fetching in github actions
Action YAML
Log output
Additional information
The configuration was working fine till yesterday and nothing has been changed from our end. I was monitoring the ticket (#315), but I want to fetch from vault and not from Github secrets.
Note: with Github secrets this is working fine
Existing file format:
{
"type": "service_account",
"project_id": "PROJECT_ID",
"private_key_id": "KEY_ID",
"private_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY\n-----END PRIVATE KEY-----\n",
"client_email": "SERVICE_ACCOUNT_EMAIL",
"client_id": "CLIENT_ID",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/SERVICE_ACCOUNT_EMAIL"
}
The text was updated successfully, but these errors were encountered: