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

integrations: Doncaster Power Automate / S3 #4125

Merged
merged 5 commits into from
Jan 9, 2025
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 @@ -35,6 +35,7 @@ FILE_API_KEY_SOUTHWARK=👻
FILE_API_KEY_EPSOM_EWELL=👻
FILE_API_KEY_MEDWAY=👻
FILE_API_KEY_GATESHEAD=👻
FILE_API_KEY_DONCASTER=👻

# 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 @@ -25,6 +25,7 @@ FILE_API_KEY_SOUTHWARK=👻
FILE_API_KEY_EPSOM_EWELL=👻
FILE_API_KEY_MEDWAY=👻
FILE_API_KEY_GATESHEAD=👻
FILE_API_KEY_DONCASTER=👻

# 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 @@ -110,6 +110,10 @@ export const useFilePermission: RequestHandler = (req, _res, next): void => {
isEqual(
req.headers["api-key"] as string,
process.env.FILE_API_KEY_EPSOM_EWELL!,
) ||
isEqual(
req.headers["api-key"] as string,
process.env.FILE_API_KEY_DONCASTER!,
);
if (!isAuthenticated) return next({ status: 401, message: "Unauthorised" });
return next();
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ services:
FILE_API_KEY_EPSOM_EWELL: ${FILE_API_KEY_EPSOM_EWELL}
FILE_API_KEY_MEDWAY: ${FILE_API_KEY_MEDWAY}
FILE_API_KEY_GATESHEAD: ${FILE_API_KEY_GATESHEAD}
FILE_API_KEY_DONCASTER: ${FILE_API_KEY_DONCASTER}
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 @@ -10,6 +10,8 @@ config:
secure: AAABAGyTfLujGho+V0tEhFXQRET5FjYK6txyaFTB3gY/VaKzq8yNlocJTAM5nt8mBhF6T+AeQD2GxW63
application:file-api-key-barnet:
secure: AAABANMl+fVFsRVGXvJV/aLManXO+TldXVDhp5QH6KGWJoG7O9Ket63zIW1iOiinINWJ2I5OizI=
application:file-api-key-doncaster:
secure: AAABANsIFFm3IsQKbZHe4lEZGsJv3bcK2XOVzd6IiKj+4i/eiILIc7BS0KDQxqLskQ6QCv1sDw04pie8cvAlKqVYWBGmomA2
application:file-api-key-epsom-ewell:
secure: AAABANvwhiVRBq8NH7ZqcToUzYn4X+KfC5Wm8WjWUKXT5TuVXqC6zHhVVKFBbmdtKjC4j5M4+bWsLiFO9dO0MLobxLpK7YCE
application:file-api-key-gateshead:
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 @@ -11,6 +11,8 @@ config:
secure: AAABAN0LjLOgxCkr5ZqQLn6FkZPcrPlvNG4fbNZ02W2qC1VVYVee/3aToZQuXuokVwnIPNbbe2w=
application:file-api-key-barnet:
secure: AAABAFpZq81zy3CKFXUgi9oEGIGp7LDVD3TNlYkZD4liX0bxOrmMJYdDpMmyGt4aGARF63nEUmo=
application:file-api-key-doncaster:
secure: AAABAIZjfr4tVG+HG9+83bPYQjgD1hmK5P+SbYpq4qGue07rHA02kciAkTMCyxD5Lzb0WX0K6fm5cvH2tof5mmX7gJGTkMVc
application:file-api-key-epsom-ewell:
secure: AAABAD1/nlJ2EOEglLiiNsOLbOd3KWCONhNhJAIdZQVnrSRsNIzX2luszOreQf20EYl8AZ4L1TiheqUHSt22e5z1FiLWoCtY
application:file-api-key-gateshead:
Expand Down
4 changes: 4 additions & 0 deletions infrastructure/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ export = async () => {
name: "FILE_API_KEY_GATESHEAD",
value: config.requireSecret("file-api-key-gateshead"),
},
{
name: "FILE_API_KEY_DONCASTER",
value: config.requireSecret("file-api-key-doncaster"),
},
{
name: "GOOGLE_CLIENT_ID",
value: config.require("google-client-id"),
Expand Down
Loading