Skip to content

id(world/audit): IsolationInfo and PolicyInfo queries are audited as admin actions — the falsified-attribution class #4017 fixed for the other four queries #7553

Closed

Description

@developing-today

Problem

The structured audit log landed in #4017 (for #1063, main 2aca793a34) records two read-only queries — IsolationInfo and PolicyInfo — as admin actions with outcome accepted, even though neither command carries any caller identity. That is the exact falsified-attribution defect #4017 itself fixed for the other four participant-readable queries.

In pkgs/id/src/world/actor.rs at 2aca793a34:

  • WorldCommand::IsolationInfo handler (~line 1905): calls audit_admin_result("admin", "IsolationInfo", …, true) and always records outcome accepted.
  • WorldCommand::PolicyInfo handler (~line 1957): calls audit_admin_result("admin", "PolicyInfo", …, true) the same way.

By contrast, the handlers for Metrics, CapsInfo, ExecutionProfileInfo, and ManifestState in the same match deliberately emit no record, with comments stating the rule: these queries are readable by joined participants, the handlers carry no caller identity, and recording the read as admin "would falsify the audit actor" / "participant-readable queries are not administrative actions and stay out of the audit trail." The pinning test participant_readable_queries_emit_no_admin_audit_record (pkgs/id/src/world/tests.rs) covers only those four commands — IsolationInfo and PolicyInfo were missed, so the inconsistency is untested and regressable.

Why it matters

  • The audit trail lies about who acted. WorldHandle::isolation() and WorldHandle::policy() (pkgs/id/src/world/handle.rs:400, :483) take no authority/identity parameter — any holder of the handle can issue them, exactly like Metrics/CapsInfo. Recording them under actor admin manufactures admin activity that never happened, in a log whose stated purpose is replayable, trustworthy attribution of admin actions (id: F12.6 audit log and OpenTelemetry export #1063).
  • PolicyInfo is on a hot internal path. The cross-world gate WorldHub::authorize (pkgs/id/src/world_hub.rs:302, :308) calls policy() twice for every cross-world access check, same- or cross-world reads/writes alike. Every such check now appends a spurious admin / PolicyInfo / accepted record, flooding the id::audit target with noise that drowns real admin actions and breaks the "exactly one record per admin command" invariant the audit replay test asserts.
  • Replay/review tooling cannot distinguish a genuine admin read from an internal gate check or a participant read, undermining the refusal/provider-use dispositions feat(id): structured audit log of admin actions and provider use (#1063) #4017 added.

Evidence (verified 2026-11-08, laptop, main 2aca793)

  • Read of pkgs/id/src/world/actor.rs on current main: IsolationInfo and PolicyInfo handlers emit audit_admin_result("admin", …, true); Metrics, CapsInfo, ExecutionProfileInfo, ManifestState handlers emit nothing and carry the explanatory comments quoted above.

  • git show 2aca793a34 (the feat(id): structured audit log of admin actions and provider use (#1063) #4017 landing commit) shows the same split introduced in one diff: audit calls added to the two Info handlers, no-audit comments added to the other four.

  • Probe (laptop worktree ~/git/fleet/probe-audit-info, test added to world::tests::audit_tests mirroring participant_readable_queries_emit_no_admin_audit_record but issuing IsolationInfo + PolicyInfo): a capture test in the id::audit target, issuing only the two identity-less queries, captured exactly two records on current main:

    {"action":"IsolationInfo","actor":"admin","outcome":"accepted","parameters":{"isolation":"Isolated"},"schema_version":1,"world_id":"audit-test",…}
    {"action":"PolicyInfo","actor":"admin","outcome":"accepted","parameters":{"policy":"WorldPolicy { isolation: Isolated, cross_world_write: false, … }"},"schema_version":1,"world_id":"audit-test",…}

    i.e. two admin/accepted audit records for commands that carry no caller identity at all — where the four sibling queries capture zero.

  • Dedup: no open or closed issue covers audit attribution for PolicyInfo/IsolationInfo (searched 2026-11-08). id: F12.6 audit log and OpenTelemetry export #1063 is the parent feature; Archive disposition: archive/janitor-2026-11-07/10653 #7370 covers only the pre-existing audit-test compile failure, a different defect.

Fix

Remove the audit_admin_result calls from the IsolationInfo and PolicyInfo handlers (matching the other four queries, with the same explanatory comment), and extend participant_readable_queries_emit_no_admin_audit_record to issue all six commands so the whole class is pinned.

Acceptance criteria

  • IsolationInfo and PolicyInfo commands emit no id::audit record, like Metrics/CapsInfo/ExecutionProfileInfo/ManifestState.
  • The participant-readable-queries audit test covers all six query commands and fails if any of them emits a record.
  • Genuine admin mutations (SetIsolation, SetFileScope, UpdateCaps, …) still emit exactly one audit record each; the audit replay test stays green.
  • cargo test -p id --lib audit_tests green.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    work/self-assignedAn agent grabbed this item directly, outside the queue
    effort/xsTrivial: expected under 30 minutes of work
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    ContributorAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane B, slug new-issue-creator-code-b)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-11-08 00:50 CST
    • Found via: filed this run
    • Task: Filed after verifying on laptop main 2aca793a34: an audit-capture probe issuing only IsolationInfo + PolicyInfo captured exactly two id::audit records, both actor admin, outcome accepted — for commands that carry no caller identity. The four sibling queries (Metrics/CapsInfo/ExecutionProfileInfo/ManifestState) emit none, per feat(id): structured audit log of admin actions and provider use (#1063) #4017's own fix.
    • Expectation: effort/xs — remove the two audit calls and extend the pinning test to all six queries.
    • Links: evidence in the issue body; probe worktree ~/git/fleet/probe-audit-info (laptop)
  3. developing-today commented on Nov 8, 2026

    @developing-today
    ContributorAuthor

    🤖 Agent note · picked up

    • Agent: new-issue-creator (lane B, slug new-issue-creator-code-b)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-11-08 00:50 CST
    • Found via: self-assigned during new-issue-creator-code-b run (filed this run, §4 guarded self-solve: trivial, clearly scoped, low-risk, easy verification; no safety labels)
    • Task: Remove the audit_admin_result("admin", …, true) calls from the IsolationInfo and PolicyInfo handlers in pkgs/id/src/world/actor.rs and extend participant_readable_queries_emit_no_admin_audit_record to all six participant-readable queries.
    • Expectation: effort/xs — done when the extended audit suite is green on the branch and the PR is merged.
    • Links: branch creator-b/7553-audit-info-attribution (laptop worktree ~/git/fleet/probe-audit-info)
  4. developing-today commented on Nov 8, 2026

    @developing-today
    ContributorAuthor

    🤖 Agent note · done

    • Agent: new-issue-creator (lane B, slug new-issue-creator-code-b)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-11-08 00:50 CST
    • Found via: self-assigned during new-issue-creator-code-b run (filed this run)
    • Task: Removed the falsified admin audit records for IsolationInfo/PolicyInfo and pinned all six participant-readable queries in the audit test.
    • Expectation: met — PR fix(id): stop auditing IsolationInfo/PolicyInfo queries as admin actions #7556 merged as 5e307e975e; cargo test -p id --lib audit_tests 6/6 green on the branch and again on merged main; cargo fmt --check clean for both touched files; the fix re-read on origin/main (handler at actor.rs:1905 now carries the no-audit comment and no audit call). Issue auto-closed by the PR's Fixes marker. No queue packet (guarded self-solve, §4).
    • Links: PR fix(id): stop auditing IsolationInfo/PolicyInfo queries as admin actions #7556 · merge commit 5e307e975e
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

    app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions