Repository navigation
D-IAM-1 preset roles from the directory; D-IAM-3 per-property authorization contract - #42
Merged
Merged
Conversation
hubspo-port declares the six preset role names in RBAC_ROLES; the grants move to hubspo-iam::roles::Catalogue (one const grant per plugged concept per role, from a provisional verb table) and hubspo-iam::roles::bind binds the plug green. Field masks stay the default (D-IAM-3); actors come from the request's identity. Tenant permission sets and the verb table are open (ISS-PERMISSION-SETS-NOT-ROLES, ISS-PRESET-VERBS-PROVISIONAL). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
…contract hubspo_iam::roles::request_actors resolves a request's roles once from the directory through dir-sim's ViewActors (security-group grants from OGAR's group-role policy), refusing on an unread group. hubspo_iam::fields is the D-IAM-3 contract for ISS-PACKED-RUN-RBAC-GRAIN option (b): a read needs the outer WideFieldMask (lane, or position 0 for the packed run) and an inner grant by stable property ordinal. Projections compile once per request against one schema version; project drops hidden and unknown values, require refuses predicates over them, and a stale version refuses everything. Negative tests: school does not grant date_of_birth, gender, marital_status or military_status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
AdaWorldAPI
marked this pull request as ready for review
October 21, 2026 00:47
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e20ba1300d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ons) Codex on #42: a projection checked only the schema version, so a deal projection could read a contact row at the same version (deal ordinal 8 over contact ordinal 8, date_of_birth), and a revoked grant kept authorizing. Projections now record a Stamp (concept, schema version, PropertyGrants generation, outer PolicyVersion); project, require and admits take the current stamp and refuse any difference. PropertyGrants gains revoke and a generation bumped by every change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D-IAM-1: preset roles
hubspo_port::RBAC_ROLESnames six roles:crm_super_admin,crm_admin,crm_sales_user,crm_service_user,crm_marketing_userandcrm_view_only.hubspo-portkeeps only the plug declaration.hubspo_iam::roles::Catalogueis the OGARGrantSource: one grant per plugged concept (22) per role.roles::bind()bindsRBAC_PLUGagainst OGAR without errors.roles::request_actorsreuses dir-sim'sViewActors:GroupRoles::from_policy);ISS-PRESET-VERBS-PROVISIONAL). Tenant permission sets are open (ISS-PERMISSION-SETS-NOT-ROLES).D-IAM-3 contract (
ISS-PACKED-RUN-RBAC-GRAIN, option b)hubspo_iam::fieldsdecides a read with two masks, and both must allow it:WideFieldMask. It checks the property's lane, or position 0, which covers only the packed container;PropertyGrants, a set of stable property ordinals per role and concept. It never names a lane, so re-slotting a property changes no decision.Why not reuse the existing masks:
WideFieldMaskcannot represent the inner set. Its positions areu8, which cannot name contact's 272 ordinals, and it carries no schema version. So the inner set is a local type, and no upstream abstraction is added.How it is used:
Projection::compileruns once per request and concept. It records aStamp: concept, schema version, thePropertyGrantsgeneration and the outerPolicyVersion.projectdrops hidden and unknown properties;requirerefuses filters, sorts and aggregates over them;Not yet done: wiring into output paths, which do not exist yet, and default grants per role.
Tests
hubspo-iam: 24 unit tests (12 roles + 12 fields) and 3 directory integration tests.schoolexposes none ofdate_of_birth,gender,marital_statusormilitary_status, in output or in predicates.requirepassing hidden properties, cross-role mask combination, concept not stamped,admitsignoring the concept, revoke not bumping the generation;cargo fmt --check,cargo clippy -D warningsandcargo test --workspaceare green.🤖 Generated with Claude Code
https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z