Repository navigation
rbac_plug: per-classid field mask default (sensitive fields, HubSPO D-IAM-3) - #1556
Conversation
…wn mask A role the authority declared no field mask for sees every field, and the union over a user's roles lets that role win. RbacBinding::with_class_field_defaults sets, per plugged classid, the mask such a role gets instead, so sensitive fields stay hidden unless a role's own mask names them (HubSPO D-IAM-3, POC). It is policy data keyed by classid: it replaces only the open default, never a declared mask, and is dropped outside the plug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
What
RbacBinding::with_class_field_defaults(Vec<(u16, WideFieldMask)>): for each plugged classid, the field mask a role gets when the authority declared no mask of its own for it.Why
A role with no declared mask sees every field (
ClassRbac::field_mask's open default).authorize_scoped/authorize_membershipstake the union over the user's roles, so one such role opens every field, sensitive ones included. HubSPO-rs D-IAM-3 needs sensitive properties hidden unless a role grants them.How
This is policy data keyed by classid, not a derivation:
field_mask_forresolves in this order: the role's own mask, then the class default, thenNone.Tests
rbac_plug::a_class_default_replaces_the_open_default_and_nothing_elseauthorize::plug_tests::a_class_default_keeps_sensitive_fields_out_of_the_union. Its first assertion pins the open behaviour without a default, so the test can tell the two cases apart.Disable run: with the class-default lookup removed, both tests fail. Restored, both pass.
Gates:
fmt --check,clippy -D warningson contract and rbac,lance-graph-rbactests, and dir-sim--features rbactests.Not in this PR
GrantSourceneeds a class-level mask; that is a follow-up PR in OGAR once this merges.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Generated by Claude Code