Alerting: Add HMAC signature config to the webhook integration (#100960)

Adds HMAC-SHA256 signature support to webhook notifications, providing a way to verify the authenticity and integrity of webhook requests. The implementation allows to specify the header in which the signature will be sent. The signature is calculated from the request body.

An optional timestamp header name can be provided. If set, the HMAC signature will be generated by concatenating the timestamp, a ":" and the request body: {timestamp}:{body}. The timestamp will also be sent in the provided header name.
This commit is contained in:
Alexander Akhmetov
2025-03-14 07:22:41 +01:00
committed by GitHub
parent 1ee0473db6
commit ef5cc12b33
5 changed files with 101 additions and 8 deletions
@@ -617,13 +617,31 @@ Grafana encrypts secure settings in the database.
#### Alert notification `webhook`
| Name | Secure setting |
| ------------ | -------------- |
| `url` | |
| `httpMethod` | |
| `username` | |
| `password` | yes |
| `tls_config` | |
| Name | Secure setting |
| ------------- | -------------- |
| `url` | |
| `http_method` | |
| `username` | |
| `password` | yes |
| `tls_config` | |
| `hmac_config` | |
##### TLS configuration
| Name | Secure setting |
| -------------------- | -------------- |
| `insecureSkipVerify` | |
| `clientCertificate` | yes |
| `clientKey` | yes |
| `caCertificate` | yes |
##### HMAC signature configuration
| Name | Secure setting |
| ----------------- | -------------- |
| `secret` | yes |
| `header` | |
| `timestampHeader` | |
#### Alert notification `googlechat`