Skip to content

An app's isDefault permission set installed into a running environment is not bound as the baseline until restart, so users with no explicit grant read nothing #38109

Not planned

Description

@objectstack-fleet

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

Filing gate: ② cross-repo finding, asked for by seat repo:cloud#5 (mailbox #37784 comment 7232381344). The brightrule#69 smoke on a local objectos-ee found it (that seat's project file pm-orders/brightrule/69/pr-b-report.json, out_of_scope_findings[0]). Source: fleet.
Grading: area:package · Bug · p2 (suggested; triage grades) · reach: every environment that installs an app with an isDefault permission set while running (install-local, enterprise edition); every user without an explicit grant is locked out until a restart · evidence: smoke run; the cause is a code read, not proven.
Dedupe: isDefault permission set restart and default permission set install runtime → nothing related open.

维护者速读

  • 问题:在一个已经在跑的环境里装一个应用,如果它带了「默认权限集」(isDefault),这个权限集要等环境重启后才生效。重启前,没有单独授权的用户什么都读不到(403)。
  • 后果:真实员工装完应用后打开就是一片空,直到有人重启环境。
  • 修法:装、升级、卸载应用时,重新解析应用声明的默认权限集;托管内核的工厂路径也查一遍。加一条测试:往运行中的内核装一个带默认权限集的应用,没有授权的用户不用重启就能读。
  • 要你做的:无。

What happens

brightrule's inquirer permission set is isDefault. Installed with install-local into an already running environment, it is not bound as the baseline until the environment restarts. Personas with no explicit grant got 403 on every policy read. Workaround today: grant the set by name (the eval driver does).

Likely cause (code read on origin/main, not proven)

packages/cli/src/commands/serve.ts ~l.4893–4908 builds SecurityPlugin(appSecurityPluginOptions(config)) once, from the boot config (ADR-0056 D7). A package installed later never updates that default set name.

Ask

  1. Re-resolve the app-declared default permission set when a package is installed, upgraded or uninstalled at runtime.
  2. Check that hosted kernels' factory path does the same.
  3. A test: install an app with an isDefault set into a running kernel; a user with no grants reads its objects without a restart. Uninstalling it removes the baseline.

Acceptance

  • Installing, upgrading or uninstalling an app with an isDefault set takes effect on the running environment with no restart, on both the serve and hosted paths.

Activity

  1. added
    bug
    priority:p2
    on Nov 28, 2026
  2. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:package · domain:server · Bug · p1 · pm:queue · size S; rationale: an app's isDefault permission set installed into a running environment is not bound as the baseline until a restart, so every user with no explicit grant is locked out until then (measured in a smoke run). That is a lockout of every ordinary user on install, so p2 → p1. Graded, not chased (area:package has no seat taking new cards); surfaced to the maintainer. Recorded 2026-11-28T03:14Z.

  3. added
    domain:server
    pm:queue
    priority:p1
    and removed
    priority:p2
    on Nov 28, 2026
  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8

    Picked by card-pick.mjs --order area:data --seat repo:objectstack#8 at 2026-11-28T06:55Z: rank 1 (p1 jump, area:package, unclaimed). The maintainer in this seat's session, verbatim: 「开一个 objectstack 全仓座位」 with intake area:data; 「batch 调到 5,可以用云卡」; then on more concurrency through cloud cards, batch 「8 (Recommended)」.

    Claim: PM loop round 1
    Session: session_017xRBcSAaBEfQpU2yJexSJ8
    Account: sunhaolin
    Branch: claude/issue-38109-default-permset-hot-bind
    Worktree: objectstack-issue-38109
    Domain: domain:server
    Seat: repo:objectstack#8
    File surface: packages/** where the app install path binds (or fails to bind) an isDefault permission set as the baseline at runtime — the producer the dev measures (likely the security/permission service and the install path), co-located tests, one changeset per moved package; ⛔ no packages/spec/src/** (stop on breach; explain in the report)
    Container & model: S, mode:cloud, model: opus (dispatch-gates --tier: no path-derived mandate; default tier), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack — an isDefault permission set installed into a running environment is not bound as the baseline until restart (code read by the filer, smoke-run evidence) | none — a restart binds it | every running environment that installs an app with an isDefault permission set; users with no explicit grant read nothing (403) until restart
    Thread-read: 7232921785
    Premise: measured first by the cloud dev on current main (the card's reproduction), before any edit; a premise that no longer holds is reported, not built.
    Serial constraints cleared: check-handover.mjs --inflight names no claim on this surface beyond seat 3's packages/** / ui/** claims; textual overlap re-checked with overlap-check.mjs before every push.
    Scope this dispatch: the whole card. Fixes #38109.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcVC7mx4kjA7SkBTBWY
    os-dev-report

    {
      "issue": 38109,
      "status": "needs_decision",
      "branch": "claude/issue-38109-default-permset-hot-bind",
      "pr": null,
      "session": "session_017xRBcVC7mx4kjA7SkBTBWY",
      "premise_still_valid": false,
      "summary": "Measured on objectstack e3bdc748 (origin/main), served tier opus/high as dispatched. On the open `objectstack dev` path a hot install-local of a package with an isDefault set leaves a no-grant member at 403, and the restart CONTROL ALSO answers 403: a restart does not bind it, so 'not bound until restart' does not reproduce. Cause, measured: by ADR-0090 D5 ('It is never auto-bound: installing a package must not silently widen every tenant user's access') a package's isDefault set produces a PENDING audience-binding suggestion (sys_audience_binding_suggestion, anchor everyone). It reaches members only when a manage_metadata holder accepts it, and the acceptance re-derives everyone with no restart (measured: confirm 200, then the same member reads 200 and holds inquiry_inquirer). The boot-time fallbackPermissionSet (serve.ts appSecurityPluginOptions(config)) reads only the deployment's own boot config and never an installed package: rehydrate runs at kernel:ready, after SecurityPlugin is constructed. So binding an installed package's isDefault set at install time, as the card asks, reverses an accepted ADR. No code written, no PR.",
      "tests": "Live repro, no code change. Build: os-verify-lock VERDICT command-exit 0 (turbo build of the backend closure with OS_SKIP_DTS=1, ui excluded). Server: `objectstack dev -p 38421 --seed-admin` in examples/app-todo, persistent .objectstack (removed afterwards). Inline manifest com.acme.inquiry: object inquiry_case, sets inquiry_inquirer (isDefault, allowRead) and inquiry_manager (non-default). Steps: admin POST /api/v1/marketplace/install-local gives 200 hotLoaded:true; admin create-user bob (member, no grant) gives 200; admin POST /api/v1/data/inquiry_case gives 201; bob GET /api/v1/data/inquiry_case gives 403 PERMISSION_DENIED, /auth/me/permissions permissionSets [member_default, storage_attachment_member]; GET /api/v1/security/suggested-bindings gives one row inquiry_inquirer status pending. RESTART CONTROL (same data dir, server killed by its own port pid and restarted): bob GET gives 403 again, same permissionSets, suggestion still pending; admin GET gives 200 total 1. DESIGNED PATH: admin POST /api/v1/security/suggested-bindings/ID/confirm gives 200 status confirmed bindingCreated:true; bob GET gives 200 (no restart), permissionSets now include inquiry_inquirer; inquiry_manager (non-default) never appears. Existing unit pins of the same design: plugin-security suggested-audience-bindings.test.ts (pending row created, accept re-derives everyone, revoke and uninstall withhold it). Ablation: n/a, no tested behaviour changed.",
      "gates": "None owed: no diff, no push, no PR. `dispatch-gates --commands` not run (empty change set). check:dev-prereqs refused the dev boot because ui/ dist was absent (ui build fails under OS_SKIP_DTS); I booted the backend with `pnpm exec objectstack dev` from examples/app-todo instead. That is a deviation from the `pnpm dev:*` script rule, declared here.",
      "dogfood_battery": "n/a: no PR",
      "mcp_calls": "0 GitHub MCP calls (one claude-code-remote get_session read, to check the served tier)",
      "api_writes": "1: POST /repos/objectstack-ai/objectstack/issues/38109/comments (this report, via post-stamped.mjs). REST reads via gh api: the issue and its comments.",
      "open_questions": [
        {
          "question": "The card asks that an installed package's isDefault set be bound as every member's baseline at install time, with no admin step. ADR-0090 D5 (accepted, plus ruling 22801 A in suggested-audience-bindings.ts) forbids exactly that: packages suggest, a manage_metadata holder accepts, and the acceptance already takes effect with no restart. Should the platform keep D5, or move to auto-binding at install?",
          "options": [
            "A. Keep ADR-0090 D5. Close #38109 as by-design, no platform code. The real gap is visibility: the install answer says 'App is now available in this runtime' and says nothing about the pending suggestion, so an installer never learns members are locked out until they accept (filed below as a separate (a) finding). brightrule/eval: accept the suggestion in Setup (or declare acceptedDefaultPermissionSets on a walled host) instead of granting by name. Cost: none here; one small card for the install answer. Effort: S.",
            "B. Reverse D5 and auto-bind a package's isDefault set to everyone at install, revoking it at uninstall. Needs a superseding ADR (Prime Directive 13), a redesign of the suggestion record and its accept/dismiss doors and Setup UI, and a security review: every package install silently widens every member's access, which is the risk D5 names. Effort: L, Tier H.",
            "C. Opt-in per deployment: a host option such as auto-accepting package defaults on install for single-tenant or dev postures, with D5 kept as the default. Still a contract decision (new option, ADR note). Effort: M."
          ],
          "recommendation": "A. The behaviour the card reports is the ADR's designed safety posture, and it was measured to work hot once accepted. The 'until restart' claim does not hold on the open serve path. If objectos-ee binds the set after a restart, that is the hosted factory folding installed packages into the boot config's fallbackPermissionSet, which would itself breach D5, and that belongs to cloud."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: POST /api/v1/marketplace/install-local, inline manifest with an isDefault set gives 200 whose note reads 'App is now available in this runtime. Refresh the console to see it in the app switcher.' The answer has no field naming the pending everyone suggestion (keys: manifestId, version, versionId, installedAt, hotLoaded, protocolCheckSkipped, upgradedFrom, translationsLoaded, seeded, storageDir, note), and every no-grant member then gets 403 on the package's objects until a manage_metadata holder accepts. Misleading answer text, user-visible. Landing spot: cloud-connection marketplace-install-local-plugin.ts install answer, and the CLI `os package install` printout. Dedupe words: install-local pending suggestion, isDefault install answer, audience binding suggestion install note",
        "carrier: cloud · the card's 'a restart binds it' observation on objectos-ee is not reproduced on the open serve path. If it holds there, the hosted kernel factory resolves fallbackPermissionSet from a config that includes installed packages, which auto-binds a package default (an ADR-0090 D5 breach). Noted, not filed."
      ]
    }
  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8

    Ruled · closed as not planned (by design) · 2026-11-28T09:57Z

    Maintainer, verbatim, in seat repo:objectstack#8's session: 「A 按设计关卡+立提示卡 (Recommended)」.

    Release: claim 7235601924 (session_017xRBcSAaBEfQpU2yJexSJ8). No code was written and no PR opened. The cloud dev session is archived.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagebugdomain:serverpriority:p1

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions