Documentation
¶
Overview ¶
Package callctxwrite 禁止在 HTTP transport 层(internal/http)直接调用 callctx.With 覆写请求上下文中的身份元数据(TenantID / Partition / Caller)。
认证请求的身份元数据只能由组合根挂接的 authn 中间件从已验签令牌重建; 若管理面用例确需代目标租户执行操作,应在完成权限码校验后的业务层中显式处理。
默认仅对路径匹配 `/internal/http($|/)` 的包生效(可通过 `-callctxwrite.scope` 覆盖), 且默认只查非生成生产代码(_test.go 与生成文件不查)。
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Analyzer = &analysis.Analyzer{
Name: "callctxwrite",
Doc: "禁止在 HTTP 层(internal/http)直接调用 callctx.With 覆写身份元数据;身份只能由 authn 中间件从已验证凭证重建",
Run: run,
}
Analyzer 是 callctxwrite 检查器。
Functions ¶
This section is empty.
Types ¶
This section is empty.