Skip to content

feat(sdk): add provider-neutral authorization seam - #1561

Closed
EnzoTironi wants to merge 2 commits into
UsefulSoftwareCo:mainfrom
EnzoTironi:validation/upstream-authorization-provider
Closed

feat(sdk): add provider-neutral authorization seam#1561
EnzoTironi wants to merge 2 commits into
UsefulSoftwareCo:mainfrom
EnzoTironi:validation/upstream-authorization-provider

Conversation

@EnzoTironi

Copy link
Copy Markdown

Summary

Adds an optional provider-neutral AuthorizationProvider seam to Executor tool execution so hosts can enforce a horizontal PDP without coupling Executor core to Cerbos, OPA, or another policy engine.

The provider receives Executor-bound tenant/subject identity plus resolved tool metadata and arguments. It is consulted after Executor's existing hard block checks and before credential resolution or plugin invocation.

Behavior:

  • no provider configured: existing behavior is preserved;
  • allow: execution continues normally;
  • deny: fails closed before credentials or plugin invocation;
  • provider failure: fails closed;
  • require_approval: reuses Executor's existing elicitation flow;
  • nested ctx.execute(...): re-enters the same authorization seam;
  • caller arguments cannot mint tenant/subject identity;
  • the real scoped host threads the optional provider through HostConfig to createExecutor.

No concrete PDP dependency is added. Product/host code owns the provider implementation.

Validation

Validated against current upstream main with the branch 0 commits behind before publication:

  • packages/core/sdk/src/authorization.test.ts: 10/10 passing
  • packages/core/api/src/server/scoped-executor.authorization.test.ts: 1/1 passing
  • @executor-js/sdk typecheck: passing
  • @executor-js/api typecheck: passing
  • repository bun run lint: 0 warnings, 0 errors
  • changeset included for the public release surface

The seam is also exercised by an external integration acceptance using a provider implementation outside Executor core, confirming the intended host-owned composition model.

Optional @executor-js/sdk AuthorizationProvider consulted after hard block
and before credential/plugin invoke. Absent provider preserves prior
behavior; deny/provider failure fail closed; require_approval reuses
elicitation; nested ctx.execute re-enters the same path.
@EnzoTironi

Copy link
Copy Markdown
Author

Closing this PR because this authorization seam is intended to live in our maintained fork rather than be proposed to upstream. The fork main is synced exactly to upstream main before applying the patch.

@EnzoTironi EnzoTironi closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant