forked from CDCgov/trusted-intermediary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-local-vault.sh
executable file
·19 lines (15 loc) · 1.46 KB
/
setup-local-vault.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
# This script loads the credentials into the local vault to set up the ETOR receivers.
# NOTE: Remember to run this script inside the prime-router directory of the prime-reportstream codebase
# Make sure to add a CDCTI_HOME environment variable pointing to the trusted-intermediary directory
# export CDCTI_HOME="/path/to/trusted-intermediary"
private_key=$(cat $CDCTI_HOME/mock_credentials/organization-report-stream-private-key-local.pem)
export $(xargs <.vault/env/.env.local)
./prime create-credential --type UserPass --user foo --pass pass --persist DEFAULT-SFTP
./prime create-credential --type UserApiKey --apikey-user flexion --apikey "$private_key" --persist FLEXION--ETOR-SERVICE-RECEIVER-ORDERS
./prime create-credential --type UserApiKey --apikey-user flexion --apikey "$private_key" --persist FLEXION--ETOR-SERVICE-RECEIVER-RESULTS
./prime create-credential --type UserApiKey --apikey-user ucsd --apikey "$private_key" --persist UCSD--ETOR-NBS-RESULTS
./prime create-credential --type UserApiKey --apikey-user la-phl --apikey "$private_key" --persist LA-PHL--ETOR-NBS-ORDERS
./prime create-credential --type UserApiKey --apikey-user la-ochsner --apikey "$private_key" --persist LA-OCHSNER--ETOR-NBS-RESULTS
./prime create-credential --type UserApiKey --apikey-user al-phl --apikey "$private_key" --persist AL-PHL--ETOR-NBS-ORDERS
./prime create-credential --type UserApiKey --apikey-user oracle-rln --apikey "$private_key" --persist ORACLE-RLN--ETOR-NBS-RESULTS