I’m not able to validate the webhook signature in python. Every time I compute HMAC hash for request content by using SHA256, the result does not match with signature passed by Orchestrator from webhook.
Below is the code:
import hmac, json, locale
digest = hmac.new(b"[Key set in orchestrator webhook]", str(event.body).encode(‘utf-8’), hashlib.sha256).digest()
string_signature = base64.b64encode(digest)
Note: Webhook listener is implemented in AWS with the help of API Gateway + Lambda (Python)
Please can someone help on this?
Many thanks in advance!