Relationships
#4459 Slackwater: let customers build integrations that drive workflows securely and auditably
Opened by skunk-ape · 11/5/2026
Goal
Customers can build integrations that drive swamp workflows securely and auditably. Slack is the proving case, through a reference app code-named Slackwater, but it isn't the end goal: the same surface should serve any integration.
A Slack button that runs or approves something must be at least as safe as the CLI path it replaces.
This is the umbrella issue. Work items are filed one at a time, when we're ready to start each one.
Why this looks achievable
A test Slack app against a local serve started a run, refused a person without the right grant, approved as the linked person, and recorded both identities correctly. It used serve's existing handlers. Sign-in was a stand-in, so real consent and delegated tokens are unproven, as are the HTTP action route, oauth mode, and TLS or a proxy.
Design
A client acts for a person, within a ceiling. Effective rights are the person's grants intersected with the client's ceiling, checked by serve on every request.
- Client: registered by an operator, with a credential and a ceiling. A ceiling can narrow rights but never add them, and can't include
admin. - Delegation: a person's consent for a client to act for them, tied to their external identity (for Slack,
team_idanduser_id). Only that person can create one. - Tokens: a short-lived access token per person, with a rotating refresh token that needs the client's credential. Ending a delegation or client ends its tokens.
- Client identity:
client:<id>can read events within its grants and ceiling, but can't run or approve. - Transport: bearer-only HTTP for actions, and one event stream per client. Polling is acceptable for a pilot.
- Separation of duties: self-approval and refusing a client are grant conditions the operator writes, not gate settings.
swamp-club proves who the person is, and serve decides what they may do. swamp-club hosts sign-in, SSO, the consent page and the link email, on the same landing pages sign-in uses today. Serve keeps the client, ceiling, delegation and every allow or deny decision.
The app only ever calls serve, and serve only makes outbound calls to swamp-club, so this suits a serve with no public address. After linking, actions don't call swamp-club.
Linking a person:
- The person runs
/swamp linkin Slack, and the app asks serve to start a link. - Serve sends swamp-club the client, ceiling and Slack identity, and gets a one-time URL. The app shows it only to that person.
- Serve polls swamp-club while the person signs in and reads a consent page naming the serve, client, ceiling, Slack user and workspace.
- Once the person approves, serve receives their identity, checks admission and records the delegation.
- Serve reports the link to swamp-club, which emails the person. No tokens are issued until swamp-club acknowledges that report, so a link can't become active without its email being sent.
- The app receives the tokens and confirms in Slack.
Known limits
- A compromised app can act for the people linked to it, within its ceiling, until it's revoked. Any integration outside serve has this limit.
- A forwarded one-time URL could link the sender's Slack account to the person who approves it. The consent page and email are the main defences, and this is the main item for the security review.
- A ceiling can't reach inside a workflow: once a run starts, its steps have no further grant checks. A ceiling allowing
runshould name specific workflows. token-mode serves have no swamp-club sign-in, so they refuse link requests for now.
Planned work
Issues are listed in dependency order and are filed only when work on them is ready to start, so this list may change.
Needed for a pilot:
- Record the client on requests, audit events and run decisions (swamp)
- Grant conditions can read the client and the run's initiator (swamp)
- Bearer-only HTTP route for workflow actions (swamp)
- Spike: delegated credentials through serve (swamp)
- Client registration and ceiling (swamp)
- Link page: consent and the link email (swamp-club)
- Delegation: link requests, tokens, refresh and revocation (swamp)
- swamp-lib: typed workflow helpers and token refresh (swamp, also needs #4438 and #4445)
- Slackwater: the reference Slack app (new repo)
- UAT journeys for clients, delegations and HTTP actions (swamp-uat)
A security review of the consent flow and tokens comes before any pilot.
Needed for general release:
- Run events: filtered stream and webhook delivery (swamp)
- Approver and verified email in run context (swamp)
- Versioned contract and conformance suite (swamp)
- Narrow membership and group lookup (swamp-club)
- Customer guide: build an integration (swamp-club)
- Client usage counts in telemetry (swamp)
Still open
- The name for the generic concept in code and on the CLI. "Client" is a working term here, and it already means other things in swamp.
- Who sets a ceiling and what it can include, how long a delegation lasts in
oauthmode, and whether one link can carry across several serves.
Open
No activity in this phase yet.
Sign in to post a ripple.