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: setup power automate api keys for Medway #4078

Merged
merged 1 commit into from
Dec 12, 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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ FILE_API_KEY_BARNET=👻
FILE_API_KEY_LAMBETH=👻
FILE_API_KEY_SOUTHWARK=👻
FILE_API_KEY_EPSOM_EWELL=👻
FILE_API_KEY_MEDWAY=👻

# Editor
EDITOR_URL_EXT=http://localhost:3000
Expand Down
1 change: 1 addition & 0 deletions api.planx.uk/.env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ FILE_API_KEY_BARNET=👻
FILE_API_KEY_LAMBETH=👻
FILE_API_KEY_SOUTHWARK=👻
FILE_API_KEY_EPSOM_EWELL=👻
FILE_API_KEY_MEDWAY=👻

# Editor
EDITOR_URL_EXT=example.com
Expand Down
4 changes: 4 additions & 0 deletions api.planx.uk/modules/auth/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export const useFilePermission: RequestHandler = (req, _res, next): void => {
req.headers["api-key"] as string,
process.env.FILE_API_KEY_SOUTHWARK!,
) ||
isEqual(
req.headers["api-key"] as string,
process.env.FILE_API_KEY_MEDWAY!,
) ||
isEqual(
req.headers["api-key"] as string,
process.env.FILE_API_KEY_EPSOM_EWELL!,
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ services:
FILE_API_KEY_LAMBETH: ${FILE_API_KEY_LAMBETH}
FILE_API_KEY_SOUTHWARK: ${FILE_API_KEY_SOUTHWARK}
FILE_API_KEY_EPSOM_EWELL: ${FILE_API_KEY_EPSOM_EWELL}
FILE_API_KEY_MEDWAY: ${FILE_API_KEY_MEDWAY}
FILE_API_KEY_NEXUS: ${FILE_API_KEY_NEXUS}
FILE_API_KEY: ${FILE_API_KEY}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/application/Pulumi.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ config:
secure: AAABANvwhiVRBq8NH7ZqcToUzYn4X+KfC5Wm8WjWUKXT5TuVXqC6zHhVVKFBbmdtKjC4j5M4+bWsLiFO9dO0MLobxLpK7YCE
application:file-api-key-lambeth:
secure: AAABAMNhdCTlFx3fZH/nO71ildypZB2JR5NixlQCENsS1VqwdiOX17q/Gi1UFrCQi2qaY2sZFG4=
application:file-api-key-medway:
secure: AAABABXSnk3j06JukiZ2u/me+pnRjHWAm+rf9FW9bSmzMfr9SWSKyN4XlltOYv1iZKujgI9hGIGiVR40+uYjGjy7BwNqOFxI
application:file-api-key-nexus:
secure: AAABAB2cv4GAf8RqN1hHbRbO68p8o4kLJYWsip9BoPdobrNtQB787M3s+gJnKKl9DfyXRHOXHGc=
application:file-api-key-southwark:
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/application/Pulumi.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ config:
secure: AAABAD1/nlJ2EOEglLiiNsOLbOd3KWCONhNhJAIdZQVnrSRsNIzX2luszOreQf20EYl8AZ4L1TiheqUHSt22e5z1FiLWoCtY
application:file-api-key-lambeth:
secure: AAABALQTeIf/uScxASJkhmoPRhewQT94Guad4iJ7GRk0DcND8wDUG0eNxDU4+XwUQZqCnL2DP+E=
application:file-api-key-medway:
secure: AAABABCpSTmTDJU81pG7U57Igr4OtBbX6VuqRooq9Ipzoq1peTenbNQYBWacZn6lyg7ceLAgbiHQgT7LqX2tKN1QwON/BSQh
application:file-api-key-nexus:
secure: AAABAJFgaBoTWNmZyXDkGRngwU8KpOt6CeBLxGBgBG0JFMsKK7rWT39TsjJ9pL1wZaBoT0YZhCg=
application:file-api-key-southwark:
Expand Down
4 changes: 4 additions & 0 deletions infrastructure/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ export = async () => {
name: "FILE_API_KEY_EPSOM_EWELL",
value: config.requireSecret("file-api-key-epsom-ewell"),
},
{
name: "FILE_API_KEY_MEDWAY",
value: config.requireSecret("file-api-key-medway"),
},
{
name: "GOOGLE_CLIENT_ID",
value: config.require("google-client-id"),
Expand Down
Loading