alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Allow reading Pagerduty secrets from files

Open sinkingpoint opened this issue 3 years ago • 6 comments

This commit adds two optional config values to pagerduty routing configurations - service_key_file and routing_key_file. These function the same as their non _file variants (and infact only one can be specified), but allows reading the value from a file instead of embedding the secret in the config file itself

Signed-off-by: sinkingpoint [email protected]

c.c. @roidelapluie as discussed, this trims that PR down to just the Pagerduty stuff

sinkingpoint avatar Jun 16 '21 09:06 sinkingpoint

Partially solves #2618 / #2498

sinkingpoint avatar Jun 16 '21 20:06 sinkingpoint

I am wondering if we should add the extra helper function or not. It is really case by case if it should be read from file because we want to use the content of the file every time we make a request. So we could miss a place later on where we would use a "static" secret instead of a dynamic one.

roidelapluie avatar Jun 28 '21 14:06 roidelapluie

I think the helper function is still useful - itherwise we would have a bunch of redundant IO logic everywhere. There's nothing stopping you calling the helper every time you use the secret. Particularly in a world where all the secrets are file readable, having this "if file read file, otherwise use plain text secret" logic scattered about everywhere sounds bad when we can abstract it

sinkingpoint avatar Jul 05 '21 03:07 sinkingpoint

Hi, I'm interested in this change too. Is there anything that needs to be done for it to be ready to be reviewed, that I can help with?

gecgooden avatar Nov 17 '21 01:11 gecgooden

I'm also interested in this

mattchrist avatar Jan 07 '22 14:01 mattchrist

I am also interested it this PR. I will ease the configuration of pagerduty, heavily.

d7volker avatar Mar 28 '22 10:03 d7volker

Closed by https://github.com/prometheus/alertmanager/pull/3107

simonpasquier avatar Oct 14 '22 12:10 simonpasquier