Who Decides the Tenant? A Small Rust Guard for AI Tool Calls
说明与用途
简要说明 TenantInvariant Rust 库如何通过服务器端验证资源所有权来防止 AI 工具调用中的跨租户访问。
问题
AI agents can propose resource IDs that belong to another tenant, leading to cross‑tenant data access.
结果
TenantInvariant prevents cross‑tenant tool calls by validating ownership server‑side, reducing the risk of data leakage in AI‑enabled SaaS.
工作流
- 1. User prompts AI agent. 2. Model selects a tool and proposes a resource ID. 3. Server resolves the real owner of the proposed resource from a trusted source. 4. TenantInvariant compares the authenticated actor’s tenant with the resolved owner. 5. If they match, the tool call proceeds; otherwise it is denied and an error is logged.
- 6. Normal authorization and tenant‑scoped data operations continue for allowed calls.
证据
TenantInvariant compares actor and owner before executing the tool
The first tests were the obvious ones: a resource in the same tenant is allowed, a resource in another tenant is denied, and an unknown owner is denied.
- 记录日期: 2026-09-22T09:30:37.710Z