Skip to content

Commit

Permalink
Merge pull request #1761 from edx/katebygrace/demographics-secretsman…
Browse files Browse the repository at this point in the history
…ager

Katebygrace/demographics secretsmanager
  • Loading branch information
katebygrace authored May 21, 2024
2 parents 238a078 + f9fdcb2 commit a78f5c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 0 additions & 2 deletions dataeng/jobs/analytics/SnowflakeDemographicsCleanup.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class SnowflakeDemographicsCleanup {
stringParam('PYTHON_VENV_VERSION', 'python3.7', 'Python virtual environment version to used.')
}
environmentVariables {
env('KEY_PATH', allVars.get('KEY_PATH'))
env('PASSPHRASE_PATH', allVars.get('PASSPHRASE_PATH'))
env('USER', allVars.get('USER'))
env('ACCOUNT', allVars.get('ACCOUNT'))
}
Expand Down
19 changes: 15 additions & 4 deletions dataeng/resources/snowflake-demographics-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@ source "${PYTHON_VENV}/bin/activate"
cd $WORKSPACE/analytics-tools/snowflake
make requirements


python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_stitch_loader.p8 -v rsa_key_stitch_loader
python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_passphrase_stitch_loader -v rsa_key_passphrase_stitch_loader

unset KEY_PATH
unset PASSPHRASE_PATH

python demographics_cleanup.py \
--key_path $WORKSPACE/analytics-secure/$KEY_PATH \
--passphrase_path $WORKSPACE/analytics-secure/$PASSPHRASE_PATH \
--user $USER \
--account $ACCOUNT
--user 'STITCH_LOADER' \
--account 'edx.us-east-1' \
--key_file "$(cat "rsa_key_stitch_loader")" \
--passphrase_file "$(cat "rsa_key_passphrase_stitch_loader")"


rm rsa_key_stitch_loader
rm rsa_key_passphrase_stitch_loader

0 comments on commit a78f5c5

Please sign in to comment.