Skip to content

Commit

Permalink
Merge pull request #1789 from edx/hassan/exporter-use-secrets-manager
Browse files Browse the repository at this point in the history
chore: Use secrets manager to pull decryption keys.
  • Loading branch information
HassanJaveed84 authored Nov 7, 2024
2 parents e300acc + f02be0d commit 19e7777
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dataeng/resources/remote-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ for DEPLOYMENT in edx edge; do
# First, fetch the decryption key for the given deployment.
#
# FYI: in bash, double carets after a variable name capitalizes the string.
vault kv get \
-version=${REMOTE_CONFIG_DECRYPTION_KEYS_VAULT_KV_VERSION} \
-field=PROD_${DEPLOYMENT^^}_PRIVATE_KEY \
${REMOTE_CONFIG_DECRYPTION_KEYS_VAULT_KV_PATH} \
>${DECRYPTION_KEY_PATH}
aws secretsmanager get-secret-value --secret-id remote-config/prod-decryption-keys --region us-east-1 --query SecretString --output text | jq -r ".PROD_${DEPLOYMENT^^}_PRIVATE_KEY" >${DECRYPTION_KEY_PATH}

# Now that we have the decryption key, decrypt lms and studio configs:
asym_crypto_yaml decrypt-encrypted-yaml \
Expand Down

0 comments on commit 19e7777

Please sign in to comment.