Skip to content

fix(auth): reject scoped capability re-rooting#189

Open
marcus-pousette wants to merge 1 commit into
fix/auth-docwide-writes-onlyfrom
fix/auth-stable-delegation-roots
Open

fix(auth): reject scoped capability re-rooting#189
marcus-pousette wants to merge 1 commit into
fix/auth-docwide-writes-onlyfrom
fix/auth-stable-delegation-roots

Conversation

@marcus-pousette

@marcus-pousette marcus-pousette commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

A delegated capability was allowed to choose a different subtree root when the receiver's current ancestry said it was a descendant of the proof root. That ancestry can change as operations arrive, so different peers could disagree about whether the delegation was valid.

What changes

  • A non-document-wide proof may delegate only at the same root.
  • It may still narrow actions and time bounds, reduce maxDepth, or add exclusions.
  • A document-wide proof may still delegate a narrower root.
  • The mutable scope evaluator is no longer treated as authority for delegation.
  • Scope evaluators remain available for read checks.

Fast paths

  • Scoped delegation uses direct root and restriction comparisons with no tree lookup.
  • Document-wide re-rooting remains supported.
  • Same-root narrowing remains supported.

Tests

  • same-root scoped delegation can narrow permissions
  • scoped proofs cannot re-root even when current ancestry appears to allow it
  • document-wide proofs can delegate a narrower root
  • action, time, depth, and exclusion restrictions remain enforced

Stack

Stacked on #188.

@marcus-pousette marcus-pousette force-pushed the fix/auth-docwide-writes-only branch from da5ddf4 to bff75b8 Compare July 11, 2026 22:30
@marcus-pousette marcus-pousette force-pushed the fix/auth-stable-delegation-roots branch 2 times, most recently from 8e0d3c0 to a60fc61 Compare July 11, 2026 23:00
@marcus-pousette marcus-pousette added bug Something isn't working area:auth Authorization, capabilities, proofs, signatures, crypto, and privacy labels Jul 12, 2026
@marcus-pousette marcus-pousette force-pushed the fix/auth-docwide-writes-only branch from db233a2 to d3f633a Compare July 12, 2026 12:18
@marcus-pousette marcus-pousette force-pushed the fix/auth-stable-delegation-roots branch from a60fc61 to 93b6c16 Compare July 12, 2026 12:18
@marcus-pousette marcus-pousette changed the title fix(auth): make delegated roots ancestry-independent fix(auth): reject scoped capability re-rooting Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:auth Authorization, capabilities, proofs, signatures, crypto, and privacy bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant