"Sapporo": ephemeral tokens
Scenario: "Sapporo": ephemeral tokens
Level: Hard
Type: Fix
Tags: bash
Access: Email
Description: The Sapporo gate API on this host should answer on http://127.0.0.1:9180/ with a body containing OK.
A background service writes short-lived tokens to /var/lib/sapporo/pulse (each value is visible for only a fraction of a second, then the file is cleared again). The gate compares /home/admin/sapporo/active-token against the latest emitted token.
The installed collector at /home/admin/sapporo-collector.sh (triggered by sapporo-collector.timer once per minute) never keeps up; active-token stays empty or stale and the gate keeps failing.
Fix collection so the current token is captured reliably and the gate returns OK.
Root (sudo) Access: True
Test: curl http://127.0.0.1:9180/ returns a response whose body contains OK, and /home/admin/sapporo/active-token holds a token matching the current pulse (format SAPPORO- followed by eight hex digits).
The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Time to Solve: 20 minutes.