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

Relationships

#1886 feat(ui/tokens): metadata field or tags for collective API tokens

Opened by stack72 · 8/28/2026

Ask

Add an operator-editable metadata field (or a tags array) to collective API tokens in the swamp-club UI. Two things I want to encode there:

  1. Consumer origin — which repository actually mints, stores, and consumes the token. Today the token `name` is the only free-text handle, and it doubles as the audit label. Under the naming convention I use (`/ `, e.g. `hivemq/asdlc swamp-club-api-key`), the origin lives inside the name, which mixes two concerns and forces awkward slug-in-name choices. A separate metadata field would let `name` stay a short purpose label and `origin` (or a `repo` tag) carry the routing information.

  2. Where the plaintext lives — the secret store the token was piped into (`op:////`, `kubectl secret /#`, `gh secret list --repo `). A leaked token today has no traceable path back to the store that should be rotated, and no way to find every consumer of a token I want to retire.

Shape

A single JSON-encoded `metadata` blob would be simplest — schema-less, indexable in the UI, and forward-compatible with tags/labels if you formalize them later:

  • `swamp auth token create ... --metadata '{"repo": "hivemq/asdlc", "vault": "platform-k3s-dev", "item": "swamp-club-api-key"}'`
  • UI shows those keys/values in the token row (or on hover).
  • `swamp auth token list --json` returns them so an audit script can join tokens ↔ stores ↔ repos.

If you want structure, a small set of well-known tags is enough for the audit story: `repo`, `vault`, `env`, `purpose`.

Why now

We just rotated a swamp-club UI token whose name gave no indication which repository consumed it (was named `swamp-api-datastore-token` — misleadingly narrow, no repo hint). Auditing which cluster/repo/environment holds the plaintext of a given token has no answer today except social knowledge and grep. Metadata on the token would make that a query.

Related: swamp-club/swamp#2286 (`--token-file` / `--server-token-file`), #2287 (skill doc gap on token families).


Automoved by swampadmin from https://github.com/swamp-club/swamp/issues/2311

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

8/28/2026, 8:29:56 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.