consul-alerts icon indicating copy to clipboard operation
consul-alerts copied to clipboard

Support JWT auth for HTTP notifier

Open onimsha opened this issue 5 years ago • 2 comments

Currently http notifier does not support Token authentication using JWT, i'd like to add support to it as following:

config prefix: consul-alerts/config/notifiers/http-endpoint/

Key | Type | Description token | base64-encoded | Token to set on the 'Authorization' header

Key Type Description
token base64-encoded Token to set on the 'Authorization' header

When sending payload, http notifier will use the token and create the header as following 'Authorization: Bearer $token' .

onimsha avatar Nov 13 '19 03:11 onimsha

I assume that a separate process would be required to set the token and consul-alerts would just be in charge of presenting whatever would be found there.

fusiondog avatar Nov 13 '19 07:11 fusiondog

Yes, since the notifier config is using consul KV, we can sett the token in the config prefix.

onimsha avatar Nov 14 '19 06:11 onimsha