|
|
|
|
|
by paulddraper
932 days ago
|
|
Question: Why do so many webhooks use HMAC signatures for authorization? For everything else in APIs, people are perfectly happy to use API tokens/secrets directly in headers. Why don't webhooks directly share secrets, instead of HMAC signatures? Like, I understand the advantages of HMAC, but for some reason it seems to be that webhooks are unique in their usage of it. |
|
A shared secret alone, or an HMAC based on a shared secret, just means any party with the secret -- which could include anyone who would need to verify it -- composed the message.
I generally don't do what's advocated for in the article because it doesn't make a lot of sense, I do either:
- A shared secret
- A signed and HMACed payload with asymmetric key