mento-protocol / governance-watchdog

A system that monitors Mento Governance events on-chain and sends notifications about them to Discord and Telegram
0 stars 0 forks source link

Add request signature validation #3

Closed chapati23 closed 3 months ago

chapati23 commented 3 months ago

Depends on #1 and #2 being merged first.

This adds a validation function to check if the caller of the cloud function is actually quick alerts following this: https://www.quicknode.com/docs/quickalerts/quickalerts-destinations/webhooks/webhook-signature

I left it outcommented in the main function for now because I couldn't test it with a real payload. I think it would be easiest to try this out for the monitoring events from sorted oracles because those come in frequently.

nvtaveras commented 3 months ago

Updated to include X-AUTH-Token header for internal testing request. Deployed + tested