Bouncer
Decides who may do what. A person has roles, a role holds privileges, and every route on the control plane asks for exactly one. The Bouncer also holds sensitive agent actions until a person approves them.
- Design rules
- A2, E4, E9, SK3, E12
- Contracts offered
- 3
- Key flows
- 3
On the job
- Answers authorize for every route
- Derives agent-owner, agent-member and requester from data, never from a credential
- Decides which outbound requests and tool calls are held
- Keeps the approval record and says who may decide it
Not my job
- Verify a credential. That is the Gatekeeper.
- Forward the held request. The egress does that after approval.
What Bouncer does, step by step
Authorize a request
A user maps to roles; a role maps to privileges; never a user to a privilege.
The Gatekeeper authenticates the caller and passes the principal.
The route names one privilege. authorize takes the principal, the privilege and an optional resource such as the agent.
Derived roles join the principal’s own: agent-owner if the person is on the agent’s configuration record; agent-member if they hold an agent role; requester if their message started the run.
Works with Registrar· contractVersionedConfigStore →Owners are stored on the configuration record (SK3).It returns allowed, or the missing privilege. A conformance test fails if a route is missing from the matrix.
Hold an action for approval
E9. The egress asks; the Bouncer decides; the egress enforces.
The Gatekeeper’s egress passes a request to checkHold with the agent’s hold rules.
If it is held, the Bouncer stores a reviewed copy, its hash and a size-limited body in an approval record.
The run is blocked and the requesting user is asked to decide.
Tool calls that need approval go through checkToolApproval before the Keymaster releases a credential.
Decide an approval
Who may say yes depends on who asked.
For an agent’s action the agent is the actor and the requesting user is the reviewer and approver.
If the run has no requesting user, an agent owner decides. A global admin or approver may decide any agent’s.
The control plane acts on the decision: blockRun to stop, deliverDecision to continue.
The decision, with who decided it, is ledgered.
Contracts Bouncer keeps 3 offered
- authorizeused by Gatekeeper, Keymaster, Landlord, Treasurer, Timekeeper, Registrar
- checkHoldused by Gatekeeper
- checkToolApprovalused by Keymaster