Skip to content

Preserve independent container permissions and ACL conditions - #368

Merged
SharonStrats merged 8 commits into
stagingfrom
fix/handle-multiaccess
Dec 1, 2026
Merged

SharonStrats merged 8 commits into
stagingfrom
fix/handle-multiaccess

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Handle folder-only, contents-only, and combined container access without changing unrelated permissions.

  • Update only the selected subject and requested scopes, preserving other subjects and targets.
  • Replace permissions in both scopes for combined updates, without retaining stale access modes.
  • Preserve existing ACL conditions when updating, splitting, or extending authorizations, even though SolidOS does not currently expose condition editing.
  • Generate valid N3 Patch and SPARQL Update requests, including safe handling of ambiguous blank-node conditions.

ACL conditions
Existing ACL conditions are preserved when changing a subject’s role or container scope. If an authorization is shared by multiple subjects, the planner can split it so the selected subject’s access changes without changing the others’ permissions or conditions.

Named and blank-node conditions are supported. When a blank-node condition cannot be uniquely identified for a patch, its condition data is copied for the changed subject while the original remains available to other subjects. Supported inherited conditions are also preserved when materializing a local ACL; unsupported condition types or properties cause an explicit error on that path.

SolidOS does not currently provide condition editing. This change preserves existing condition data; the pod server remains responsible for evaluating and enforcing it. Separate applicable grants may still provide access.

Added extensive unit tests and e2e tests.

@SharonStrats
SharonStrats requested a balanced review from Copilot November 30, 2026 18:38
@SharonStrats SharonStrats self-assigned this Nov 30, 2026
@SharonStrats SharonStrats added the bug Something isn't working label Nov 30, 2026

Copilot AI 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.

🟡 Changes recommended

ACL planning conflates contents-only and folder grants, potentially granting unintended descendant Write access while omitting folder access, and splitting grants with blank-node conditions causes serialization failures before PATCH.

2 open issues
What changed in this PR

This PR separates folder and contents permissions for the same agent in the access-control logic, aiming to preserve unrelated grants when one scope changes.

Changes:

  • Include contents-only rules when discovering direct container permissions.
  • Add folder-only revocation and share scope-aware authorization splitting.
  • Test preservation of other subjects and scopes, plus inherited contents revocation.
File Description
test/​resourceLogic.test.ts Adds the folder-only revocation mock.
test/​aclLogic.test.ts Tests scope separation, discovery, and permission preservation.
src/​types.ts Exposes planRevokeContainer in the ACL interface.
src/​acl/​aclLogic.ts Expands container discovery and implements scope-aware grant and revoke handling.

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
@SharonStrats
SharonStrats force-pushed the fix/handle-multiaccess branch from 8f45691 to bae22e2 Compare November 30, 2026 19:02
Prompt: various prompts around handling the acl for container access
so that we can effectively handle all options for container access
folder and contents, folder only, and contents only.

Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>

Copilot AI 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.

🟡 Changes recommended

Unresolved ACL update defects can broaden access across users or scopes, retain excessive permissions after downgrades, and drop authorization conditions.

5 open issues
2 resolved since last review

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
@SharonStrats
SharonStrats requested a balanced review from Copilot November 30, 2026 19:48
@SharonStrats SharonStrats changed the title handle multiple container access for same agent Preserve independent container permissions and ACL conditions Nov 30, 2026

Copilot AI 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.

🟡 Changes recommended

Unresolved ACL scope-handling bugs can grant unintended contents access to unselected subjects and preserve Write access after a requested downgrade.

2 open issues
5 resolved since last review

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
SharonStrats and others added 3 commits December 1, 2026 07:20
Prompt: multiple prompts to help address the PR feedback in the best way

Co-authored-by: Claude Opus 5.5 <claude-5.5-opus@openai.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🟡 Changes recommended

ACL updates still mishandle scope transitions and multi-target revocations, potentially retaining stale grants or removing unrelated access, while the protected-control guard can reject valid partial updates.

4 open issues
2 resolved since last review

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

🟡 Changes recommended

Splitting shared authorizations with blank-node metadata produces deletes that the dependency’s serializers reject, causing grant application to fail before the patch is sent.

1 open issue
4 resolved since last review

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
SharonStrats and others added 2 commits December 1, 2026 14:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

🔵 Needs a closer look

Human assessment is needed because disabling public read can delete shared condition data, leaving an unrelated access rule’s condition incomplete.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@SharonStrats
SharonStrats merged commit c0e6679 into staging Dec 1, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in SolidOS NLNet UI Dec 1, 2026
@SharonStrats
SharonStrats deleted the fix/handle-multiaccess branch December 1, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ACL - Solid logic needs to handle the case of multiple access on containers

2 participants