-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Description
The build-script/secure-secrets-creation.sh
script fails to create OKTA secrets when environment variables contain values wrapped in double quotes. This results in malformed JSON with double-escaped quotes.
- [] ✋ I have searched the open/closed issues and my issue is not listed.
Versions
- Harmonix on AWS version: v0.4.0
Reproduction Code
-
Set OKTA environment variables with quoted values in .env:
- OKTA_CLIENT_ID="masked_client_id"
- OKTA_CLIENT_SECRET="masked_secret"
- OKTA_AUDIENCE="https://masked.okta.com"
- OKTA_API_TOKEN="masked_token"
-
Run
make install
-
ECS task fails with:
ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secret from asm: service call has been retried 1 time(s): invalid character '0' after object key:value pair
Expected behavior
OKTA secrets should be created successfully regardless of whether environment variables are quoted or unquoted.
Actual behavior
Script generates malformed JSON with double-escaped quotes:
{"clientId": ""masked_client_id"", "clientSecret": ""masked_secret"", "audience": ""https://masked.okta.com"", "authServerId": "", "idp": "", "apiToken": ""masked_token""}
The double quotes around values cause JSON parsing to fail when AWS Secrets Manager tries to retrieve the secret.