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

Relationships

#2440 serve: validate auth access lists without restarting (serve config check)

Opened by stack72 · 9/23/2026

Follow-up from swamp-club#2438. Operators only discover an unknown username in auth.admins or auth.allowed-users when swamp serve starts. Add a way to check a serve.yaml against the OAuth provider before applying it, for example a swamp serve check-config subcommand. It would resolve each admin and allowed-user name and report which ones the provider does not know, without starting the server or touching the resolved-admins cache. After #2438, serve skips unknown names at startup with an ERROR log, so this is about catching typos before deployment rather than preventing a crash.

02Bog Flow
✓OPEN○TRIAGED○IN PROGRESS◉CLOSEDTRIAGE

Closed

9/24/2026, 8:13:57 AM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack729/23/2026, 11:08:57 PM
Editable. Press Enter to edit.

stack72 commented 9/24/2026, 8:13:56 AM

Shipped alongside swamp-club#2438 in https://github.com/swamp-club/swamp/pull/2587 (commit 00469925, first release v20260923.211049.0).

What changed:

  • New swamp serve check-config subcommand. It loads auth settings the same way swamp serve does (flags, env vars, then the config file), validates them, and in oauth mode looks up every admin and allowed-user name on the OAuth provider.
  • Exits non-zero if any name is unknown to the provider, or if serve would refuse to start (no admin resolves, or every allowed-user is skipped with no collectives set). Supports log and JSON output.
  • Read-only: it calls the username lookup directly and never touches the resolved-admins cache or the vault.
  • Credential safety: uses the SWAMP_API_KEY environment variable or the swamp auth login credential, and only sends it to the provider origin that issued it (set SWAMP_CLUB_URL for a custom provider), so a crafted oauth-provider in an undeployed config cannot receive the token.
  • The startup ERROR log for a skipped name now points operators at swamp serve check-config.

Tests: src/cli/serve_check_config_token_test.ts plus the unit and property tests for the extracted resolution logic in src/serve/oauth_access_list_resolution_test.ts and oauth_access_list_resolution_property_test.ts.

Docs: design/enablers/remote-execution.md (Username resolution), design/primitives/serve.md, and the bundled skill's serve guide.

Sign in to post a ripple.