Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneesskunk-ape

Relationships

#4473 Slackwater: grant conditions can read the client and the run's initiator

Opened by skunk-ape · 11/6/2026· Shipped 11/6/2026

Part of #4459. Needs #4460, which has shipped.

Problem

An operator can't say "nobody approves their own run" or "this integration may not do that". Grant conditions see only the principal and the resource, so they can't read the run's initiator or the client that #4460 now records. Both rules belong in grants the operator writes, not in gate settings.

- subject: "idp-group:approvers"
  effect: allow
  actions: [approve]
  resource: "workflow:@acme/*"
  condition: 'principal.sub != run.initiator.sub && client != "integration:slack"'

This is a sketch, and the field names can change.

Scope

  • The client in conditions: available on every resource kind an integration can reach, not just workflows. Refusing an integration only on workflows would leave its data and vault access open.
  • The run's initiator in conditions: available when deciding approve and reject. These handlers authorize before they load the run today, so the decision has to see the run they will act on.
  • Signals: decide whether workflow.signal takes the same fields, and say why either way.
  • Grant validation: a condition that names a field an action can't supply is refused when the grant is written, where that can be known.
  • Docs: design/enablers/access-control.md says no access decision reads the client. This issue deliberately changes that, so update it and explain the new rule in the serve guide.

Rules

  • Compare like with like. run.initiatedBy is stored as user:alice, while principal.sub is alice. A direct comparison never matches, so a self-approval rule would never refuse anyone. The field needs a form that makes the obvious condition correct. Add a test that a person is refused on their own run.
  • A missing initiator fails closed. A request field reads as empty when absent, so principal.sub != run.initiator.sub would pass on a run with no initiator. It must be a resource field, so that neither an allow nor a deny that needs it succeeds without it. Cover this with allow and deny tests, including older runs and service: runs.
  • Absent client reads as direct. A token with no client is direct with no ID, as #4460 defines it. Refusing an integration must not refuse those tokens.
  • Existing grants don't change. A grant whose condition doesn't name the new fields decides exactly as before. Add a property test.

Decide before merging

  • Child runs: per the run-record threat model, any caller with run on an active parent's workflow can create a child record attributed to the parent's initiator. That caller could then approve the child as if someone else had started it. Either the rule must close this, or the docs must state the limit plainly.
  • Other weak initiators: auth mode none doesn't check the initiator, and the older-CLI upgrade windows in that threat model still apply. State what self-approval guarantees in each case.
  • Naming a specific integration: #4460 says behaviour never branches on a client's ID, but refusing one integration has to read it. The recommendation is to allow operator-written conditions on integration:<id>, since an admin registers those, and to warn against direct: IDs, since a copied CLI token still reads direct:cli. This needs Seth's confirmation.

Out of scope

Ceilings and registering integrations, the HTTP route, and audit filters by client. Those are separate items under #4459.

Done when

  • An operator can forbid self-approval with a grant condition, and a person is refused on their own run while someone else is allowed.
  • An operator can refuse an integration, across every resource kind it can reach.
  • A missing initiator fails closed, for allow and deny.
  • Grants that don't use the new fields decide as before.
  • The refusal is audited with the principal and client, and names the grant as other refusals do.
  • The child-run and weak-initiator cases are closed or documented.
  • swamp-uat's strict JSON schemas are updated with this change wherever output changes.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 8 MOREREVIEW+ 18 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/6/2026, 5:56:06 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape11/6/2026, 2:12:02 PM

Sign in to post a ripple.