Skip to content

Conversation

@Jetiaime
Copy link

  • Add Basic Auth and Bearer Token authentication types to webhook notifications
  • Update NoticeReceiver entity with hookAuthType and hookAuthToken fields
  • Implement authentication headers in WebHookAlertNotifyHandlerImpl
  • Add frontend UI support for webhook authentication configuration
  • Update i18n translations for new authentication options

What's changed?

Add Authentication Header On WebHooks

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

- Add Basic Auth and Bearer Token authentication types to webhook notifications
- Update NoticeReceiver entity with hookAuthType and hookAuthToken fields
- Implement authentication headers in WebHookAlertNotifyHandlerImpl
- Add frontend UI support for webhook authentication configuration
- Update i18n translations for new authentication options
Copy link
Member

@MasamiYui MasamiYui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have a suggestion to discuss with you, This implementation maybe too specific. how about allowing users to set arbitrary http headers, which can cover more authorizations like Basic/Bearer or company-specific authorization headers.

@Jetiaime
Copy link
Author

Hi, I have a suggestion to discuss with you, This implementation maybe too specific. how about allowing users to set arbitrary http headers, which can cover more authorizations like Basic/Bearer or company-specific authorization headers.

Yeah, I consider about it, but there are some problems we need to solve first: If we allow users to pass the whole headers, it may passed it as a HashMap, there is not have a good way to render it in the frontend. I prefer a simple feature for now, to keep the authentication part simple (user may enter a whole json string or add key-value table like the notifier rules, there is more complexity). And because I'm new to this project, So I wanna to push a simple feature first, then we can discuss more about the headers part. What do you think? If you can help to implement it, that would be great.

@MasamiYui
Copy link
Member

Hi, I have a suggestion to discuss with you, This implementation maybe too specific. how about allowing users to set arbitrary http headers, which can cover more authorizations like Basic/Bearer or company-specific authorization headers.

Yeah, I consider about it, but there are some problems we need to solve first: If we allow users to pass the whole headers, it may passed it as a HashMap, there is not have a good way to render it in the frontend. I prefer a simple feature for now, to keep the authentication part simple (user may enter a whole json string or add key-value table like the notifier rules, there is more complexity). And because I'm new to this project, So I wanna to push a simple feature first, then we can discuss more about the headers part. What do you think? If you can help to implement it, that would be great.

Hi, about UI design of HTTP headers, you can either refer to the designs of other systems or implement it according to your own ideas. If any issues, we could discuss together.

@tomsun28
Copy link
Member

tomsun28 commented Oct 5, 2025

Hi👍, suggest the common HTTP headers +1.
About the map render in the front ui, how about use the https://github.com/apache/hertzbeat/tree/master/web-app/src/app/shared/components/configurable-field

@Aias00
Copy link
Contributor

Aias00 commented Oct 21, 2025

@Jetiaime hi, pls fix ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: To do

Development

Successfully merging this pull request may close these issues.

6 participants