Skip to content

Authorizing proxy for Files and Commands #2701

Description

@blkt

The provider implements both services: read the request's RequestContext, apply today's authorization (run claim, epoch, grant generation, security manifest, per-client limits), refuse services the session was not admitted for, and forward to the session's executor. Enforce the template's size limits on streamed output as it flows. Today's checks live in internal/adapter/executioncontroller/handler.go. See one interface, several implementations.

Acceptance criteria

  • Proxy over an Files gRPC server #2694 server passes fsconformance.
  • Tests: stale epoch, stale grant generation, lapsed claim, and non-admitted service are refused before forwarding.
  • A request with a missing or incomplete RequestContext is refused before forwarding, with a test.
  • Per-client limits also apply to the streaming RunCommand: the provider chains only a unary interceptor today (cmd/mecatl-execution-provider/main.go:104).
  • Output exceeding MaxCommandBytes is truncated/flagged mid-stream; test covers it.
  • The proxy may buffer to keep a unary response to mecak8s, per commands.
  • Executor addressing does not trust a bare Pod IP across Pod replacement (pinned to the environment's current Pod).
  • task lint && task test:race pass, and nothing under engine/ changes.
  • Markdown changes pass task docs; user documentation follows user-docs/AGENTS.md.
  • With the transport switch, the offline demo (go run ./cmd/mecademo) shows a tool call, a permission ask and approval, and the result.

Depends on

#2689, #2691.

Ships

As part of the transport switch (#2718).

Size

L. Re-hosts all per-operation authorization on a new transport.

Part of the Kubernetes execution design; see its work breakdown.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions