Relationships
#5099 Let local-only commands run without the operator's credential
Opened by jeremy_schulman · 11/25/2026
Background
swamp's auth gate already works without a network: with a valid signed proof on disk (cached from sign-in, or supplied as a file), it passes offline against the public key built into the binary. That covers air-gapped use well.
It still needs a credential to be present. With no credential, the gate blocks (no_credential), even for commands that never talk to swamp-club. The only credential-free path is a nested run under a live swamp ancestor, which doesn't help when swamp is started by something else, such as a test runner.
Problem
Isolated, throwaway runs of local work have to carry a real person's credential.
Our case: an end-to-end test creates a temporary repo with a built-in (local) tracker and a few tickets, runs a workflow against them, checks the result and deletes everything. To keep it away from the operator's real environment, it points HOME, SWAMP_HOME and the repo at temporary directories and turns off telemetry and the inbox poll. Nothing it does needs swamp-club.
It still can't run in an empty config directory: every command, including swamp repo init, stops at auth_gate_blocked. So the test passes SWAMP_CONFIG_DIR through and reads the operator's stored credential and proof. The credential is never used for the work, but it is within reach of the test's code for the whole run. The other choices are worse: copying the credential into the temp directory, or installing a person's credential on a shared CI machine.
Request
Either of these would solve it.
- Credential-free local commands. Commands and behaviors that need no swamp-club service run with no credential: repo init, data queries, workflow and definition validation, workflows and behaviors on local trackers and datastores. Anything that does call swamp-club (sign-in, publishing, issues, inbox, remote trackers, extension pull) still requires the credential and fails with a clear error without it. An explicit switch would be fine (for example
SWAMP_LOCAL_ONLY=1, alongside the existingSWAMP_NO_TELEMETRYandSWAMP_NO_INBOX_NOTICE). - A scoped test credential or proof. A credential (or proof file) a person can mint for tests and CI that passes the gate but cannot act as the account: no sign-in, publishing, issue or inbox access. It could be short-lived. This keeps the gate on every command, if that's intended, while letting test runs avoid a person's real credential.
Why it helps
- Test and CI runs of local workflows can be fully isolated from a person's credentials.
- Disposable repos (fixtures, scratch validations, sealed checks) work in an empty home and config directory.
- It completes the existing set of switches for outbound behaviour.
Today's workaround
Pass SWAMP_CONFIG_DIR through to the isolated run, so swamp reads the operator's credential and proof where they already live, and keep everything else temporary.
Open
No activity in this phase yet.
system commented 11/25/2026, 4:57:36 PM
Classified automatically when this issue was filed.
- Source: Swamp CLI
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.