Skip to content

fix: preserve authorization identity in access planning - #373

Open
SharonStrats wants to merge 3 commits into
stagingfrom
fix/preserve-authorization-identity
Open

SharonStrats wants to merge 3 commits into
stagingfrom
fix/preserve-authorization-identity

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary
Preserve authorization identity when changing container access, so editing one grant does not accidentally change other grants for the same subject.

Changes
Allow container access changes to target specific authorization IDs.
Respect those IDs when materializing inherited ACLs, expanding scopes, and swapping folder and contents access.
Preserve unselected grants and their conditions.
Avoid duplicate scope targets when merging or narrowing selected grants.
Remove orphaned authorizations when their final target is revoked.

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

Authorization ID filters are not consistently applied during inherited ACL materialization, scope expansion, and access swaps, causing unselected rules for the same subject to be revoked or rewritten.

3 open issues
What changed in this PR

This PR adds authorization-ID selection to container access planning, aiming to target individual rules rather than all rules for a subject.

Changes:

  • Add optional authorizationIds to container access changes.
  • Filter initial authorization matches by selected IDs.
  • Bump the package version to 6.2.2-3.
File Description
src/​types.ts Adds the authorization-ID selection field.
src/​acl/​aclLogic.ts Filters initial matches by authorization ID.
package.json Updates the package version.
package-lock.json Synchronizes package version metadata.

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/types.ts Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SharonStrats
SharonStrats force-pushed the fix/preserve-authorization-identity branch from b993e2a to 93f5388 Compare December 4, 2026 20:11
@SharonStrats
SharonStrats requested a balanced review from Copilot December 4, 2026 20:13

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 defects can drop distinct authorization grants during scope changes and produce invalid SPARQL DELETE templates when revoking rules with blank-node conditions.

2 open issues
3 resolved since last review

Review effort: Balanced

Comment thread src/acl/aclLogic.ts Resolved
Comment thread src/acl/aclLogic.ts Resolved

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

Final-target revocation with ambiguous blank-node conditions or a blank-node extension leaves authorization statements behind and can create unused copies.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread src/acl/aclLogic.ts
Comment on lines +827 to +829
const hasBlankNodeObjects = context.dataset.some(statement =>
statement.subject.value === authorization.id && statement.object.termType === 'BlankNode')
if (hasRemainingTargets || !hasBlankNodeObjects) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants