Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #216
This PR has an accompanying migration to merge bullet-train-co/bullet_train#785
Overview
We are adding cryptographic signature to outgoing webhooks such that the receiver can (optionally) verify to ensure that the webhook originated from a BulletTrain application (similar to Stripe webhooks).
The signature will be sent in a new header called bullet-train-signature:
![Screen Shot 2023-05-12 at 12 00 58 PM](https://private-user-images.githubusercontent.com/1966473/238035140-4ae1fbaa-c57e-44be-bfac-83811b4dfa88.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4OTIyMjgsIm5iZiI6MTczOTg5MTkyOCwicGF0aCI6Ii8xOTY2NDczLzIzODAzNTE0MC00YWUxZmJhYS1jNTdlLTQ0YmUtYmZhYy04MzgxMWI0ZGZhODgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMTUxODQ4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTY2Mzc4MjAxZWM4YTllZGUzYzlmOTU5MzhmYjMxYTUwNzY3MzRlYmNlOTliNjRhZjQwYzRlMzA2ZWE5YTEyYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.gPx04jcKWgRx1c9MWsCaovzMRmHFKTO90usTVM4pz64)
Testing
Created an outgoing webhook, using pipedream for the url and triggered the event in the application to cause an outgoing webhook. Verified that the outgoing webhook contains the new signature header.