Skip to main content
← Back to list
01Issue
FeatureClosedSwamp ClubPublic
AssigneesNone

Relationships

#2516 Docs: document server token GC and --token-gc-interval / --token-gc-grace-period in serve-flags.md

Opened by stack72 · 9/25/2026

swamp-club#2413 makes swamp serve garbage-collect server tokens in every auth mode. The manual page content/manual/reference/swamp-serve/serve-flags.md needs updating.

New settings

Flag Env var serve.yaml key Default
--token-gc-interval SWAMP_TOKEN_GC_INTERVAL token-gc-interval 1h; 0 disables the GC
--token-gc-grace-period SWAMP_TOKEN_GC_GRACE_PERIOD token-gc-grace-period 1h; 0 collects a token as soon as it expires
  • Both take whole seconds or larger units (30s, 1h, 1d).
  • The interval is capped at the maximum safe timer duration (about 24.8 days).
  • Both flags are also accepted by swamp serve daemon enable.

Behaviour to describe

  • The first sweep runs just after boot, then one runs every interval.
  • A sweep deletes revoked tokens at once, and expired tokens once the grace period has passed since their expiry.
  • A collected token is removed entirely (secret, OAuth access token, definition and data), so it disappears from swamp access token list.
  • The token state table (around line 437, the expired row) currently reads as if expired and revoked tokens stay listed. It should say they are deleted by the token GC.
  • Each serve replica sweeps on its own, and deletions are pushed to a remote datastore.
02Bog Flow
✓OPEN○TRIAGED○IN PROGRESS◉CLOSED

Closed

9/28/2026, 11:32:39 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

stack72 commented 9/28/2026, 11:32:38 PM

Documented in https://github.com/swamp-club/swamp-club/pull/1259. reference/swamp-serve/serve-flags.md now lists --token-gc-interval and --token-gc-grace-period in the flag, config key and env var tables, and has a new 'Token garbage collection' section. The expired and revoked rows in the token failure table now say that token GC deletes these tokens.

Sign in to post a ripple.