Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Configurable HMAC request signing for outgoing webhooks #4248

Open
alexander-akhmetov opened this issue Feb 10, 2025 · 0 comments

Comments

@alexander-akhmetov
Copy link

alexander-akhmetov commented Feb 10, 2025

Hi,

I'd like to propose adding HMAC SHA256 request signing to the Alertmanager HTTP client for outgoing webhooks. This would help ensure message authenticity.

Proposed Solution
It seems there is no standard for HMAC request signing and different services implement it in slightly different ways. Some sign only the request body, while others include headers, the request path, or query parameters.

I've looked into some of the existing implementations (Slack, Docusign, Azure) and followed an approach similar to Slack:

  • The signature is generated using only the request body.
  • A timestamp can be included to mitigate replay attacks, but it's optional.
  • Header names are configurable.

I’ve prepared a PR that adds this via an optional custom RoundTripper, so we can see how it'd look like:

prometheus/common#758

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant