Skip to content

Commit abe4986

Browse files
committed
config: unset TLS Key environment variable
Unset the TLS private key environment variable after usage. Since this field can store both the path to a private key as well as a raw private key, it should be unset to not be available to child processes, e.g., an Icinga Notifications channel plugin.
1 parent 94140ed commit abe4986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type TLS struct {
4141

4242
// Key is either the path to the TLS key file or a raw PEM-encoded string representing it.
4343
// If specified, Cert must also be provided.
44-
Key string `yaml:"key" env:"KEY"`
44+
Key string `yaml:"key" env:"KEY,unset"`
4545

4646
// Ca is either the path to the CA certificate file or a raw PEM-encoded string representing it.
4747
Ca string `yaml:"ca" env:"CA"`

0 commit comments

Comments
 (0)