lubelogger probe: use read-only x-api-key instead of admin basic-auth

Non-admin service credential (View-scoped LubeLogger API key 'homepage-svc') for
the reminder probe; admin password removed from /etc/lubelogger-reminders.env.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tommy
2026-07-02 22:35:59 -05:00
parent 739db1ddee
commit 9559b219bf
+2 -2
View File
@@ -6,9 +6,9 @@ set -euo pipefail
# Runs on ansible-control (.190) via lubelogger-reminders.timer. # Runs on ansible-control (.190) via lubelogger-reminders.timer.
# Shape mirrors the gluetun vpn-tunnel-probe (oneshot + timer, set -euo pipefail). # Shape mirrors the gluetun vpn-tunnel-probe (oneshot + timer, set -euo pipefail).
source /etc/lubelogger-reminders.env # LUBELOGGER_URL LUBELOGGER_USER LUBELOGGER_PASS NTFY_URL source /etc/lubelogger-reminders.env # LUBELOGGER_URL LUBELOGGER_APIKEY NTFY_URL
if ! resp=$(curl -sf --max-time 20 -u "${LUBELOGGER_USER}:${LUBELOGGER_PASS}" "${LUBELOGGER_URL}/api/vehicle/info"); then if ! resp=$(curl -sf --max-time 20 -H "x-api-key: ${LUBELOGGER_APIKEY}" "${LUBELOGGER_URL}/api/vehicle/info"); then
logger -t lubelogger-reminders "ERROR: LubeLogger API query failed" logger -t lubelogger-reminders "ERROR: LubeLogger API query failed"
curl -sf --max-time 15 -H "Priority: high" -H "Tags: warning" \ curl -sf --max-time 15 -H "Priority: high" -H "Tags: warning" \
-H "Title: LubeLogger reminder probe failed" \ -H "Title: LubeLogger reminder probe failed" \