Skip to content

Enforce managed object scopes - #149

Draft
terrizoaguimor wants to merge 1 commit into
codex/rbac-api-keys-foundationfrom
codex/rbac-scope-enforcement
Draft

Enforce managed object scopes#149
terrizoaguimor wants to merge 1 commit into
codex/rbac-api-keys-foundationfrom
codex/rbac-scope-enforcement

Conversation

@terrizoaguimor

Copy link
Copy Markdown
Member

Changes

  • evaluate principal grants and API-key scope ceilings together against stable catalog object ancestry
  • retain bound SQL object IDs for prepared execute/deallocate authorization
  • retain an exact per-object permission map across staged structure, search, and vector operations, then reauthorize it at commit
  • keep scoped catalog pagination fail-closed until its cursor and traversal metadata are scope-opaque
  • normalize scoped PrepareSql and ExecuteSql failures so catalog binding cannot become an existence oracle
  • add negative scope, revocation, heterogeneous transaction, proof, catalog, and prepared lifecycle coverage

Why

The RBAC foundation stored durable scoped grants, but product admission still collapsed managed sessions to instance-wide bits. Prepared and explicit transaction work also lacked stable per-object authorization requirements.

Impact

This is a fail-closed implementation slice. It enables stable Object/Subtree enforcement for the catalog object/create/resolve surfaces, prepared reads, rich structures, search, proofs, and staged structure/search/vector commits. Direct scoped ExecuteSql, TransactionStageSql, AdminExplainSql, scalar default-keyspace binding, and scoped CatalogList remain explicitly open in the 1.2 roadmap.

Verification

  • cargo test -p hyphae-native-runtime --lib --locked (657 passed)
  • cargo test -p hyphae-native-product --locked (all passed)
  • cargo clippy -p hyphae-native-product --all-targets --locked -- -D warnings
  • cargo fmt --all -- --check
  • python3 tools/check_native_access_control.py
  • git diff --check

Dependency

Stacked on #148 at exact base 6f647b1. Merge #148 first, then retarget this PR to main.

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.

1 participant