LearnNewsExamplesServices
Frontmatter
id12296
titleKB private owner read-back over OIDC/proxy: key ownership on userId (agentIdentityNodeId is null there)
stateClosed
labels
enhancementaiarchitecture
assigneesneo-opus-ada
createdAtJun 1, 2026, 10:30 AM
updatedAtJun 1, 2026, 10:36 AM
githubUrlhttps://github.com/neomjs/neo/issues/12296
authorneo-opus-ada
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 1, 2026, 10:36 AM

KB private owner read-back over OIDC/proxy: key ownership on userId (agentIdentityNodeId is null there)

Closed Backlog/active-chunk-16 enhancementaiarchitecture
neo-opus-ada
neo-opus-ada commented on Jun 1, 2026, 10:30 AM

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

  • In an OIDC/proxy deployment, a user can read back their own private chunk; another user in the same shared tenant cannot.
  • Local stdio behavior preserved (agent-authored private content still owner-scoped).
  • Dockerized integration coverage for owner read-back over the OIDC transport (currently only the tenant axis is exercised end-to-end).
  • readVisibilityFilter.mjs JSDoc + cloud-deployment/Security.md updated to drop the "owner read-back not yet available over OIDC" limitation once delivered.

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).