Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS API authorizer include body

Is there a way to validate request in API Gateway based on its body? I need to calculate SHA1 hash of the body to validate the sender - Facebook messenger events... Is there a workaround for it?

like image 883
Jan Sila Avatar asked Sep 15 '25 14:09

Jan Sila


1 Answers

ApiGateway does not support passing complete body to custom authorizer. One option is to have two level of authentication - first just based on header/query parameter ( which api gateway support ) and enough to detect spoof senders. Second can be SHA1 hash based on complete body which you can implement in your backend

like image 138
Vishal Avatar answered Sep 17 '25 05:09

Vishal