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

Relationships

#662 Design: serve authentication & authorization (TLS, OAuth, access control)

Opened by adam · 6/16/2026

Design proposal (no implementation yet) for extending swamp serve beyond its single-host trust model into a network-exposable server with a coherent authentication and authorization posture. Written up as design/serve-auth.md, building on the existing orchestrator/worker remote-execution machinery.

Branch / PR

What it proposes

  • TLS — static certs and Let's Encrypt ACME (HTTP-01). Binding off-loopback without TLS is a hard startup refusal.
  • Authentication — swamp serve as a generic OAuth 2.0 client; swamp-club.com as the default provider (better-auth's OAuth module + device authorization grant). Identity is established via a userinfo exchange rather than offline ID-token validation, sidestepping the JWT-validation footgun class; the one correctness item is verifying the token was issued for swamp's own client. SAML is brokered, never in-codebase. The server mints its own revocable tokens; the provider is consulted only at login.
  • Admission policy — restrict login to particular collectives and/or whitelisted users (matched on stable subject).
  • Mandatory configured admin — any enforcing mode requires at least one configured admin principal (granted admin on access:*), materialized at boot from config as the fail-safe root of who may change the rules. Off-loopback with auth disabled is also a hard refusal.
  • Authorization — a new domain/access/ bounded context: grants and groups persisted as built-in models, deny-by-default with deny-wins precedence, IdP-asserted groups as first-class grant subjects.
  • CEL grant conditions — uniform with swamp's existing CEL surfaces, evaluated in a permanently sealed, deterministically cost-bounded environment.
  • Rule packs — a tier-1 policy extension point shipping grants-as-data; context enrichers and external deciders scoped as later/non-goals.

Open questions

  • Whether swamp-club will expose a public OAuth 2.0 authorization server with the device grant + collectives on userinfo (lynchpin; lives in the swamp-club repo).
  • Default server-token lifetime vs. revocation latency for IdP-group membership.
  • Break-glass locally-minted tokens under OAuth mode.
  • Which deterministic predicate libraries the sealed CEL baseline launches with.

Feedback on the design doc is welcome on the PR.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

6/16/2026, 6:46:41 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.