acmutd / acmutd/portal-backend

Secure Webhooks

Abierto
#28 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
3
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Overview**
Secure webhook endpoints coming from known sources such as Typeform or MongoDB

**Details**
This issue will focus specifically on securing the endpoint that is accepting information from Typeform. Completing this will allow for us to easily replicate similar logic for data coming from different sources. The need to secure these endpoints is because our current setup involves exposed webhooks that can potentially receive invalid or malicious requests. Full details on how to secure the endpoints are listed below. Refer to the following sources for the content on how to go about it

- [Typeform Webhook Docs](https://developer.typeform.com/webhooks/secure-your-webhooks/)
- [Express Implementation](https://stackoverflow.com/questions/56149652/validate-typeform-webhook-payload-in-node)

**Task List**
- [x] Create dedicated middleware / express server to handle the typeform webhook endpoint
- [x] Validate `Typeform-Signature` header by generating same sha256 signature
- [x] Generate new secret to use and save it to the Firebase Functions Environment variables. Quick command -> `firebase functions:config:set Typeform.Secret=abc`
- [x] Archive firestore triggers for functions that were dependant on Typeform data but will no longer run in any useful setting (eg. Hacktoberfest)
- [x] Document secret to be used in Typeform in a secure location

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.