File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,21 +53,15 @@ config:: # Configure development environment (main) @Configuration
5353# ### Proxygen ####
5454# #################
5555
56- # Proxygen key only exists in our 'dev' AWS Parameter Store
57- PROXYGEN_ENV ?= dev
58-
59- # Specs are published in the APIM 'prod' environment
60- APIM_ENV ?= prod
61-
6256# Verify current AWS account login and retrieve the proxygen key
6357# from AWS SSM Parameter Store
64- retrieve-proxygen-key :
65- @ ./scripts/check-aws-account.sh $( PROXYGEN_ENV )
58+ retrieve-proxygen-key : guard-ENV
59+ @ ./scripts/check-aws-account.sh
6660 mkdir -p ~ /.proxygen
67- aws ssm get-parameter --name /$$ PROXYGEN_ENV /proxygen/private_key --with-decryption \
61+ aws ssm get-parameter --name /$$ ENV /proxygen/private_key --with-decryption \
6862 | jq -r " .Parameter.Value" \
69- > ~ /.proxygen/eligibility-signposting-api-$(APIM_ENV ) .pem && \
70- echo " Retrieved proxygen key for APIM '$( APIM_ENV ) ' environment"
63+ > ~ /.proxygen/eligibility-signposting-api-$(ENV ) .pem && \
64+ echo " Retrieved proxygen key for APIM '$( ENV ) ' environment"
7165
7266# Copy proxygen credentials for the specified environment to `~/.proxygen/`
7367# This location required location for local proxygen usage
Original file line number Diff line number Diff line change 22#! /usr/bin/env bash
33set -e
44
5- APIM_ENV_NAME=" $1 "
6-
7- # Expected AWS account for dev environment
5+ # Expected AWS account details for dev environment
6+ EXPECTED_ENV_NAME=" dev"
87EXPECTED_ACCOUNT=" 448049830832"
98
109# Read the currently authenticated AWS account
@@ -13,10 +12,10 @@ CURRENT_ACCOUNT=$(aws sts get-caller-identity --query "Account" --output text)
1312# Compare the current account with the expected account
1413if [ " $CURRENT_ACCOUNT " != " $EXPECTED_ACCOUNT " ]; then
1514 echo " AWS account mismatch!"
16- echo " The expected login is AWS '$APIM_ENV_NAME ' account $EXPECTED_ACCOUNT , but the current logged in AWS account is $CURRENT_ACCOUNT ."
15+ echo " The expected login is AWS '$EXPECTED_ENV_NAME ' account $EXPECTED_ACCOUNT , but the current logged in AWS account is $CURRENT_ACCOUNT ."
1716 echo " Please switch to the correct AWS account and try again."
1817 echo " Exiting script..."
1918 exit 1
2019fi
2120
22- echo " Active login to AWS '$APIM_ENV_NAME ' account $CURRENT_ACCOUNT verified."
21+ echo " Active login to AWS '$EXPECTED_ENV_NAME ' account $CURRENT_ACCOUNT verified."
Original file line number Diff line number Diff line change 11client_id : eligibility-signposting-api-client
22private_key_path : eligibility-signposting-api-prod.pem
33key_id : 2027-01-21-Prod-eligibility-signposting-api
4+ base_url : https://identity.prod.api.platform.nhs.uk/realms/api-producers
5+
Original file line number Diff line number Diff line change 11client_id : eligibility-signposting-api-client
22private_key_path : eligibility-signposting-api-ptl.pem
33key_id : 2027-01-21-PTL-eligibility-signposting-api
4+ base_url : https://identity.ptl.api.platform.nhs.uk/realms/api-producers
You can’t perform that action at this time.
0 commit comments