Repository navigation
refactor(plugin-auth): derive the SCIM connection-id cap from SCIM_SERVICE_PRINCIPAL_PREFIX - #31150
Conversation
…RVICE_PRINCIPAL_PREFIX MAX_SCIM_CONNECTION_ID spelled the svc:scim: prefix a second time; it now reads SCIM_SERVICE_PRINCIPAL_PREFIX.length, so the cap moves with the audit actor label it protects. The cap stays 246. The pending SCIM credential-door changeset gains an Exported line for the two public AuthManager methods behind the routes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2bjuYso9Pes3WcUTEb
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 22 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 76eac9b0be9c7207165c4a6fc9acb92e91b6e282 && git checkout 76eac9b0be9c7207165c4a6fc9acb92e91b6e282
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9f61e06e6fe4d28c0fcc6ef66b3fcfef6067e51b 56589092ed20f16c294e2a839b3f88d372232540 && git checkout -B drift-repro 9f61e06e6fe4d28c0fcc6ef66b3fcfef6067e51b && git merge --no-ff 56589092ed20f16c294e2a839b3f88d372232540
node scripts/docs-audit/affected-docs.mjs --json 9f61e06e6fe4d28c0fcc6ef66b3fcfef6067e51b |
…'s own changeset The pending SCIM credential-door changeset is restored byte-identical to main; the Exported paragraph naming isScimWired() and mintScimConnectionCredential() rides in this change's own patch note. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2bjuYso9Pes3WcUTEb
|
domain:server#3 · marchtian · session_017ihL2dFb2QdZEHEJ83cR2B 维护者速读
席位核对ACCEPT · Head-sha:
|
Requested by 田騏 · project thread
Fixes #31033
Clause-②: no
Metadata-protocol: none
维护者速读
connectionId的长度上限(246)原来把svc:scim:前缀再手写了一遍来计算,现在改为读取已导出的常量SCIM_SERVICE_PRINCIPAL_PREFIX的长度;本卡 changeset 另补一段 Exported,说明随 SCIM 凭证接口新增的两个公开AuthManager方法。packages/plugins/plugin-auth/src/scim-connection-admin.ts的MAX_SCIM_CONNECTION_ID;.changeset/31033-scim-connection-id-cap-from-prefix.md。pnpm --filter @objectstack/plugin-auth exec vitest run src/scim-connection-admin.test.ts,预期 10 个用例全绿(含 246 可签发、247 被拒)。What changes
packages/plugins/plugin-auth/src/scim-connection-admin.ts:MAX_SCIM_CONNECTION_IDis nowMAX_TEXT - SCIM_SERVICE_PRINCIPAL_PREFIX.lengthinstead ofMAX_TEXT - 'svc:scim:'.length, importing the constant fromscim-connection-service.ts(already imported from there). The doc comment says why. Value unchanged: 246..changeset/31033-scim-connection-id-cap-from-prefix.md:patchon@objectstack/plugin-auth. It also carries the card's optional item: an Exported paragraph naming the two publicAuthManagermethods behind the SCIM credential routes (isScimWired(),mintScimConnectionCredential(engine, input)), which the pending plugin-auth: no door mints a SCIM connection bearer (mintScimConnectionCredentialhas no caller and the object refuses create), so no IdP can connect #30958 release note does not name. That note itself is untouched (byte-identical tomain).Tests
scim-connection-admin.test.ts(246 accepted, 247 refused,9 + 246 === 255) holds unchanged.SCIM_SERVICE_PRINCIPAL_PREFIXmutated to a 10-charactersvc:scimx:viascripts/ablation-replace.mjs, the pin turns red: the 246-character mint answers400with "at most 245 characters". Restored; blob hash equals HEAD (9557afe1),git statusclean, file rerun 10/10 green.Acceptance notes
Verification
Local readings
56589092:pnpm --filter @objectstack/plugin-auth test234/234 files, 4168 passed / 10 skipped, lock VERDICT command-exit 0;pnpm --filter @objectstack/plugin-auth typecheckVERDICT command-exit 0.eslint --no-inline-configon the touched source file: exit 0 (plugin-auth has no own lint script; repo-widepnpm lintis CI's).dispatch-gates --commands: 55 families derived (same list at1f6f18d2,cb24c94fand56589092). All 55 run at1f6f18d2(2 first exited 3 for prerequisites and were rerun after the fixture fetch and a full packages build, both exit 0);--ranreconciliation: 55 run, 0 NOT-MEASURED. After56589092(changeset-only commit) the changeset and text families were rerun:check-empty-changeset,check-changeset-no-major,check-adr-0087-registration(all--base origin/main),check:issue-citations,check:doc-authoring,check:nul-bytes, each exit 0.🤖 Generated with Claude Code