Skip to main content
← Back to list
01Issue
FeatureClosedSwamp Club
Assigneesstack72

Relationships

#1188 Bind ghost device reputation on whoami when Swamp-Distinct-Id header is present

Opened by stack72 · 7/16/2026

When the CLI authenticates via SWAMP_API_KEY and calls the /api/auth/whoami endpoint, it sends both the Authorization: Bearer [REDACTED-SECRET] (identifying the account) and the Swamp-Distinct-Id header (identifying the device). The server should use this signal to bind any ghost device reputation accumulated under that distinct_id to the authenticated account — the same binding that currently happens during the swamp auth login OAuth callback flow.

Automation hosts (cron, CI, homelab) authenticate via SWAMP_API_KEY because interactive swamp auth login is impractical on headless machines. These are exactly the machines most likely to accumulate long-running activity under a ghost device identity. Without server-side binding on whoami, there is no practical way to attribute that activity to the owning account.

Ask: When the /api/auth/whoami endpoint receives a request with both a valid API key and a Swamp-Distinct-Id header, perform the same ghost-to-account binding that the OAuth login callback does. This is a one-time operation per distinct_id — once bound, subsequent requests are no-ops.

References:

  • CLI implementation: swamp-club issue #1178
  • Ghost page copy currently says 'the moment this device authenticates (swamp auth login), every point here folds into that account' — should be updated to mention SWAMP_API_KEY once this is implemented
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED+ 2 MORETRIAGE+ 2 MOREREVIEW+ 2 MOREPR_LINKED

Closed

7/17/2026, 3:06:50 PM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack727/16/2026, 10:04:28 PM

Sign in to post a ripple.