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 1 month ago

chapati23 commented 2 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 1 month ago

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