Skip to content

Setup (三员): the auditor's audit-log search box turns the list into 「无权访问」; the security admin's permission-set page offers 添加用户 / 移除 on sets outside their delegated scope #34700

Description

@os-bob

What (18.5.0, app project with the three-officer split: system admin, security admin, auditor)

  1. The auditor cannot search the audit log. The auditor opens 诊断 → 审计日志 and the list loads. Typing in the list's search box turns the whole list into 「无权访问」. Column filters still work, so the read grant is fine: the search path asks for something the auditor does not hold, probably a full-text search over fields or a related object.
  2. The security admin is shown controls they may not use. The security admin's permission-set page lists all 22 sets, including admin_full_access and the officer sets, and offers 添加用户 / 移除 on each. Adding a user to an officer set is correctly refused server-side, but with the English Outside your delegated scope… (see the companion i18n card). We did not measure whether 移除 on such a set is refused too. That needs checking: a security admin removing the system administrator's or the auditor's set would break the separation of duties.

Expected

  • The auditor's list search works within the auditor's grant, or the search box is hidden for them, rather than replacing the list with 「无权访问」.
  • Sets outside the security admin's delegated scope are hidden, or shown read-only without 添加用户 / 移除.
  • 移除 on an out-of-scope set is refused server-side, and a test pins it.

Activity

  1. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p1 · security · domain:server · pm:queue · 2026-11-17T07:45Z

    ⛔ Not a claim.

    • Themes: security (separation of duties) and zh-CN customers.
    • Named user effects:
      • the auditor cannot search the audit log, and the list turns into 「无权访问」;
      • the security admin is offered 添加用户 / 移除 on permission sets outside their delegated scope.
    • Labelled security. The card itself says it is unmeasured whether 移除 on an out-of-scope set is refused server-side. Measure that first.
      • If it is not refused, it is a separation-of-duties break. Take it to security#2 through the private channel. Write nothing more about the mechanism on this public card.
    • Domain: the server-side refusal and the search grant → domain:server. Hiding the controls is the ui/ half; declare it at claim time.
  2. added
    domain:server
    pm:queue
    priority:p1
    on Nov 17, 2026
  3. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    2026-11-17T09:20Z Premise corrected · split. Pre-code reading by area o2-I on origin/main a34eb071 (a real boot of the dogfood audit-log-audit-capability app: SQL driver, real SecurityPlugin / AuditPlugin / REST).

    Split. This card keeps the server half (① plus ②'s end-to-end pin), done by area o2-I. The ui half (③) moves to a new card.

  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRPxhTmqbUbMrqygh4

    Claim: PM loop · area o2-I (seat 1 legacy · server) · 2026-11-17T09:59Z · server half only
    Session: session_01ADHkmRPxhTmqbUbMrqygh4 (the o2-I area session; it builds this card itself)
    Account: os-steve
    Branch: claude/project-thread-qajjjq, restarted from origin/main once PR #34644 (this branch's current PR) lands; work is staged locally from origin/main f02f4f6 until then
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: the engine's search expansion (packages/objectql/src/search-filter.ts, engine-find.ts, a registration seam on ObjectQL that delegates to a facet), plugin-audit's parent-field query guard (packages/plugins/plugin-audit/src/parent-field-query-guard.ts) registering which value-bearing columns a reader's server-resolved search set must withhold, their tests, one end-to-end pin for a delegated admin removing a member of an out-of-scope set, and one root changeset. No packages/spec/src. Stop and ask on any other breach.
    Container & model: M, mode:thread, model: default tier, effort: high
    Clause-②: no. A search that answered 403 answers the rows matched on the columns this reader may query; a search naming old_value / new_value itself is still refused.
    Metadata-protocol: none
    Premise: corrected 6943935258 (① holds with its cause; ② is already refused server-side, the pin is owed; ③ split to #34741).
    Serial constraints: none with the seat's in-flight PRs (#34644, #34238, #34347 touch metadata-protocol only).
    Pre-claim deps: no Blocked-by:.
    Prior rulings read: the triage ruling on #21154 (option A: a reader withheld any parent field may not query a value-bearing column) and #25672 (a server-chosen search set withholds what the caller may not query; a named column is still refused). This card applies the second rule to the first rule's columns.
    Lease: lease:o2-I.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRPxhTmqbUbMrqygh4

    Hand-off · 2026-11-17T12:57Z · repo:objectstack#2 → repo:objectstack#3 (maintainer order 2026-11-17 12:33–12:34Z)

    • PR: fix(audit): a search the server widens never names a column the caller may not query #34817 (this card's server half, list search only), not a governed surface, Clause-②: no.
    • Current head: 12455d5accdff81d60481394b1ac51713b68c44f.
    • Reviews on record: L1-c2 ACCEPT 6947307277 at the earlier head 54107ea2ac; L2 judged not owed there. No review at the current head: reviews stopped by the maintainer order.
    • Open: the delta since 54107ea2ac is one test commit after the merge-queue ejection (anchor Queue-flake anchor: test/activity-text-predicate.dogfood.test.ts #34829): an existing dogfood pin now asserts this PR's rule instead of the refusal the rule removes. Full dogfood battery green at this head. The seat asked that os-zhuang confirm that pin change. The card's other items stay where the maintainer ruling 6946587690 put them.
    • Next: seat 3 decides on review of the delta and the confirmation, then re-queues; auto-merge is off. On merge: clear pm:dispatched and the assignee.
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    security#1 · os-lizheng · session_012MmDsQg43GaB78K8X6U1sL

    Item ② landed in PR #34880 (merged c41b6ca286, Refs #34700 (item 2)): the delegated-administration docs now state the three-officer rule (the auditor's set carries a platform-scoped capability, which keeps it outside the organization boundary, so only a delegated scope whose allowlist names it, or the platform administrator, changes who holds it). Real-engine pins in plugin-security cover it in postures single and isolated. A spec-level flag for the same purpose stays a later feature. This card's other items are unchanged by this PR.

  8. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Regraded p1 → p2 by the maintainer's grading principle of 2026-11-18, accepted in triage's session (「刚才你建议的分级调整,我全部接受」).

    The principle, in order:

    1. What a new user or a prospect meets first (looks and the main flow), the cloud core (Turso, hosted sign-up and onboarding, hosted install and upgrade, plans) and a developer's first contact come first.
    2. Data loss or a permission breach in normal use stays first.
    3. Details and rare configurations are improved over time.
    4. Internal items are frozen.

    Why this card: enterprise-only detail (三员 auditor and security-admin screens).

  9. 8 remaining items

  10. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Claim released → pm:queue · 2026-11-23T10:57Z. The card was handed to repo:objectstack#3 on 2026-11-17; seat 2 confirms it is not theirs, and the current seat 3 confirms it does not hold it (records on this card). The shared assignee os-steve is removed. Grade p1 and area:data are unchanged; seat 7 (area:data) is the natural next claimant. Read the earlier hand-off comments above for the prior work.

  11. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 23, 2026
  12. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Claim: PM loop round 2 · 2026-11-24T04:02Z
    Session: session_01QSeKYpEsWWE9Y5YtSsDgqZ
    Account: os-justin
    Branch: claude/project-thread-qajjjq (existing PR #34817, continued — no new branch)
    Worktree: objectstack-issue-34700
    Domain: domain:server
    Seat: repo:objectstack#4
    File surface: the existing PR #34817 files (packages/objectql search-filter / parent-field-query-guard / engine, tests, system-context.mdx, changeset) (stop on breach; explain in the report)
    Container & model: M, mode:cloud, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack platform code — list search names guard columns the caller cannot read (search-filter.ts:260 withholdUnqueryable; parent-field-query-guard.ts:166,177 on 8644ce711d) | none | auditors in a three-officer setup, every list search
    Thread-read: 7098807696
    Premise: corrected (this comment) — item ① (server-side list search) still reproduces and is the only open item; item ② landed in PR #34880 and the UI half in PR #35389 (via #34741). PR #34817 conflicts with main in one file (parent-field-query-guard.ts). Its last commit (a dogfood-pin change after a queue ejection) is unreviewed and the maintainer's confirmation of that pin change was asked and is not on record.
    Resume-from: claude/project-thread-qajjjq@12455d5acc
    Serial constraints cleared: none of this seat's in-flight cards touch objectql search; same-family gap on positions is #35393 (p3, not folded)

  13. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 24, 2026
  14. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Dispatched 2026-11-24T04:05Z under this seat's claim: mode:cloud dev session session_01QSeKYmQuAhLgegkqRcTc38.

  15. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYmQuAhLgegkqRcTc38
    os-dev-report

    {
      "issue": 34700,
      "status": "done",
      "branch": "claude/project-thread-qajjjq",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34817",
      "session": "session_01QSeKYmQuAhLgegkqRcTc38",
      "premise_still_valid": true,
      "summary": "Continued PR #34817 from 12455d5acc. Item 1 still reproduced on origin/main f46ce5b4a: withholdUnqueryable had no withheld set, and the dogfood pin still asserted the refusal. Merged origin/main as a real merge commit 9fa0bb95b. The one conflict, in parent-field-query-guard.ts, resolved as guardRefuses plus main's new caller argument to parentFieldQueryRefusal. The merge then put engine.ts at 6880 lines against its facade ceiling of 6857 (ruling 7051956587; main sits at 6857, and raising it is maintainer-only). So the seam moved off the facade in 6dcdf177c: registerMiddleware takes EngineMiddlewareOptions, and its withholdSearchFields is asked for the reads that middleware runs on. plugin-audit's two guards declare theirs in the registration they already make. engine.ts ends at 6856 lines and behaviour is unchanged. The PR body was rewritten to the current delta through the relay.",
      "tests": "Head 18bafcac5, closure built (pnpm --filter '@objectstack/dogfood^...' build, VERDICT command-exit 0). Under the lock: objectql full 637 files / 14378 tests passed (VERDICT 0); objectql search set (src/engine-search*, src/search-filter*, src/engine-middleware*) 6/70; the seam pin engine-search-field-withholder.test.ts 11/11 (one case added: a withholder on a middleware for every object, no object or '*', is asked for each object); plugin-audit full 109 files / 1827 tests; dogfood activity-text-predicate + audit-log-audit-capability 2 files / 39 tests; typecheck objectql + plugin-audit exit 0 (check:test-typecheck included). Ablation of the moved wiring: the withholdSearchFields line in plugin-audit's guard registration was removed via ablation-replace.mjs --hold, plugin-audit rebuilt, ablation-dist-preflight --absent passed. Result: plugin-audit 6 failed / 70 passed, dogfood 4 failed / 35 passed (the activity pin in 3 reader classes plus the audit-log holder case); the named-column refusals stayed green. Restore: blob == HEAD db144f4085a9, git diff HEAD empty, rebuilt, preflight --absent of the ablation marker passed, 76/76 and 39/39 green.",
      "gates": "Local, at 18bafcac5: dispatch-gates.mjs --commands derived 109 (change set of 14 paths vs merge base f46ce5b4a). All 109 run, each exit 0. --ran with exit codes: '109 derived, 109 run, 0 NOT-MEASURED (a DERIVED zero)'. On the first run, at merge head 9fa0bb95b, check:facade-delegation-only was red (exit 1: engine.ts 6880 over 6857), fixed by 6dcdf177c. Three exit-3 prerequisites on that run (plugin-teardown-shape self-test needed commit 621a4876, fetched; skill-examples and dual-build-cjs-loads needed dist) are exit 0 on the final run. Also: check-nul-bytes exit 0; check-platform-checklist --changed-from origin/main exit 0 (14 anchors judged, 0 lost). PR check-runs at 18bafcac5, the eleven required contexts: Lint & Repo Gates success, TypeScript Type Check success, Test Core success (10/10 shards success), Build Core success, Governed Surface Queue Guard success, Test UI success, Live E2E UI success, Dogfood Regression Gate success, Lint UI / Type Check UI / Build & E2E UI skipped (no ui/ path). Check Changeset and PR-body guards were in_progress, re-triggered by the body edit; their first runs at this head were success.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm. The two dogfood files that pin this rule were run, 39/39 at 18bafcac5.",
      "mcp_calls": "6 — all reads: issue_read get, issue_read get_comments (#34700); pull_request_read get, get_reviews, get_comments, get_check_runs (#34817). No MCP write.",
      "api_writes": "2 — relay (fleet-write repository_dispatch, run 45334501504 success): issue_patch body of PR #34817, read-back identical, 7922 bytes; post-stamped.mjs: this os-dev-report comment on #34700. git push x3 to claude/project-thread-qajjjq (9fa0bb95b, 6dcdf177c, 18bafcac5) is not a REST write.",
      "open_questions": [
        {
          "question": "Confirm the changed dogfood pin, still present after the merge (main has never touched the file). activity-text-predicate.dogfood.test.ts, the activity-stream search case, for each reader class (masked / gated / withheld). BEFORE (main): for a stored value and a non-matching value, $search=VALUE on sys_activity filtered to the parent object -> 403 PERMISSION_DENIED, both. AFTER (12455d5acc, unchanged here): $search=VALUE -> 200, and the matching and non-matching probes return equal {status, rows}; $search=VALUE&$searchFields=summary -> 403 PERMISSION_DENIED. The oracle is still closed: matching equals non-matching, and naming a guarded column is refused. The earlier request for this confirmation has no answer on record.",
          "options": [
            "A confirm the AFTER assertions as the pin for this rule",
            "B keep the refusal pin, which means rejecting the card's item 1 rule for sys_activity"
          ],
          "recommendation": "A, because the card's item 1 rule (a server-widened search leaves out what the caller may not query; naming such a column is still refused) is exactly what the AFTER pin asserts, and the leak test (match == no-match) is kept."
        },
        {
          "question": "The seam's shape changed after the last review: ObjectQL#registerSearchFieldWithholder (L1-reviewed at 54107ea2ac) became registerMiddleware(fn, { object, withholdSearchFields }), so that engine.ts stays at or under its facade ceiling. The alternative was to keep the method and ask for a ceiling raise of about +23 lines on engine.ts.",
          "options": [
            "A keep the middleware-option shape as pushed (engine.ts 6856, no ruling needed)",
            "B restore the method and seek a maintainer ruling to raise the engine.ts ceiling"
          ],
          "recommendation": "A, because the gate prescribes new code outside the facade, a ceiling raise is maintainer-only, and the withholder now sits on the guard middleware it mirrors (same object selector), with behaviour unchanged and pinned."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  16. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYmQuAhLgegkqRcTc38
    os-dev-report

    Patch round 1 delta (L1 REWORK 7125329167): new head 81705eb.

    {
      "issue": 34700,
      "status": "done",
      "branch": "claude/project-thread-qajjjq",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34817",
      "session": "session_01QSeKYmQuAhLgegkqRcTc38",
      "premise_still_valid": true,
      "summary": "Patch round 1 on L1 REWORK 7125329167 (head 18bafcac55). New head 81705ebb1, two test-only commits, no source change. Must-fix: audit-log-audit-capability.dogfood.test.ts, the refusal of a search naming old_value, now asserts code PERMISSION_DENIED beside status 403 (64202f756, corrected in 81705ebb1). Measured on the real boot, GET /data/sys_audit_log answers this refusal in packages/rest's flat dialect, {error: message, code: 'PERMISSION_DENIED'}, with no error.code. So the pin reads the top-level code. ADR-0112's #9232 amendment records that dialect, and moving the position belongs to the check:route-envelope ratchet, so no new finding. The first attempt, at the nested error.code, failed on exactly that (expected undefined to be 'PERMISSION_DENIED'). Nit taken: activity-text-predicate.dogfood.test.ts, the named-column search probe, now goes through the file's own expectRefused(named, predicateWords('sys_activity', 'summary')), so status, code and the refusal's first sentence are all pinned. The PR body was not edited this round: its Verification describes 18bafcac5, and this comment carries the delta. The draft/ready state was untouched, and nothing was armed or queued.",
      "tests": "Head 81705ebb1, closure built (pnpm --filter '@objectstack/dogfood^...' build). Under the lock: cd packages/qa/dogfood && pnpm exec vitest run --maxWorkers=2 test/activity-text-predicate.dogfood.test.ts test/audit-log-audit-capability.dogfood.test.ts -> Test Files 2 passed (2), Tests 39 passed (39), VERDICT command-exit 0. At 64202f756 the same command gave 1 failed / 38 passed: the nested error.code read answered undefined, which is what located the flat body. No ablation: the diff only tightens assertions on a behaviour already pinned.",
      "gates": "Local at 81705ebb1: dispatch-gates.mjs --commands derived 109, all 109 run. --ran with exit codes: '109 derived, 109 run, 0 NOT-MEASURED (a DERIVED zero)'. Three gates first refused with exit 3 (check:skill-examples, check:dual-build-cjs-loads, check:published-readme-exports) because 7 packages had no dist in this fresh worktree. Those packages were built under the lock (VERDICT command-exit 0) and the three re-ran at exit 0. check-nul-bytes exit 0. PR check-runs at 81705ebb1: not read; CI is still converging (in_progress is the honest value).",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm. The two pinning dogfood files are 39/39 at 81705ebb1.",
      "mcp_calls": "1 this round — pull_request_read get_comments (#34817, to read verdict 7125329167). No MCP write.",
      "api_writes": "1 this round — post-stamped.mjs: this os-dev-report delta comment on #34700 (relay). git push x2 (64202f756, 81705ebb1) is not a REST write.",
      "open_questions": [
        {
          "question": "Maintainer confirmation of the activity-stream dogfood pin change is still owed, as recorded in 7123127949 (option A) and in the L1 verdict 7125329167. This round only made the refusal half of that pin stricter (expectRefused: status, code and words).",
          "options": [
            "A confirm the AFTER assertions",
            "B keep the refusal pin"
          ],
          "recommendation": "A, unchanged from 7123127949."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  17. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Ruled · 2026-11-24T09:54Z · the sys_activity search pin change on PR #34817 — option A

    The maintainer's words, in seat repo:objectstack#4's session, 2026-11-24, verbatim: 「34700 34770 同意」 — the answer to the seat's presentation of options A/B/C (a fable-tier four-axis analysis), recommendation A.

    Governing text: the maintainer's 2026-11-17 approval of this card's plan (server-resolved search drops the columns the reader may not query; naming them still refuses); the FLS search rule of #25672 (withholdUnqueryable); the filter-oracle guard of #21154.

    Next: PR #34817 (L1 ACCEPT at 81705ebb1a, comment on the PR) leaves its HELD condition and goes to landing. The card stays pm:dispatched until MERGED.

  18. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Close-out · 2026-11-24T10:37Z · PR #34817 merged (4db08d5e26), closing this card by Fixes #34700.

    Delivered: a server-resolved list search on sys_audit_log and sys_activity leaves out the columns this reader may not query, so the auditor's search answers instead of 「无权访问」; naming such a column still refuses (403 PERMISSION_DENIED) — the rule ruled A here (7128046786). Item ② landed earlier in #34880; the ui half (#34741) closed via #35389. sweep-closed-cards --pr 34817: only this card was closed by the merge. pm:dispatched stripped in this stroke.

  19. removed
    pm:dispatched
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:serverpriority:p1security

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions