jiralert
jiralert copied to clipboard
Encrypt password while using basic auth
I have Jira server installation which does not support api token and Jiralert does not support oauth, so basic auth is the only option. Is there a way to encrypt the password somehow or provide it via environment variable. BTW, I intend to use the jiralert container.
Yes! I think I love this idea.
What about envvar substitution inside configuration file. E.g we could use https://github.com/thanos-io/thanos/blob/main/pkg/reloader/reloader.go#L411:6 would that work?
PRs and help wanted 🤗
Env var substitution would be a great addition. That way one could also pass the PAT to the app in a secure way.
Maybe i will find the time to give it a try. Adding:
https://github.com/thanos-io/thanos/blob/296c4ab4baf2c8dd6abdf2649b0660ac77505e63/pkg/reloader/reloader.go#L445-L462
to
https://github.com/prometheus-community/jiralert/blob/a0f0e80e575e71cbf7db565d3296a3a984282dff/pkg/config/config.go#L63
just like
https://github.com/thanos-io/thanos/blob/296c4ab4baf2c8dd6abdf2649b0660ac77505e63/pkg/reloader/reloader.go#L302-L305
plus some tests like
https://github.com/thanos-io/thanos/blob/296c4ab4baf2c8dd6abdf2649b0660ac77505e63/pkg/reloader/reloader_test.go#L89-L102
should be pretty much it right?
Also related: https://github.com/prometheus/alertmanager/pull/2855
Here's a PR with the changes required: https://github.com/prometheus-community/jiralert/pull/125