Repository navigation
docs(kernel): auth-service handleRequest names the whole surface, the mount-layer checks and the transport argument - #33461
Conversation
… mount-layer checks and the transport argument Claude-Session: https://claude.ai/code/session_016WV4d1NJYFGVi2FRztyBNo Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4d1NJYFGVi2FRztyBNo Co-authored-by: Claude <noreply@anthropic.com>
…ansport argument on AuthManager Claude-Session: https://claude.ai/code/session_016WV4d1NJYFGVi2FRztyBNo Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#5 · os-elon-musk · session_016WV4d1NJYFGVi2FRztyBNo ACCEPT · area A1 · Fixes #32725 · head 0d4ce51 · 2026-11-14T22:00Z
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43645884813 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Fixes #32725
维护者速读
content/docs/kernel/contracts/auth-service.mdx的handleRequest小节,补上三件事:转发宿主拿到插件的全部登录接口;IP 白名单等挂载层检查在这条路径上执行;可选的第二个参数{ remoteAddress }与代理后的server.trustProxy。示例改成两参数调用。handleRequest的宿主会开始执行挂载层检查,文档仍是旧的单参数写法,接入方照抄会漏传客户端地址,在设了allowed_ip_ranges的部署上被403 IP_NOT_ALLOWED拒绝。content/docs/kernel/contracts/auth-service.mdx的### handleRequest小节(新增的三条要点和示例)。handleRequest小节,预期看到三条要点与authService.handleRequest(request, { remoteAddress })。What changes
The
handleRequestsection of theIAuthServicecontract page now states, in the wording of the merged changesetauth-handlerequest-whole-surfaceand theIAuthService.handleRequestdocblock inpackages/spec/src/contracts/auth-service.ts:plugin-auth, a forwarding host gets every route the self-hosted mount serves under/api/v1/auth/*(the platform's own mounts and better-auth behind them), not better-auth alone.allowed_ip_ranges), the one-account-per-request rule, the organization IP list and the platform-admin wrappers.handleRequest(request, { remoteAddress }), orserver.trustProxybehind a proxy that setsX-Forwarded-For; with neither, a deployment that setsallowed_ip_rangesanswers403 IP_NOT_ALLOWED.The example now shows the two-argument call. One sentence notes that the second argument belongs to the plugin's
AuthManagerand that theIAuthServiceshape on the page is unchanged (the changeset's own last line), so a reader typed against the interface is not misled. The interface block above stays as the spec declares it.skills/**is untouched.Each claim was checked against main before writing it:
AuthManager.handleRequest(request, transport?: { remoteAddress?: string })answers through the bound route surface for any path underbasePath(packages/plugins/plugin-auth/src/auth-manager.ts);DEFAULT_AUTH_BASE_PATHis/api/v1/auth.AuthPlugin.bindAuthRouteSurfacerunsmountAuthRouteson the private table ininit(); that function registers the D5 allow-list middleware (answering403with codeIP_NOT_ALLOWED), the organization IP list middleware (runAtMountDoor), the one-account-per-request middleware and the/admin/*routes behindjudgePlatformAdmin(packages/plugins/plugin-auth/src/auth-plugin.ts).isClientIpAllowedrefuses an undetermined address while ranges are set, andresolveClientAddressreads forwarded headers only undertrustProxy.No changeset: the page ships in no package's
files[], so this PR carriesskip-changeset.Tests
Docs-only; no package test is owed. The derived gate families were run locally (see Verification).
Acceptance notes
None.
Verification
All 43 families from
node scripts/pm/dispatch-gates.mjs --commandsran on headdf9fea6f4d(after merging currentorigin/main), each exit 0; reconciliation:Run reconciliation — 43 derived, 43 run, 0 NOT-MEASURED, 0 UNRUNwith a derived zero (every line carried its exit code).Gate readings
pnpm check:doc-authoringexit 0,pnpm check:doc-anchorsexit 0,pnpm check:doc-frontmatterexit 0,pnpm check:docs-single-h1exit 0,pnpm check:nul-bytesexit 0,pnpm check:docs-transcript-driftexit 0,pnpm --filter @objectstack/spec run check:docsexit 0,pnpm --filter @objectstack/spec run check:skill-examplesexit 0 (344 prose examples type-check across 3 surfaces), the two@objectstack/lintdoc gates exit 0, and the remaining derived families exit 0.@objectstack/lintclosure (VERDICT command-exit 0) and the@objectstack/client/@objectstack/client-reactclosures (VERDICT command-exit 0); before those builds three families answered exit 3 (nothing measured) and were re-run green.Generated by Claude Code