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

fix: Add security header for /webhooks API routes #2308

Merged
merged 1 commit into from
Oct 14, 2023
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
5 changes: 5 additions & 0 deletions api.planx.uk/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const securitySchemes = {
scheme: "bearer",
bearerFormat: "JWT",
},
hasuraAuth: {
type: "apiKey",
in: "header",
name: "Authorization",
},
};

const parameters = {
Expand Down
14 changes: 14 additions & 0 deletions api.planx.uk/modules/webhooks/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ paths:
/webhooks/hasura/sendSlackNotification:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Send Slack notification
description: Endpoint to trigger a Slack notification following a submission event
parameters:
Expand All @@ -212,6 +214,8 @@ paths:
/webhooks/hasura/create-payment-invitation-events:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Create payment invitation events
description: Setup events which will trigger payment invitation emails to be generated
requestBody:
Expand All @@ -227,6 +231,8 @@ paths:
/webhooks/hasura/create-payment-reminder-events:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Create payment reminder events
description: Setup events which will trigger payment reminder emails to be generated
requestBody:
Expand All @@ -242,6 +248,8 @@ paths:
/webhooks/hasura/create-payment-expiry-events:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Create payment expiry events
description: Setup events which will trigger payment expiry emails to be generated
requestBody:
Expand All @@ -257,6 +265,8 @@ paths:
/webhooks/hasura/create-reminder-event:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Create session reminder event
description: Setup events which will trigger session reminder emails to be generated
requestBody:
Expand All @@ -272,6 +282,8 @@ paths:
/webhooks/hasura/create-expiry-event:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Create session expiry event
description: Setup events which will trigger session expiry email to be generated
requestBody:
Expand All @@ -287,6 +299,8 @@ paths:
/webhooks/hasura/sanitise-application-data:
post:
tags: ["webhooks"]
security:
- hasuraAuth: []
summary: Sanitise application data
description: Called by Hasura cron job "sanitise_application_data" on a nightly basis
responses:
Expand Down
Loading