Imagine a shared workbench with a document lookup and a draft-writing tool. A reviewer may read a document while an editor may also create a draft in a designated workspace. Hiding the writing tool from the reviewer's menu is useful for navigation. The service that performs the write still needs enough information to make its own authorization decision.
Build a permission matrix
Start with synthetic documents and a fake write service. Give each test identity a role, a tenant and explicit access to a workspace. In the real integration, authenticate the caller, validate that its credential is intended for the service, and apply the deployment's policy to the tool, resource and requested action. The MCP HTTP authorization specification defines a transport-level authorization flow. It does not supply this application's role matrix. A local stdio integration has a different credential model.
| Fixture | Expected observable outcome |
|---|---|
| Reviewer reads an authorized document | Receives the synthetic document. |
| Reviewer requests a draft | Receives a denial and the fake draft store stays empty. |
| Editor creates a draft in the assigned workspace | Receives its receipt and one draft appears in that workspace. |
| Editor requests the same action in another tenant | Receives a denial and neither tenant gains a draft. |
| Grant revoked before a new call | New call follows the documented revocation policy, including any bounded credential or policy-cache lifetime. |
Exercise both the workbench interface and the service's supported request path using the same fixture identity. Log a request identifier, policy decision and outcome under restricted access. Keep credentials and raw document text out of that record. An “allow” decision alone is insufficient to claim a draft was written; use the stored fixture and its receipt. A denied operation that modifies any fixture fails the test.
This article was created with AI assistance.
Top comments (0)