Repository navigation
feat(supervisor): let operators require specific middleware bindings - #4678
freeqaz-openai wants to merge 3 commits into
Conversation
Let operators require and limit the operation and phase pairs that an external middleware may expose. Validate the same binding policy at gateway startup and when a supervisor discovers the service, and keep only authorized bindings in the registry used for dispatch. Preserve dynamic discovery and the existing wire configuration when no binding policy is set. Document that older supervisors must be upgraded before relying on binding restrictions. Signed-off-by: Free Wortley <freeqaz@openai.com>
|
Thank you for your interest in contributing to OpenShell, @freeqaz-openai. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
|
/ok to test c94bc45 |
|
Label |
|
The approach makes sense: require the inspection hook at registration, and recheck it against the supervisor’s own Describe response. Please also update skills/generate-sandbox-policy/SKILL.md and skills/debug-openshell-cluster/references/supervisor-middleware.md. They currently tell agents to check whether the service advertises the desired hook. With this change, they also need to check whether the operator’s binding policy authorizes it. For example, a service could advertise both request and response hooks while its allowlist enables only the response hook. Following the existing guidance could lead an agent to configure a policy expecting request inspection, but requests would skip that middleware even with |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance found
Review details
Advisory review; publication gates are unchanged. |
…thorizes Signed-off-by: Free Wortley <freeqaz@openai.com>
|
/ok to test 0411584 |
Restore the comment separator emitted by the pinned generator. This keeps the checked-in binding byte-for-byte reproducible without changing the protobuf schema or Go behavior. Signed-off-by: Free Wortley <freeqaz@openai.com>
Summary
Let an operator require a specific supervisor middleware binding, such as HTTP request inspection before credentials are attached. Today a service can advertise only a response hook, and OpenShell will correctly skip it on requests. That behavior is useful for response middleware, but it cannot express “this service must participate in request inspection.”
This is an opt-in registration contract. The sandbox policy must still attach the middleware and use
on_error: fail_closedwhere a failed call should deny a request. Upgrade supervisors before requiring the policy; older supervisors do not enforce it, and an unsuccessful configuration update does not retroactively replace the last working configuration.Related issue
Closes #2282. Draft for design review; the issue does not currently have
state:accepted. Please leave the normal issue-acceptance and review checks in place.Changes
dynamic(default): preserve existing manifest-driven behavior, including response-only services.allowlist: every configured binding must be advertised; ignore other advertised bindings.exact: the configured and advertised binding sets must match.The gateway checks the manifest, carries the operator's policy in sandbox configuration, and the supervisor checks its own
Describeresponse before installing the registry. No credential, sender, transport, or per-request wire protocol changes.Testing