Skip to content

Sharing: delete on an owned public_read_write object follows the record's owner (ruling C), not the creator floor #38517

Description

@objectstack-fleet

repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr

Ruled: 7288570890 · letter C · 2026-11-30T18:56Z — delete on an owned public_read_write object follows the owner; the title and acceptance below describe a premise disproved by report 7257826220 and are rewritten by the seat.

Filing gate: ② seat-filed from an os-dev out-of-scope finding. Source: dev report 7252148728 on #37768 (slice C, PR #38516), out_of_scope_findings. Not fixed there: the file is inside the plugin-security lease.
Grading: area:data · Bug · p2 · reach: any writer whose permission set hides one field (readable: false) of an object it may delete · evidence: measured on a bootStack with the real SecurityPlugin (controls below); the cause is suspected, not proven. Fail-closed (an over-denial), so no data is exposed; filed as an ordinary bug.

维护者速读

  • 问题:一个有删除权限、而且是记录负责人的用户,只要它的权限集把这个对象的某一个字段设成不可读,删除自己的记录就会被拒(403「你无权访问这条记录」),而查看同一条记录是正常的。
  • 为什么要修:字段级的「看不到某个字段」不应该变成「整条记录不能删」;用户看到的是莫名其妙的拒绝。
  • 影响:只是多拒,不会泄露数据。
  • 要你做的:无。

What

Measured: HTTP DELETE /api/v1/data/csr_customer/ID answers 403 PERMISSION_DENIED (record_access_denied, "You do not have access to this record") for a writer holding allowDelete who owns the row in its own organization, when its permission set has csr_customer.name readable: false. The same writer's GET of that row answers 200.

Controls: the same user deletes its own row of an object with no field-level restriction (csr_note, 200); a writer set without the FLS entry reaches the engine (409 from the closed-state lock in that test).

Suspected site: the by-id pre-image re-read in packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts (about lines 1683–1720): the caller-context re-read under field-level security comes back refused or empty, and the refusal reads it as "no access to the record".

Repro: in closed-state-refusal-wire.dogfood.test.ts (PR #38516 head 088d94cb), give csr_withheld csr_customer.name readable: false, insert a customer as system with owner_id and organization_id of the withheld user, then DELETE it as that user.

Acceptance

  • The repro's DELETE reaches the engine (it answers as the same user's delete of an object with no field-level restriction).
  • A writer without allowDelete, or one who cannot read the row at all, is still refused with the same answer as today; tests pin both sides.
  • The pre-image re-read never returns a field the caller cannot read.

Not in scope: the closed-state lock (#37768).

Dedupe: FLS readable false owner delete 403, record_access_denied field-level, by-id delete pre-image re-read 0 open.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:server
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4

    Triage: lands in packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts (the by-id pre-image re-read under field-level security), with pins on both sides · area:data · domain:server · Bug · p2 · pm:queue · size S. Grading line: area:data · Bug · Impeded · end users, daily · evidence measured (the bootStack repro and controls in the body). Rationale: an owner who may delete is refused a delete because one field is hidden; the refusal is fail-closed, so there is no exposure and this is not a security item. Type set to Bug at this touch.

  3. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu

    Premise read · 2026-11-29T14:07Z · seat read on origin/main 75108ea (read-only, not reproduced). Card stays in pm:queue; this seat takes it at its next free slot with a reproduce-on-main gate first.

  4. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu

    Claim: PM loop round 1
    Session: session_01JQwxba2oTCUuCosPm6pkRu
    Thread session: session_01JQwxbZ4NCM1Q2aTHDH6b9s
    Account: os-warren
    Branch: claude/project-thread-x7rxdr
    Worktree: objectstack-issue-38517
    Domain: domain:server
    Seat: repo:objectstack#2
    Area: o2-D
    File surface: packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts, packages/plugins/plugin-security/src/security-plugin-addressed-writes.ts, a new posture test beside by-id-write-row-reread.posture.test.ts, one changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default tier (dispatch-gates.mjs --tier: "no path-derived mandate"; served claude-opus-5-5 per the thread's first report), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: suspected in objectstack plugin-security (step 2.7 by-id re-read, security-plugin-authz-middleware.ts:1696-1716), unproven on main | no platform path covers it if it reproduces | an owner with allowDelete on an object with an FLS-hidden field, reachable today if it reproduces on main
    Thread-read: 7257061573
    Premise: inbox-free gate — reproduce on main first (seat read 7257061573); not reproduced ⇒ stop and re-home to #37768 / PR #38497
    Serial constraints cleared: none on these files (seat overlap read 2026-11-29; #37768 / PR #38497 is the closed-state seam, a different file set)

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbZ4NCM1Q2aTHDH6b9s
    os-dev-report

    Premise gate run on origin/main 48da716 at 2026-11-29T15:06Z. The card's repro reproduces on main, but the hidden field is not the cause: the same 403 comes back with no field rule at all, and the withheld writer deletes fine where the row's creator is stamped. No code written, no PR.

    {
      "issue": 38517,
      "status": "done",
      "branch": "claude/project-thread-x7rxdr",
      "pr": null,
      "session": "session_01JQwxbZ4NCM1Q2aTHDH6b9s",
      "premise_still_valid": false,
      "summary": "Reproduced on main with bootStack and the real SecurityPlugin (fixture mirrors the card's: public_read_write customer and invoice, private note, no closedStates; writer set FULL, withheld set FULL plus name readable:false on all three). DELETE by id, owner = caller, same organization: row written through the door -> writer 200; row inserted as system (created_by null) -> writer 403 record_access_denied AND withheld 403 on both public_read_write objects, GET 200 for both; the same system rows with created_by set to the caller -> writer 200 and withheld 200; on the private note every case is 200, withheld included. So field-level security plays no part: the deciding column is created_by. Mechanism: member_default's platform ownership floor owner_only_deletes (created_by == current_user.id) stays on public_read_write deletes by design (security-plugin-rls-filter.ts, the #8023 block: only the update limb yields to that OWD; the sharing service abstains on a public object so the floor is not replaced, authz middleware step 2.7 comment). On a private object the sharing service allows the owner by owner_id and replaces the floor, which is why the note deletes. The card's control (csr_note, 200) differs from the repro in sharing model, not in field rules, and its repro row was inserted as system, so created_by was null. Engine-level control: the same scenario with custom sets and no member_default floor is 200 in single, group and isolated postures, hidden name or not. Not the closed-state seam either: no closedStates on any fixture object.",
      "tests": "Scratch only, not committed. packages/qa/dogfood scratch bootStack test, 18/18 cases ran, os-verify-lock VERDICT command-exit 0; packages/plugins/plugin-security scratch engine-level test (real ObjectQL + SqlDriver + SecurityPlugin), 6/6, every delete 200. Readings quoted in summary.",
      "gates": "n/a: no diff. Local builds: plugin-security dependency closure 20/20 and dogfood closure 79/79 under os-verify-lock, VERDICT command-exit 0.",
      "dogfood_battery": "n/a: no PR",
      "mcp_calls": "3: github issue_read get, issue_read get_comments, claude-code-remote get_session (reads only)",
      "api_writes": "1: this comment, POST issues/38517/comments via post-stamped",
      "open_questions": [
        {
          "question": "On a public_read_write object, may the record's owner (owner_id) delete a row it did not create (created_by null after an import, seed or system insert, or another creator after an ownership change)? Today only the creator may, by the #8023 design that keeps owner_only_deletes on that OWD.",
          "options": ["A keep as designed: close this card as not a defect; the 403 is the documented creator-only delete floor", "B relieve the floor for owner_id == caller on deletes of public_read_write objects (a widening of the delete floor; ADR-level change)"],
          "recommendation": "A, because the delete limb was kept creator-only on purpose and door-written rows always carry created_by; B is a policy widening the maintainer would have to rule on, not a bug fix"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · the dogfood closed-state wire test on the o5 trunk notes the withheld writer's customer delete as refused by the security layer; that refusal is this same creator-only floor on a system-inserted row, not field-level security"]
    }
  7. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu

    Release: claim 7257662920 (session_01JQwxba2oTCUuCosPm6pkRu, repo:objectstack#2) · 2026-11-29T15:07Z · to the decision inbox. L1 of the no-PR report 7257826220: premise false as filed, read against GitHub.

    Open question for the maintainer (from the report): on a public_read_write object, may the owner_id holder delete a row they did not create?

    • A: keep the design; close this card as not a defect.
    • B: let the delete floor also pass owner_id == caller on such objects, matching what a private object already allows (a widening, a security-boundary choice).

    pm:dispatched → needs-user-decision, assignee cleared. The seat asks for a decision thread; the analysis and the maintainer quick-read are written there.

  8. 9 remaining items

  9. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  10. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Claim amendment (claim 7360863212): File surface adds packages/spec/src/contracts/sharing-service.ts (reason: comment text only — the checkDelete JSDoc "abstain covers exactly the rows checkEdit abstains on" is the contract copy of the sharing-service abstain prose ruling 7288570890 names, and stops being true under option C; no type or .describe change). check-handover.mjs --inflight --paths=packages/spec/src/contracts/sharing-service.ts --card=38517: no readable in-flight surface meets it.

    Open with the maintainer (not yet ruled): the card thread measured a second narrowed population under C — principals outside the org_member position (positions ['everyone'] or []) today delete any row of a public_read_write object holding allowDelete; under C they follow the owner too. The thread builds that reading in a separable commit; ACCEPT waits on the maintainer's answer.

  11. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Cb2WxATpgLNvmWnnUq
    os-dev-report

    {
      "issue": 38517,
      "status": "done",
      "branch": "claude/project-thread-crdvow",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39216",
      "session": "session_01Utp6Cb2WxATpgLNvmWnnUq",
      "premise_still_valid": true,
      "summary": "Ruling 7288570890 option C: on an object that declares sharingModel public_read_write and has owner_id, plugin-sharing answers delete by the ownership authority (owner, manager above by write depth, Modify All) for by-id, predicate, cascade and the permanent recycle-bin delete; the creator floor stops deciding. Edit is unchanged. security/explain reads the delete baseline as owner-scoped where plugin-sharing is installed. Two narrowings named in the changeset and PR body (creator-not-owner; principals the creator floor never bound); externals follow the members' rule. Both open questions are built as the recommended A and listed under Pending maintainer answers.",
      "tests": "New real-stack pin public-read-write-owner-delete.test.ts 24/24. Red first, ablated once: sharing-service.ts restored to origin/main (dist rebuilt, grep 0) 8/23 ruled cells red, restored green; explain change removed 1 red. After merging main (f1df7a8f) on head 83bfad8c: plugin-security 7397 passed / 52 skipped / 0 failed (292 files); plugin-sharing 1776 passed / 11 skipped / 0 failed (80 files). tsc --noEmit plugin-sharing 0, plugin-security 0. packages/qa/dogfood/test/owd-public-read-write-write-floor.dogfood.test.ts not edited; not run locally, the dogfood battery is CI's.",
      "gates": "dispatch-gates --commands on head 83bfad8c: 100 families, each run with exit code recorded before any pipe, all 100 exit 0; --ran: 100 run, 0 NOT-MEASURED, 0 UNRUN. Earlier pre-merge pass: check:slot-lookup exit 1 (real, the pin's untyped security lookup, fixed in 614cf06e), check-plugin-teardown-shape --self-test exit 3 (shallow clone, fixture commit fetched, then 0). PR check-runs not yet read; CI families are cited from the PR's check-runs at review.",
      "line_budget": "14 files, +556 / -36 against main (tests about 380 of it)",
      "files_changed": [
        "packages/plugins/plugin-sharing/src/sharing-service.ts",
        "packages/plugins/plugin-sharing/src/sharing-service.test.ts",
        "packages/plugins/plugin-sharing/src/operator-id-write-gate-33928.test.ts",
        "packages/plugins/plugin-security/src/public-read-write-owner-delete.test.ts",
        "packages/plugins/plugin-security/src/cascade-delete-security-parity.test.ts",
        "packages/plugins/plugin-security/src/explain-engine.ts",
        "packages/plugins/plugin-security/src/security-plugin-explain-access.ts",
        "packages/plugins/plugin-security/src/security-plugin-rls-filter.ts",
        "packages/plugins/plugin-security/src/platform-ownership-policies.ts",
        "packages/plugins/plugin-security/src/objects/default-permission-sets.ts",
        "packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts",
        "packages/spec/src/contracts/sharing-service.ts",
        "packages/spec/src/security/permission.zod.ts",
        ".changeset/38517-public-read-write-owner-delete.md"
      ],
      "deviations": [
        "security-plugin-explain-access.ts edited (sharingServiceWired dep); named to the zone, inside the claimed plugin-security src surface",
        "packages/spec/src/contracts/sharing-service.ts JSDoc via the zone's claim amendment"
      ],
      "mcp_calls": "1 — get_session (read only); 0 GitHub MCP calls",
      "api_writes": "3 — git push (branch); fleet-write relay pr_create POST /repos/objectstack-ai/objectstack/pulls (#39216, draft, no assignee, no labels); post-stamped comment POST /repos/objectstack-ai/objectstack/issues/38517/comments (this report)",
      "classifier_refusals": [],
      "open_questions": [
        {
          "question": "Principals the creator floor never bound (membership role outside the built-in roles; a session with no organization): follow the owner for delete too?",
          "options": [
            "A yes, as built",
            "B keep them open with a carve-out commit"
          ],
          "recommendation": "A, because ruling point 1 hands delete to the same authority as private, and B adds a positions coupling inside plugin-sharing"
        },
        {
          "question": "Externals whose grant speaks for the object: follow the members' owner rule for delete?",
          "options": [
            "A yes, as built",
            "B keep them on the creator rule with a carve-out commit"
          ],
          "recommendation": "A, because ruling point 4 defaults externals to the members' rule and the gained delete stays within the grant's predicate"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: skills/objectstack-data/rules/security.md teaches delete on public_read_write by creator · evidence: Skills-docs follow-up owed line · dedupe words: public_read_write delete owner skills security rules",
        "carrier: PR body Skills-docs line · noted, not filed"
      ]
    }
  12. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Claim amendment (claim 7360863212): File surface adds content/docs/permissions/sharing-rules.mdx (reason: lines ~94-96, "Under public_read_write the sharing service abstains on a delete, so the delete floor stays", are falsified by PR #39216 for an object with owner_id; one docs-only commit corrects that sentence, traced from docs-drift comment 7363096320). Skills follow-up for this PR is filed as #39217 (Blocked-by: #39216); the PR body's Skills-docs: line names it.

  13. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Claim amendment (claim 7360863212): File surface adds content/docs/permissions/permissions-matrix.mdx (lines ~55-58 state the delete floor applies under public_read_write) and content/docs/kernel/runtime-services/sharing-service.mdx (line ~44, the docs copy of the checkDelete JSDoc already corrected in packages/spec/src/contracts/sharing-service.ts). Both are falsified by PR #39216 for a declared public_read_write object with owner_id; one docs-only commit corrects them.

  14. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Overlap reading for the amendment above: check-handover.mjs --inflight reports #39102 (claim 7363194886, repo:objectstack@os-bob) meeting the directory content/docs/. Its claim narrows that entry to "the page that documents app skills states the cap"; the two pages here are the permissions matrix and the sharing-service kernel page, which do not document app skills. No shared file; Notify: none needed.

  15. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Ruling: #38517 · floor-less principals under ruling C · maintainer tapped 「也跟着负责人走(推荐)」 (2026-12-03T00:55Z) on the decision card in the zone thread

    Question as shown: 「#38517 自定义成员角色的用户,删公开读写记录也改为跟着负责人走吗?」 Option as shown: 「也跟着负责人走(推荐)」 — 「和裁决 C 原文一致,所有人同一条规则;自定义角色成员不再能删别人负责的记录,变更说明里写明。」

    Ruled: on a declared public_read_write object with owner_id, principals outside the org_member position (a membership whose role is a custom string; org-less harness contexts) follow the same ownership authority as everyone else: owner, a manager above the owner, or a Modify All holder deletes. No carve-out is built. PR #39216 builds this as is; its changeset names this second narrowing in customer words. The externals question (card in the same thread) is still open.

  16. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Ruling: #38517 · externals under ruling C (ruling 7288570890 point 4 fork) · maintainer tapped 「外部用户同成员(推荐)」 on the decision card in the zone thread

    Tapped 2026-12-03T00:55Z. Question as shown: 「#38517 外部用户删公开读写记录,也改为跟着负责人走吗?」 Option as shown: 「外部用户同成员(推荐)」 — 「只在应用作者给外部用户写了该对象的授权条件时生效:外部负责人可删自己负责的记录,原创建人不再能删。」

    Ruled: externals follow the members' rule. Where an external's held grant speaks for a declared public_read_write object with owner_id, the external owner may delete its own row (still within the grant's predicate) and an external creator who no longer owns the row may not; where no grant speaks, the owner-only floor applies as today. No carve-out is built. With 7363759845 this closes both cells PR #39216 listed as pending.

  17. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Claim amendment (claim 7360863212): File surface adds packages/qa/dogfood/test/predicate-write-unreadable-not-matched.dogfood.test.ts (test only; reason: its control ~725 pins one refusal for the writer's own row and for a missing id on a public_read_write delete; under ruling C that delete answers exactly as private already does — own row permission_denied, another's row and a missing id record_access_denied — so the DELETE leg is re-pinned to the private-parity answers, measured by the card thread on head 03eb078). Uniform refusals across OWDs are filed as their own card.

  18. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Ruling: #38517 · org owners/admins without Modify All under ruling C · maintainer tapped 「也跟着负责人走(推荐)」 on the decision card in the zone thread

    Tapped 2026-12-03T01:58Z. Question as shown: 「#38517 单组织部署的组织管理员,删别人负责的公开读写记录也跟着负责人走吗?」 Option as shown: 「也跟着负责人走(推荐)」 — 「和私有对象同一规则:这类管理员不再能删别人负责的记录,需要就授“全部修改”权限;首位平台管理员不受影响,变更说明写明。」

    Ruled: on a declared public_read_write object with owner_id, an org owner or admin holding the no-bypass admin set (a single-posture deployment, or a walled one with suppressUnbounded) follows the same ownership authority as everyone else, exactly as on private: owner, a manager above the owner, or a Modify All holder deletes. No carve-out and no new permission. The first platform admin (admin_full_access) and walled-posture organization_admin (Modify All) are unaffected. PR #39216 names this third narrowing in its changeset and docs, corrects "an admin among them", and pins the single-posture admin with private parity. Surfaced by the independent L1 on 5ca1b86.

  19. changed the title [-]Security plugin: an owner with allowDelete gets 403 record_access_denied deleting a row whose object has a field it cannot read (GET of the same row is 200)[/-] [+]Sharing: delete on an owned public_read_write object follows the record's owner (ruling C), not the creator floor[/+] on Dec 3, 2026
  20. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

    Card rewrite (ruling C 7288570890 asks the seat to rewrite title and acceptance; the hidden-field defect of the original text does not exist, report 7257826220). Title now names the ruled behaviour. Acceptance of record, superseding the body's:

    • On a declared public_read_write object with owner_id, delete is answered by ownership: the owner, a manager above the owner, or a Modify All holder deletes; the creator floor no longer decides it; edit stays open (ruling C).
    • Principals outside org_member (custom-role members, org-less sessions) follow the same rule (ruling 7363759845); externals follow it within their grant (ruling 7363783625); org owners/admins holding the no-bypass admin set follow it too (ruling 7364954150).
    • Explain agrees with the door in every cell; objects with no owner column or a phantom owner anchor are unchanged.
    • The changeset names each narrowed population in customer words. Built by PR fix(sharing)!: delete on an owned public_read_write object follows the record's owner #39216.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:databugdomain:serverpm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions