Repository navigation
ogar-rbac: GrantSource::scope_of (row scope from the grant source) - #323
Conversation
…profile is-a auth_store, like the Zitadel / Zanzibar / Ory Keto profiles. Claims: subject ID, roles RL, namespace NS; DB and AC narrow the scope. Paired with the lance-graph contract mirror row and AuthProvider::SurrealDb (merge together). Count pins moved 98 -> 99 (class_ids::ALL) and 4 -> 5 (Auth). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
A provider-agnostic hook, default None (global), so every existing source is unchanged. OgarRbac::row_scope delegates to it; authorize_scoped folds the scopes of the granting roles. Needs ScopePath from lance-graph (contract::rbac), so this lands after the paired lance-graph PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
SurrealDB's authorization (levels, Viewer/Editor/Owner, View/Edit, 21 resource kinds, the is_allowed_check rules, the ID/RL/NS/DB/AC claims) mapped onto the four axes, with nested levels as ScopePath on axis 3. Records what landed and the four things that still block the bit-for-bit equivalence probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe Auth vocabulary and canonical class registry now include the SurrealDB profile. RBAC grant sources can optionally provide role-bound row scopes, which OgarRbac forwards. New documentation describes SurrealDB IAM concepts, their mapping to OGAR, and identified equivalence gaps. ChangesSurrealDB IAM support
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: 🔵 Low · up to This PR adds a SurrealDB IAM profile and optional role-bound row scopes. The ogar-rbac crate will not build until the paired lance-graph PR 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 70.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 4 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
A rabbit reads the scope path with care, Comment |
|
The
Against the #1401 branch, Once #1401 merges, a re-run of this check should go green with no change here. Merge lance-graph#1401 first. Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SurrealDB was meant as a pattern to study, not as an auth provider of this stack. Drops the 0x0B05 mint, its class-view row, the count pins and the harvest doc. The generic GrantSource::scope_of hook stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
ClassRbac::row_scope(role, class)onOgarRbacalways returned the default scope, so a grant source had no way to supply axis-3 row scope. This PR addsGrantSource::scope_of(&self, role, class) -> Option<ScopeSpec>. It defaults toNone, so every existing source behaves as before.OgarRbac::row_scopedelegates to it.The new test
a_sources_row_scope_travels_with_the_decisionuses the nestedScopePathfrom AdaWorldAPI/lance-graph#1401, which has merged. Removing the delegation fails the test.This PR earlier also minted an
auth_surrealdb(0x0B05) profile and added a SurrealDB write-up. Both are removed: SurrealDB was a pattern to study, not a provider of this stack. The lance-graph mirror row comes out in the paired lance-graph PR.Tests
ogar-rbac: 8 pass. clippy-D warningsis clean forogar-rbac,ogar-vocabandogar-class-view.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg