Relationships
#5084 Document SWAMP_CLUB_URL for credential-injecting proxies; let the auth gate pass without a local key
Opened by brucejo75 · 11/25/2026
Use case: AI agents run swamp inside sandboxed VMs. We don't want the swamp-club API key on those machines, where anything running as the same user can read ~/.config/swamp/auth.json.
What works today (tested with swamp 20261118): point SWAMP_CLUB_URL at a reverse proxy that holds the real key, and set a placeholder SWAMP_API_KEY locally. swamp sends the placeholder as both "Authorization: Bearer " and "x-api-key: "; the proxy replaces both headers with the real key and forwards to swamp-club.com. A base URL with a path (https://proxy.example/swamp-club) also works. Through that, auth whoami, repo init, extension search, extension pull (including the redirect to the download host), model search and workflow runs worked with no auth.json present. A placeholder sent straight to swamp-club.com is refused as expected. With a private CA, swamp needs DENO_CERT (NODE_EXTRA_CA_CERTS is not read), and without it the failure is only "fetch failed".
Requests:
- Document SWAMP_CLUB_URL (and the two headers swamp sends, plus DENO_CERT for a private CA) as the supported way to put a credential-injecting proxy in front of swamp-club, so it doesn't break silently in a later release.
- Let the startup auth gate pass without a local credential when SWAMP_CLUB_URL is set, so no placeholder is needed. Today a dummy key is required just to get past "swamp requires a swamp-club.com account to run".
- Minor: auth whoami through such a proxy reports the placeholder's fingerprint, not the real key's. A note in the docs would do.
Existing features I checked, which solve different problems: scoped, expiring tokens (swamp auth token create --scopes --ttl) still leave a usable credential on the machine, and on-behalf-of tokens for serve methods (#4692) address a different case. We haven't tried extension push or swamp serve through the proxy.
Closed
No activity in this phase yet.
stack72 commented 11/25/2026, 2:39:50 AM
Hey @brucejo75
This is already documented - https://swamp-club.com/manual/how-to/authenticate-with-api-keys
Paul
brucejo75 commented 11/25/2026, 2:52:37 AM
Thanks Paul, and sorry, I should have checked the manual first. That page covers SWAMP_API_KEY / SWAMP_API_KEY_FILE, and the TLS page covers DENO_CERT, so please drop that part of my request.
What I couldn't find documented:
Using SWAMP_CLUB_URL to put a proxy that holds the real key in front of swamp-club.com. The manual mentions SWAMP_CLUB_URL only as a login server override, and the proxy section of the TLS page is about swamp serve. This works today (swamp sends the key as both Authorization: Bearer and x-api-key, and a proxy can replace both), but nothing says it is supported or that those headers are stable. The account requirement page says every command except a short list needs a local credential, so a machine that should not hold the key still needs a placeholder just to pass that check. I'd like to know whether a keyless path is wanted outside swamp worker connect, for example when SWAMP_CLUB_URL points at a gateway that adds the credential. Also, note: I said workflow runs worked through the proxy, but I only tested whoami, repo init, extension search, extension pull and model search.
If you'd rather not support this, that's fine; point 1 alone, as a short doc note, would help.
brucejo75 commented 11/25/2026, 2:53:51 AM
wanted to reopen so you would see this... THANKS!
stack72 commented 11/25/2026, 1:57:58 PM
@brucejo75 this isn't a supported path at this time and it's something we'd need to talk about and see what we would want to do there
Sign in to post a ripple.