SearchConnector Tool Gateway:检索工具网关接入验收¶
数据分类:synthetic_internal_demo。样例为合成文档、合成用户、合成组织 scope 和合成 adapter 状态,用于验证 SearchConnector 进入 Tool Gateway 调用路径后的安全 contract。
实验定位¶
这个验收集验证 SearchConnector 不再只是一个可直接调用的本地检索对象,而是 Runtime Projection 中的 context.search、context.get_document、context.report_gap 三个工具;它们必须先经过 Tool Gateway,再执行实际检索或缺口记录。
当前已接入的工具策略:
| 工具 | 动作 | 风险 | 要求 |
|---|---|---|---|
context.search |
search |
R0 | schema hash、user scope、requested allowed_scopes 子集检查、namespaced scopes |
context.get_document |
get_document |
R1 | schema hash、user scope、requested allowed_scopes 子集检查、namespaced scopes |
context.report_gap |
report_gap |
R1 | schema hash、user scope、审计记录 |
汇总结果¶
- Case 数:7
- 通过数:7
- 失败数:0
- 通过率:100%
| Case | 要求 | 结果 |
|---|---|---|
allows_team_search |
context.search 通过 Tool Gateway 后返回 scoped hits |
pass |
denies_scope_escalation |
请求中的 allowed_scopes 不能超过用户 scope |
pass |
filters_unsafe_search_output |
不安全 connector 返回 restricted hit 时,gateway 后置过滤 | pass |
filters_unsafe_get_document_output |
不安全 get_document 返回 restricted document 时,gateway 抑制输出 |
pass |
reports_gap_through_gateway |
report_gap 通过 Tool Gateway 审计并记录缺口 |
pass |
accepts_namespaced_scope |
已认证 person:* / dept:* / project:* 这类组织私域 scope 可用于检索 |
pass |
blocks_stale_index_output |
adapter 标记 stale_index=true 时,gateway 阻断 hits 并记录带 remediation item id 的 reindex/gap receipt |
pass |
当前结论¶
- SearchConnector 可以作为 Tool Gateway 后面的工具能力,而不是让 Agent 直接自由访问检索对象。
allowed_scopes不能由 Agent 自己扩大;请求中的 scope 必须是用户 scope 的子集。- SearchConnector 自身仍然要做权限和 lifecycle 过滤;Tool Gateway adapter 再做一次输出后置过滤,防止不安全 adapter 返回 restricted 或 deleted evidence。
- 对外给模型或审计看的 safe output 不包含
source_uri,避免无权限用户看到敏感路径或对象存在性。 - SearchConnector Tool Gateway 现在支持已认证用户携带的 namespaced scopes,例如
person:employee-demo、dept:finance、project:orgreorg-framework-mvp。 rank_log只保留安全字段;候选对象 ID、source URI、owner、debug note 不应进入 safe output。stale_index=true已从状态传播 benchmark 进入 runtime 策略:默认阻断本次检索 hits,保留 adapter/generation/latency/cost/context library 等安全状态字段,并通过context.report_gap记录带 Projection Remediation item id 的 high severity 缺口。
当前没证明什么¶
- 这还没有接真实 Postgres/OpenSearch adapter。
- 这还没有接入真实组织 IAM 或源系统权限,只验证了 Framework adapter 的 scope 子集语义。
- Tool Gateway 层仍是保守阻断;按任务风险分级的 stale-index 策略已经上移到 Context Router Stale Policy Eval,关键风险补证路径已经由 Projection Remediation Eval 固化为本地 contract。
已完成的后续接入¶
orgreorg_demo --search-card-index和--reindex-cards已切到 Knowledge Card Tool Gateway。knowledge_card.search会先过 Tool Gateway,再内部调用context.search,继续复用 SearchConnector Tool Gateway。
下一步¶
- 把真实 Postgres/OpenSearch adapter 接到同一 gateway conformance。
- 把真实组织 IAM / 企业微信通讯录权限映射成
person:*、dept:*、project:*permission view。 - 将 SearchConnector high severity gap receipt 接入真实 Projection Remediation worker / review adapter。