Conversation
vbudhram
approved these changes
Feb 20, 2025
| } | ||
|
|
||
| // Only write log entries for certain statuses. | ||
| switch (messageStatus.MessageStatus) { |
| }, | ||
| { | ||
| method: 'POST', | ||
| path: '/message-status', |
Contributor
There was a problem hiding this comment.
Seems like this route should be authenticated?
Contributor
Author
There was a problem hiding this comment.
It's protected by the twilio account sid. It needs to be a public endpoint though that twilio can call it. If the proper account sid is not provided in the payload, the request is just terminated and is a no op.
Do you think we should create a custom auth handler for the account sid? Or is it okay to let the end point do the work?
Contributor
There was a problem hiding this comment.
Oh I meant based on their doc, they recommended verifying the X-Twilio-Signature header using their library. You could make a new auth-scheme or do it route handler.
Because: - We want to monitor sms delivery status This Commit: - Adds endpoint for twilio webhook - Logs info about delivery status - Records metrics about delivery status - Adds auth scheme for validating X-Twilio-Signature header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Because
This pull request
Issue that this pull request solves
Closes: FXA-11133
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
We can fully test this once we get it on stage.