Context
The KB read-side visibility work (PR #12290 / #12163) made private chunks owner-scoped, owner = the writer's getAgentIdentityNodeId(). That identity is populated in stdio / env / gh-cli contexts but not over the OIDC/proxy transport a cloud deployment uses (TransportService.mjs proxy path + AuthService.mjs OIDC path resolve a userId/username, never an agentIdentityNodeId).
The Problem
In an OIDC/proxy cloud deployment a private chunk has no resolvable owner on read, so it fails safe — hidden from everyone, including its writer. This closes the cross-user leak (the #12163 core threat) but leaves owner read-back inert in exactly the shared-default-tenant cloud scenario #12163 targets: a user cannot read their own private content back.
The Fix
Key per-chunk ownership on userId (the per-user identity the OIDC/proxy transport does populate, and which distinguishes users within a shared tenant) rather than agentIdentityNodeId. This requires aligning both sides:
- Write: stamp the owner from the authenticated
userId (with the agent-identity path preserved for local stdio agents, or unified on userId).
- Read: match the ownership branch in
readVisibilityFilter.mjs on normalizeUserId(getUserId()).
- Re-validate the dockerized integration specs can then exercise owner read-back (an owner-stamped
private chunk is returned to its writer and to nobody else).
Consider whether userId should be the single owner key for both transports, or a fallback chain (agentIdentityNodeId ?? userId) — resolve in the PR.
Acceptance Criteria
Related
- Completes the owner-scoping intent of the KB read-side visibility work (the leak-close + fail-safe shipped first; this restores owner read-back over OIDC).
Context
The KB read-side visibility work (PR #12290 / #12163) made
privatechunks owner-scoped, owner = the writer'sgetAgentIdentityNodeId(). That identity is populated in stdio / env / gh-cli contexts but not over the OIDC/proxy transport a cloud deployment uses (TransportService.mjsproxy path +AuthService.mjsOIDC path resolve auserId/username, never anagentIdentityNodeId).The Problem
In an OIDC/proxy cloud deployment a
privatechunk has no resolvable owner on read, so it fails safe — hidden from everyone, including its writer. This closes the cross-user leak (the #12163 core threat) but leaves owner read-back inert in exactly the shared-default-tenant cloud scenario #12163 targets: a user cannot read their ownprivatecontent back.The Fix
Key per-chunk ownership on
userId(the per-user identity the OIDC/proxy transport does populate, and which distinguishes users within a shared tenant) rather thanagentIdentityNodeId. This requires aligning both sides:userId(with the agent-identity path preserved for local stdio agents, or unified onuserId).readVisibilityFilter.mjsonnormalizeUserId(getUserId()).privatechunk is returned to its writer and to nobody else).Consider whether
userIdshould be the single owner key for both transports, or a fallback chain (agentIdentityNodeId ?? userId) — resolve in the PR.Acceptance Criteria
privatechunk; another user in the same shared tenant cannot.readVisibilityFilter.mjsJSDoc +cloud-deployment/Security.mdupdated to drop the "owner read-back not yet available over OIDC" limitation once delivered.Related