Skip to content

feat(policy): isolate overlapping credential-bound accounts - #3

Draft
stevenlee-oai wants to merge 6 commits into
chore/5988-reference-base/stevenlee-oaifrom
feat/5988-credential-account-policy/stevenlee-oai
Draft

stevenlee-oai wants to merge 6 commits into
chore/5988-reference-base/stevenlee-oaifrom
feat/5988-credential-account-policy/stevenlee-oai

Conversation

@stevenlee-oai

@stevenlee-oai stevenlee-oai commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Allow independently managed accounts to share one inspected MCP or REST endpoint while retaining different request policies. A caller selects an account through its issued placeholder; the supervisor resolves that credential only when the account's own endpoint rule admitted the request. This is a reference PR in the personal fork; upstream review is tracked by the issue below.

Related Issue

Closes ai-openshell#5988

Changes

  • Add the opt-in YAML policy mode enforce-credential-bound. It preserves ordinary enforce behavior and makes older policy validators reject unsupported account-bound policies.
  • Allow compatible, exact overlapping endpoint selectors with separate credential Providers and tool rules. Gateway supplies the Provider and admitted-policy-owner association; the supervisor checks it before substituting a credential. One account's allow cannot grant another account's credential authority.
  • Preserve account isolation through startup polling, pushed configuration, policy updates, and account withdrawal. No external request-time relay is required.
  • Add focused validation/sender tests, a real Gateway/Sandbox conformance case, and a two-account policy example.

Testing

The earlier v0.1.9 prototype passed the real Gateway policy-handler test and the inspected MCP sender test using that Gateway's serialized snapshots. The controlled recipient saw:

Placeholder Tool Result
Account A search Allowed, bearer A
Account B search Allowed, bearer B
Account B send Allowed, bearer B
Account A send Denied, zero upstream bytes

The current-main code is a revised implementation. Its exact-head runtime proof is pending: the configured package registry withholds the existing locked serde_with 3.25.0 dependency required by the Cedar workspace. The conformance case credential_gating::account_bound_mcp_tool_policies_are_isolated exercises real Provider installation, Sandbox creation, distinct tool policies and withdrawal; it has not yet run on this branch. Protobuf descriptor generation and source formatting checks pass.

Fork CI remains pending. Its upstream reviewer-roster check and pinned CI-container jobs fail in the personal fork, and macOS jobs were refused by the account billing limit. The conformance E2E lane was skipped; no exact-head runtime pass is claimed.

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated
  • E2E tests added/updated

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • User-facing policy and Provider documentation updated

Signed-off-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com>
Signed-off-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com>
Signed-off-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com>
Signed-off-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com>
Signed-off-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com>
Signed-off-by: stevenlee-oai <213687449+stevenlee-oai@users.noreply.github.com>
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