Skip to content

RFC 0010: ACL-based memory partitioning and cross-user access - #30

Open
galiniliev wants to merge 2 commits into
mainfrom
dev/galin/memory-acl
Open

RFC 0010: ACL-based memory partitioning and cross-user access#30
galiniliev wants to merge 2 commits into
mainfrom
dev/galin/memory-acl

Conversation

@galiniliev

@galiniliev galiniliev commented Jul 7, 2026

Copy link
Copy Markdown

Summary

Proposes session-scoped, ACL-enforced memory partitioning for OpenClaw: multiple users can share an agent in group channels without exposing each other's — or the owner's — private memory. When an enterprise IdP (Entra ID, Okta, Google Workspace) is connected, its tenant/user IDs become the canonical ACL principals.

Three documents:

  • rfcs/0010-acl-based-memory-partitioning.md — the RFC proper, including a normative-core vs. follow-ups table, a security posture & risk assessment with ranked residual risks, and a non-normative Appendix A (deferred cross-user grants)
  • rfcs/0010/openclaw-memory-broker-design.md — broker design: schema, evaluation semantics, retrieval pipeline, failure modes, runtime notes on the existing node:sqlite + sqlite-vec stack
  • rfcs/0010/implementation-plan.md — component breakdown (core src/memory-acl/ + optional enterprise plugin), phases, and integration points with existing code

Key design decisions

  • Memory stays markdown files. The directory tree is the partition primitive (memory/users/{id}, channels/{id}, shared/, projections/{id}); SQLite is an index + policy catalog (pointer + hash + scope + ACL + lineage + exposure audit), never the content store.
  • Session-scoped attribution, not per-tool-call identity guessing. The gateway stamps scope at routing time (user for verified DMs, channel for groups, agent for autonomous runs). Steering mid-run never switches principals; shared-DM sessions refuse user-scope mounts.
  • Mount model for multiplayer privacy. Personal stores are never readable from group sessions (structural placement, not row filters). Deliberate sharing paths: tenant shared/, opt-in projections, and a write-only postbox with trust tiering (labeled | review-required | off; enterprise default conservative).
  • Deny-by-default with a normative permission lattice (admin ⇒ derive ⇒ read ⇒ retrieve); allow satisfied by placement or ACL rows; two-phase enforcement — the prefilter never excludes evaluator-allowed items, the postfilter is the security boundary.
  • Identity hardening: adapters fetch raw token material; core validates (JWKS/issuer/audience) and constructs principals behind an operator allowlist. Group snapshots fail closed with a bounded staleness window (fail-open is break-glass, doctor-flagged).
  • Transcripts and compaction are governed: transcripts carry session scope; compaction summaries are broker derive operations with lineage — no unscoped artifacts.
  • Deferred (non-normative): direct cross-user grants (Appendix A) and cross-instance federation (future RFC). Until then there is no cross-user read path at all.

Honest limits (stated in-document)

Phase 0 provides retrieval/tool-layer isolation. Deployments with untrusted channel members and exec enabled require the out-of-process broker tier before claiming adversarial isolation (§2.1, risk 1). Semantic laundering through the context window remains detect-not-prevent (Non-Goals §1).

Review guide

Start with "What Accepting This RFC Means" (top of the Proposal) — accepting this RFC accepts the normative core only; follow-ups are individually revisitable. The Security Posture & Risk Assessment section at the end lists what's enforced, ranked residual risks, and which are accepted vs. addressed vs. open.

Adds RFC 0010 with its supporting broker design and implementation plan:
session-scoped, ACL-enforced memory partitioning so multiple users can
share an agent in group channels without exposing each other's — or the
owner's — private memory.

Core design:
- Memory stays markdown files; the directory tree is the partition
  primitive (users/{id}, channels/{id}, shared/, projections/{id}) and
  SQLite is an index + policy catalog (pointer + hash, scope, ACL,
  lineage, exposure audit), built on the existing node:sqlite +
  sqlite-vec stack
- Session-scoped attribution: principals stamped at routing time (user
  for verified DMs, channel for groups, agent for autonomous runs);
  steering never switches principals; shared-DM sessions refuse user
  mounts
- Mount model: personal stores are never readable from group sessions;
  sharing is deliberate — tenant shared/, opt-in projections, and a
  write-only postbox with trust tiering (labeled | review-required |
  off; enterprise default conservative)
- Deny-by-default evaluation with a normative permission lattice
  (admin => derive => read => retrieve); allow satisfied by placement or
  ACL rows; two-phase enforcement where the prefilter never excludes
  evaluator-allowed items and the postfilter is the security boundary
- Enterprise identity: Entra/Okta/Google principals via verified
  bindings; adapters fetch raw token material, core validates and
  constructs principals behind an operator allowlist; group snapshots
  fail closed with a bounded staleness window
- Transcripts carry session scope; compaction summaries are broker
  derive operations with lineage — no unscoped artifacts
- Cross-user grants sketched but deferred (non-normative Appendix A);
  cross-instance federation out of scope for a future RFC
- Security posture & risk assessment section with ranked residual
  risks; Phase 0 is retrieval/tool-layer isolation, with the
  out-of-process broker tier required for adversarial isolation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 4:36 PM ET / 20:36 UTC.

ClawSweeper review

What this changes

This PR adds a draft RFC, broker design, and implementation plan for session-scoped ACL memory isolation and enterprise identity-based access in shared-agent deployments.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

This draft RFC is not implemented on current main and should remain open for explicit maintainer product and security-architecture review. Its only discrete patch issue is that the required rfc_pr front-matter link is still blank; the larger decision is whether this ACL memory boundary fits the accepted enterprise architecture.

Priority: P2
Reviewed head: a925820bd766f6a5df79d44323db0e8eb55649ac
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The RFC is substantive and well-scoped, but it needs the required metadata repair and explicit maintainer sponsorship for its core security direction.
Proof confidence 🌊 off-meta tidepool Not applicable: All changed paths are RFC documentation, so runtime behavior proof is not applicable; RFC lifecycle and maintainer architecture review are the relevant gates.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: All changed paths are RFC documentation, so runtime behavior proof is not applicable; RFC lifecycle and maintainer architecture review are the relevant gates.
Evidence reviewed 5 items Required RFC pull-request metadata: The repository RFC lifecycle requires rfc_pr to point to the RFC pull request. The PR's supplied patch leaves that front-matter field blank.
Repository RFC lifecycle: Current repository guidance says draft RFCs should not merge, require a maintainer-discussion thread, and require rfc_pr to link to the RFC pull request.
Current-main scope check: Current main has no RFC 0010 or memory-broker/memory-ACL document, so it does not already contain this exact proposed RFC.
Findings 1 actionable finding [P3] Set the RFC pull-request metadata
Security None None.

How this fits together

The proposed memory-access subsystem would receive a verified session scope, combine it with memory placement and ACL policy, and return only permitted memories to an agent. Enterprise identity adapters and exposure auditing would supply identity context and accountability around that retrieval path.

flowchart LR
  Session[Verified session identity] --> Scope[Session scope]
  Memory[Memory files and index] --> Broker[Memory access broker]
  Scope --> Broker
  Policy[Placement and ACL policy] --> Broker
  Broker --> Context[Permitted memory context]
  Context --> Agent[Agent response]
  Broker --> Audit[Exposure audit]
Loading

Decision needed

Question Recommendation
Should OpenClaw adopt session-scoped ACL memory partitioning as a core security architecture, and how should it align with the accepted enterprise design that keeps the existing Gateway single-tenant? Sponsor a scoped RFC: Confirm the normative core, document its relationship to the enterprise architecture, and create the implementation issue before accepting the RFC.

Why: The documents propose new core enforcement, identity, storage, and audit contracts; repository evidence cannot choose that long-lived product and security boundary without maintainer intent.

Before merge

  • Add real behavior proof - Not applicable: All changed paths are RFC documentation, so runtime behavior proof is not applicable; RFC lifecycle and maintainer architecture review are the relevant gates.
  • Set the RFC pull-request metadata (P3) - The new RFC leaves rfc_pr blank even though the repository lifecycle requires it to link to the RFC pull request. Add the full URL so the document remains traceable after merge.
  • Resolve merge risk (P1) - Merging a draft RFC would bypass the documented RFC lifecycle, which requires maintainer discussion and acceptance before implementation tracking and merge.
  • Resolve merge risk (P1) - The proposal defines a security-sensitive memory and identity boundary whose relationship to the accepted single-tenant Gateway enterprise architecture needs explicit maintainer agreement.

Findings

  • [P3] Set the RFC pull-request metadata — rfcs/0010-acl-based-memory-partitioning.md:8
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
RFC surface 3 documents added; 2,692 lines This is a broad architecture and implementation proposal, not a narrow documentation clarification.

Merge-risk options

Maintainer options:

  1. Resolve the RFC lifecycle and architecture decision (recommended)
    Keep this draft unmerged until maintainers sponsor the security boundary, align it with the enterprise RFC, and establish the implementation tracking issue.
  2. Pause the proposal
    Leave the RFC unmerged or close it if the team does not want to commit to this core ACL-memory direction.

Technical review

Best possible solution:

Keep the RFC as a draft, repair its pull-request metadata, and have architecture owners decide whether its normative core should become an accepted, separately tracked implementation direction aligned with the enterprise RFC.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a design RFC, not a report of broken existing behavior. The relevant review path is RFC lifecycle, architecture, and security evaluation rather than a runtime reproduction.

Is this the best way to solve the issue?

Unclear: the proposal is detailed, but maintainers must first decide whether its new ACL, identity, and memory-storage contracts are the right core direction and how they coexist with the accepted enterprise architecture.

Full review comments:

  • [P3] Set the RFC pull-request metadata — rfcs/0010-acl-based-memory-partitioning.md:8
    The new RFC leaves rfc_pr blank even though the repository lifecycle requires it to link to the RFC pull request. Add the full URL so the document remains traceable after merge.
    Confidence: 0.99

Overall correctness: patch is correct
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against af708f0ddb6f.

Labels

Label justifications:

  • P2: The PR proposes a significant unimplemented architecture with bounded immediate impact but normal maintainer urgency.
  • merge-risk: 🚨 security-boundary: The RFC introduces deny-by-default memory access, identity validation, and exposure auditing as a proposed core security boundary.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. The idea directly addresses shared-agent privacy with explicit identity, isolation, audit, and residual-risk boundaries.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: All changed paths are RFC documentation, so runtime behavior proof is not applicable; RFC lifecycle and maintainer architecture review are the relevant gates.

Evidence

Acceptance criteria:

  • [P1] git diff --check.
  • [P1] Verify the rfc_pr front-matter value is https://github.com/openclaw/rfcs/pull/30.

What I checked:

  • Required RFC pull-request metadata: The repository RFC lifecycle requires rfc_pr to point to the RFC pull request. The PR's supplied patch leaves that front-matter field blank. (rfcs/0010-acl-based-memory-partitioning.md:8, a925820bd766)
  • Repository RFC lifecycle: Current repository guidance says draft RFCs should not merge, require a maintainer-discussion thread, and require rfc_pr to link to the RFC pull request. (README.md:78, af708f0ddb6f)
  • Current-main scope check: Current main has no RFC 0010 or memory-broker/memory-ACL document, so it does not already contain this exact proposed RFC. (af708f0ddb6f)
  • Enterprise architecture context: The accepted enterprise RFC establishes tenant isolation, authenticated identity, authorization, and audit boundaries, while explicitly keeping the existing gateway single-tenant; this RFC needs an explicit alignment decision before it defines shared-agent memory enforcement. (rfcs/0027-openclaw-enterprise.md:16, af708f0ddb6f)
  • RFC policy provenance: The current RFC-process guidance appears to date to the documentation update that added the lifecycle rules, with later sidecar-layout clarification retained on main. (README.md:78, e366ea9825a4)

Likely related people:

  • kevinlin-openai: Authored the accepted enterprise-platform RFC on current main, which owns the closest observed tenant identity, authorization, and audit architecture. (role: recent enterprise RFC contributor; confidence: high; commits: af708f0ddb6f, e366ea9825a4; files: rfcs/0027-openclaw-enterprise.md, README.md)
  • RomneyDa: Authored the sidecar-layout clarification that shapes how supporting RFC documents are organized in this repository. (role: recent RFC convention contributor; confidence: medium; commits: 3aa7d727383f; files: rfcs/0000-template.md, README.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Set rfc_pr to https://github.com/openclaw/rfcs/pull/30.
  • Obtain maintainer discussion and an explicit decision on the proposed core memory-security boundary.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-07-07T01:21:58.717Z sha 2350be0 :: needs real behavior proof before merge. :: [P3] Fill the RFC pull request metadata
  • reviewed 2026-07-07T01:58:42.289Z sha a925820 :: needs real behavior proof before merge. :: [P3] Fill the RFC pull request metadata
  • reviewed 2026-07-29T20:23:22.841Z sha a925820 :: needs real behavior proof before merge. :: [P3] Fill the RFC pull request metadata
  • reviewed 2026-07-30T08:39:11.065Z sha a925820 :: needs real behavior proof before merge. :: [P3] Fill the RFC pull request metadata
  • reviewed 2026-07-30T14:34:59.752Z sha a925820 :: needs real behavior proof before merge. :: [P3] Set the RFC pull-request metadata
  • reviewed 2026-08-01T15:20:00.518Z sha a925820 :: needs real behavior proof before merge. :: [P3] Set the RFC pull-request metadata

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 7, 2026
@clawsweeper clawsweeper Bot mentioned this pull request Jul 7, 2026
The Gateway caller-identity pattern established in openclaw/openclaw#96883
is the seam this RFC's session-scoped attribution builds on.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@clawsweeper clawsweeper Bot added the feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. label Jul 7, 2026
@clawsweeper clawsweeper Bot mentioned this pull request Jul 9, 2026

@giodl73-repo giodl73-repo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a thoughtful security model: session-scoped attribution, structural mounts, deny-by-default evaluation, transcript lineage, and the explicit exec ceiling are the right concerns. Before accepting the normative core, I think the storage identity and shared-workspace authority need to be made implementable across OpenClaw's supported platforms and deployment topologies.

Findings

  • [P1] Separate canonical principals from filesystem path keys. The RFC defines principals such as entra:{tenant_id}:{object_id} and then places {canonical_user_id} directly under memory/users/. Colons are invalid in Windows path components, and arbitrary IdP/channel identifiers can contain other unsafe or normalization-sensitive characters. Define a stable, versioned filesystem-key encoding (or opaque hash plus catalog mapping), with collision and migration behavior. ACL principal strings should never be interpolated directly into paths.

  • [P1] Define the physical storage and write authority for shared scopes. The proposed {workspace}/memory/{users,channels,shared,projections} tree assumes one workspace can safely contain every user's personal store plus tenant/channel state. Lobster today has per-user OneDrive-backed git workspaces; other deployments may have a shared agent root. The RFC needs an explicit topology contract separating user-owned personal storage, channel/workspace-owned storage, and tenant-admin-governed storage, then describing how the broker mounts views across those roots. In particular, who may write/promote/delete content in shared/? “Hand-editable Markdown” must not turn a user's repo write into an unaudited tenant-wide injection path.

  • [P2] Make projections explicit audience grants, not “all channels I am in.” The current rule dynamically exposes a projected item in every channel where the user is a live member. Joining a new channel can therefore widen an old sharing decision. Prefer a named channel/workspace audience, purpose, expiry, audience preview, and revocation. Live membership should constrain an explicit grant, not create one.

  • [P3] Complete the RFC lifecycle metadata. Keep the document draft until the normative security core is explicitly accepted, populate rfc_pr with this PR URL, and link the maintainer security/product discussion required by the repository process.

For the Lobster/shared-workspace direction, the key architectural question is whether permissions slice broker-mounted stores owned by different authorities, rather than relocating all private and shared bytes beneath one editable workspace root. Resolving that here will make the RFC usable by both local OpenClaw and enterprise hosts without weakening inspectability.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. and removed merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants