Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove GovPay env vars #2888

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,15 @@ SUPPRESS_LOGS=true

# Local authority specific integrations
## Lambeth
GOV_UK_PAY_TOKEN_LAMBETH=👻
UNIFORM_CLIENT_LAMBETH=👻

## Southwark
GOV_UK_PAY_TOKEN_SOUTHWARK=👻
UNIFORM_CLIENT_SOUTHWARK=👻

## Buckinghamshire
GOV_UK_PAY_TOKEN_BUCKINGHAMSHIRE=👻
UNIFORM_CLIENT_AYLESBURY_VALE=👻
UNIFORM_CLIENT_CHILTERN=👻
UNIFORM_CLIENT_WYCOMBE=👻

## Camden
GOV_UK_PAY_TOKEN_CAMDEN=👻

## Gloucester
GOV_UK_PAY_TOKEN_GLOUCESTER=👻

## Medway
GOV_UK_PAY_TOKEN_MEDWAY=👻

## End-to-end test team (borrows Lambeth's details)
GOV_UK_PAY_SECRET_E2E=👻
GOV_UK_PAY_TOKEN_E2E=👻
21 changes: 1 addition & 20 deletions api.planx.uk/.env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,4 @@ UNIFORM_SUBMISSION_URL=👻

SLACK_WEBHOOK_URL=👻

ORDNANCE_SURVEY_API_KEY=👻

# Local authority specific integrations
## Lambeth
GOV_UK_PAY_TOKEN_LAMBETH=👻

## Southwark
GOV_UK_PAY_TOKEN_SOUTHWARK=👻

## Buckinghamshire
GOV_UK_PAY_TOKEN_BUCKINGHAMSHIRE=👻

## Camden
GOV_UK_PAY_TOKEN_CAMDEN=👻

## Gloucester
GOV_UK_PAY_TOKEN_GLOUCESTER=👻

## Medway
GOV_UK_PAY_TOKEN_MEDWAY=👻
ORDNANCE_SURVEY_API_KEY=👻
5 changes: 0 additions & 5 deletions api.planx.uk/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ assert(process.env.BOPS_API_TOKEN);
assert(process.env.UNIFORM_TOKEN_URL);
assert(process.env.UNIFORM_SUBMISSION_URL);

// Camden, Medway & Gloucester have sandbox pay only, so skip assertion as this will fail in production
["BUCKINGHAMSHIRE", "LAMBETH", "SOUTHWARK"].forEach((authority) => {
assert(process.env[`GOV_UK_PAY_TOKEN_${authority}`]);
});

// needed for storing original URL to redirect to in login flow
app.use(
cookieSession({
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ services:
environment:
UNIFORM_SUBMISSION_URL: http://mock-server:8080
UNIFORM_TOKEN_URL: http://mock-server:8080
UNIFORM_CLIENT_E2E: e2e:123
GOV_UK_PAY_TOKEN_E2E: ${GOV_UK_PAY_TOKEN_E2E}
UNIFORM_CLIENT_E2E: e2e:123
9 changes: 0 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,13 @@ services:
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
# Local authority config
# Lambeth
GOV_UK_PAY_TOKEN_LAMBETH: ${GOV_UK_PAY_TOKEN_LAMBETH}
UNIFORM_CLIENT_LAMBETH: ${UNIFORM_CLIENT_LAMBETH}
# Southwark
GOV_UK_PAY_TOKEN_SOUTHWARK: ${GOV_UK_PAY_TOKEN_SOUTHWARK}
UNIFORM_CLIENT_SOUTHWARK: ${UNIFORM_CLIENT_SOUTHWARK}
# Buckinghamshire
GOV_UK_PAY_TOKEN_BUCKINGHAMSHIRE: ${GOV_UK_PAY_TOKEN_BUCKINGHAMSHIRE}
UNIFORM_CLIENT_AYLESBURY_VALE: ${UNIFORM_CLIENT_AYLESBURY_VALE}
UNIFORM_CLIENT_CHILTERN: ${UNIFORM_CLIENT_CHILTERN}
UNIFORM_CLIENT_WYCOMBE: ${UNIFORM_CLIENT_WYCOMBE}
#Camden
GOV_UK_PAY_TOKEN_CAMDEN: ${GOV_UK_PAY_TOKEN_CAMDEN}
# Medway
GOV_UK_PAY_TOKEN_MEDWAY: ${GOV_UK_PAY_TOKEN_MEDWAY}
# Gloucester
GOV_UK_PAY_TOKEN_GLOUCESTER: ${GOV_UK_PAY_TOKEN_GLOUCESTER}

sharedb:
restart: unless-stopped
Expand Down
6 changes: 0 additions & 6 deletions infrastructure/application/Pulumi.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ config:
application:google-client-id: 987324067365-vpsk3kgeq5n32ihjn760ihf8l7m5rhh8.apps.googleusercontent.com
application:google-client-secret:
secure: AAABAN5E+De3A3HtpLVaSNTDwk9Uz4r2d5g8SIRVbNOd2fj3eU+lGJXjVbEAnxezr14hwabbfwW2ptjcFzqkhG7OmQ==
application:gov-uk-pay-token-buckinghamshire:
secure: AAABAA0ya8JhmFcgwuuf5i+XiJZ/uDp4SEGplUiiojyZzDtbjlZZfd8tNw8PjqKHzMBIhgyB2gHSsx9D/FV+cxxBa1AfIFtcj/l3rIrkK9jeG+yXtHnsLKr7MsZUqi6SdFft
application:gov-uk-pay-token-lambeth:
secure: AAABAK7qJXCA9mN96DeDWHqRDY7xe5glU9NZ2oTWVxYHR0NhkA83JOnI6dhknhUh8m7IMyy59lFIzeFCG3gOoWvkoTeQNiok7T91ek2f8UQqSSzgfUzgftbRm2sCkS5Yn0bW
application:gov-uk-pay-token-southwark:
secure: AAABAEosPvNevt9G7xLgTJIgyPDe9ZmXZnQa2BIsk7glewLz+EFzCvMVFq+9RkiEzkg9GdV2S7ttZ+6fCb5gByNbM7n2JcVG6a+LH9nHv6NwcoZ6U8ORArwiL4uO8xvGQQzD
application:govuk-notify-api-key:
secure: AAABADo05EPv/HWj7Rkf19nBeTcPJd4pEcRi2/uhyB3agraFODpLvNMx2bXfISf5pZ4HA41GYCE4f7OLcJN6hIV6ZMWUlEriPzvkoUAixbLlz1LIERiyk73R8E4F2bV65/9aFqi4l7caLS5c8iDJrE+JAvu2i7oS
application:hasura-admin-secret:
Expand Down
12 changes: 0 additions & 12 deletions infrastructure/application/Pulumi.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ config:
application:google-client-id: 987324067365-vpsk3kgeq5n32ihjn760ihf8l7m5rhh8.apps.googleusercontent.com
application:google-client-secret:
secure: AAABAGQuqQDU4S+vR+cQaFoa6xAeWU9clVaNonQ/dq0R8Dke+o0y7ALOmYMy4fOX4Pa6HiZl85npU/cbwy8HdMYaiA==
application:gov-uk-pay-token-buckinghamshire:
secure: AAABADroqKJ1/CanxoghKyCutFA8bmiPBuafrNYGNMn1H16jXiHuytHUUByTbXZZHtANciv7rkQEJosUmyay5j/ZFKu9TeS2WaIGBD913EVlv4iXDw3Y5OU2bSocROlYQm7/
application:gov-uk-pay-token-camden:
secure: AAABAA2gkhNBs2hOfIkhHiA50MF3X8xnaGvLVzWdg0OOTl9qOKgtCjS76/XBIpGsGEyFbtHwuOgWhPw1qgql7MBO+pTnfLzDc8WcbxQFMbIjKUAgqF4yUMu75jcOiJ9XadNq
application:gov-uk-pay-token-gloucester:
secure: AAABAMzflVg0cd5sjaETPp/s+OhgAr9UC4p8B72HiLHLUmNoFlsdWmCi4Z9rX6fEx+R008e0JHTz6REYQXWegH80QYMhKsUonmMON8/QMiz3AbDfZnEOGovMuC7mFLGpRDqn
application:gov-uk-pay-token-lambeth:
secure: AAABAPy5USkd8/hwq6vFXP45BXsYFUltR6gj8PoiZkOLRPUd1wgQ3Yhgc1Cyn+lb5cZrXBoVPjuVhm/UvBN82DNzRTl2TxAakCQQIrBU5xil+m9UnbY82CNSMDuEaWwMpR3C
application:gov-uk-pay-token-medway:
secure: AAABAOf9pQgmUkPWbyBQpkd2eZDtzx8WhHfPMD+V8lDLP/hqo24ZZyCrDfq6VBrcEeZVL89dvJ/PIVng9V5xFDKwpRcChTsOsen6epWGE/I0zwDdwrONmxgbPXnGgxLDtiEp
application:gov-uk-pay-token-southwark:
secure: AAABALGCrA9ZqRLql+ZHRQD/q6GiGNihtdgPL/7k5d37vgjqW115YR30HG9ofE00qP2Hkr2ZkYkJhVCIr9G5l1wSGXBNI+ldXxTCU8PWLGWv+Xa+Sv5Ltgd9egmwBBqUgvwe
application:govuk-notify-api-key:
secure: AAABACgwjEmlLmE19ofRO8e/JpD8sHDV2lcDmSXbU/Mw8ZRh5gTgll8DZ3BVjpDWfQfIecBAIf2TFgeo9CsBSLjfaRJ7eJyKDSWm7i8LlMC2JN/PN+Ig8oeI0H0oLkqJIziNKKjx+e97zDiXO9LZ1CVzrywR
application:hasura-admin-secret:
Expand Down
15 changes: 0 additions & 15 deletions infrastructure/application/utils/generateTeamSecrets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,6 @@ export const generateTeamSecrets = (
): awsx.ecs.KeyValuePair[] => {
const secrets: awsx.ecs.KeyValuePair[] = [];
teams.forEach((team) => {
switch(env) {
case "staging":
secrets.push({
name: `GOV_UK_PAY_TOKEN_${name(team.name)}`,
value: config.require(`gov-uk-pay-token-${value(team.name)}`),
});
break;
case "production":
if (!team?.govPayStagingOnly) {
secrets.push({
name: `GOV_UK_PAY_TOKEN_${name(team.name)}`,
value: config.require(`gov-uk-pay-token-${value(team.name)}`),
});
}
};
team.uniformInstances?.forEach((instance) => {
secrets.push({
name: `UNIFORM_CLIENT_${name(instance)}`,
Expand Down
Loading