jaywink / matrix-alertmanager

A bot to receive Alertmanager webhook events and forward them to chosen rooms.
MIT License
76 stars 22 forks source link

Basic auth support #32

Closed tnyeanderson closed 1 year ago

tnyeanderson commented 1 year ago

I don't want to have to put my password in the URL as a post parameter. Using basic auth leverages existing webhook_configs[].http_config.basic_auth.password_file option to read the password from a file instead (allowing me to check my alertmanager config into git!)

Username must be alertmanager. Password is the same as the APP_ALERTMANAGER_SECRET environment variable.

So far untested, just wanted to get the PR in.

tnyeanderson commented 1 year ago

Fixed some stuff, thanks :) Still waiting on getting the baseline (with query parameter) working as I'm setting up alertmanager for the first time here. Until then I won't be able to validate this... Hoping to get it working this weekend. If anyone else wants to give it a shot and see if it works in the meantime, feel free!

tnyeanderson commented 1 year ago

Just tested it and seems to be working for me!

tnyeanderson commented 1 year ago

Hey @jaywink! Just wanted to ping to make sure this doesn't fall off the radar with all the craziness of the new year. Hope you are well and have a chance to look at this sometime soon. Thanks! :)

jaywink commented 1 year ago

Thanks for reminding, this indeed did fall of the radar :) Thank you for your contribution @tnyeanderson, looks good!