BCG WhitelistedAppKeys
📝 Overview
The whitelisted appKeys are stored in AWS secrets and can be added/updated using the manage_secrets.sh script with following changes.
Link to manage_secret.sh file: manage_secrets
Creating and Updating the whitelisted app Keys
Creating aws secret
// Make the following changes
create_secret() {
echo "Creating secret: $SECRET_NAME in $ENVIRONMENT environment..." aws secretsmanager create-secret \
--name "$SECRET_NAME" \
--description "Whitelisted app keys for TLA $TLA" \
--secret-string "{\"$API_KEY\":\"$API_SECRET\"}" \
--tags "[{\"Key\":\"Platform:Environment\",\"Value\":\"$ENVIRONMENT\"}, \
{\"Key\":\"Platform:BusinessVertical\",\"Value\":\"$BUSINESS_VERTICAL\"}, \
{\"Key\":\"Platform:CostCode\",\"Value\":\"$COST_CODE\"}, \
{\"Key\":\"Platform:TLA\",\"Value\":\"$TLA\"}]" \
--profile "$PROFILE" > /dev/null
echo "Secret created successfully!"
}
Adding to existing aws secret
// Make the following changes to the manage_secrets
update_secret() {
echo "Updating secret value for: $SECRET_NAME..."
aws secretsmanager put-secret-value \
--secret-id "$SECRET_NAME" \
--secret-string "{\"APP_KEYS\":\"$API_SECRET\"}" \
--profile "$PROFILE" > /dev/null
echo "Secret updated successfully!"
}
Existing Whitelisted AppKeys
Service : Fred, Contact: Callisto ask_personalisation
| s.n | service name | whitelistedAppKeys |
|---|---|---|
| 1 | Fred | AWS-Secrets |
| ------------------------------------------------------------------------ |