From dd21c0efeaf91261c3688b42248a2dea263cae2d Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Fri, 6 Nov 2026 12:33:47 +0200 Subject: telegraf: T9569: Pass InfluxDB token via a root-only environment file The InfluxDB token was set with Environment= in the systemd drop-in, so any local user could read it with "systemctl show". The token is now written to a root-only environment file loaded by systemd, and no longer shows up in "systemctl show". Telegraf is restarted when the token changes, as a reload would keep the old value. --- data/templates/telegraf/override.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/templates/telegraf/override.conf.j2 b/data/templates/telegraf/override.conf.j2 index 7e3e4aaf5..1d9cd5dbc 100644 --- a/data/templates/telegraf/override.conf.j2 +++ b/data/templates/telegraf/override.conf.j2 @@ -9,7 +9,7 @@ ExecStart= ExecStart={{ vrf_command }}/usr/bin/telegraf --config /run/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --pidfile /run/telegraf/telegraf.pid PIDFile=/run/telegraf/telegraf.pid EnvironmentFile= -Environment=INFLUX_TOKEN={{ influxdb.authentication.token }} +EnvironmentFile=-{{ telegraf_env_file }} CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN CAP_SYS_ADMIN CAP_BPF CAP_DAC_OVERRIDE AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN Restart=always -- cgit v1.2.3