6.7 KiB
6.7 KiB
Data Model — Intune RBAC Baseline Compare & Findings v1
Entities
Foundation Type Baseline Metadata
Config-defined metadata controlling whether a foundation type can participate in baseline compare.
- Source:
config/tenantpilot.phpfoundation rows, exposed throughInventoryPolicyTypeMeta - Required additions:
- explicit baseline-compare support flag
- optional compare identity strategy marker
- optional summary kind or compare label metadata if needed for consistent rendering
- Required behavior:
intuneRoleDefinitionis baseline-supportedintuneRoleAssignmentis baseline-unsupported
Baseline Scope Entry
The workspace-owned selection stored in BaselineProfile.scope_jsonb.
- Existing structure:
policy_types[]foundation_types[]
- New business rule:
foundation_types[]may containintuneRoleDefinitionfoundation_types[]must not containintuneRoleAssignmentthrough normal selection paths
- Validation:
- selected foundation types must exist in canonical metadata
- only baseline-supported foundation types are accepted
InventoryItem for Intune Role Definition
Tenant-owned latest-observed RBAC state used as the current compare anchor.
- Existing model/table:
InventoryItem - Ownership:
workspace_idNOT NULLtenant_idNOT NULL
- Identity:
tenant_id + policy_type + external_id- for this feature,
external_idis the primary compare identity
- Relevant fields:
policy_type = intuneRoleDefinitionexternal_iddisplay_namecategory = RBACplatform = allmeta_jsonb.is_built_inmeta_jsonb.role_permission_countlast_seen_atlast_seen_operation_run_id
PolicyVersion for Intune Role Definition
Immutable RBAC snapshot evidence reused for baseline references and diff rendering.
- Existing model/table:
PolicyVersion - Relevant fields:
tenant_idpolicy_idpolicy_type = intuneRoleDefinitionsnapshotwith Role Definition payloadcaptured_atversion_number
- Invariant:
- enough data exists to normalize display name, description, built-in/custom state, and permissions without live Graph calls
Baseline Snapshot Item for Intune Role Definition
Workspace-owned approved baseline reference used during compare.
- Existing model/table:
BaselineSnapshotItem - Relevant fields:
baseline_snapshot_idsubject_type = policyor a role-definition-specific variant if introduced narrowlysubject_external_idas workspace-safe referencesubject_keyupgraded to support stable Role Definition identity semanticspolicy_type = intuneRoleDefinitionbaseline_hashmeta_jsonb.display_namemeta_jsonb.evidence.*meta_jsonb.identity.external_idor equivalent explicit identity markermeta_jsonb.version_referenceor equivalent baseline PolicyVersion linkage
- Validation:
- baseline item must keep enough metadata to reconstruct evidence later
- baseline snapshot item must not store tenant identifiers directly
RBAC Role Definition Compare Result
Tenant-scoped transient compare outcome created during baseline compare.
- Computed attributes:
policy_type = intuneRoleDefinitionrole_definition_idclassification = unchanged | modified | missing | unexpectedseverity = low | medium | highbuilt_in_statediff_kind = metadata_only | permission_change | missing | unexpectedbaseline_hashcurrent_hashbaseline_policy_version_idnullablecurrent_policy_version_idnullable
RBAC Drift Finding
Persistent tenant-owned finding generated through the existing baseline.compare pipeline.
- Existing model/table:
Finding - Relevant fields:
tenant_idfinding_type = driftsource = baseline.comparescope_key = baseline_profile:{id}fingerprintrecurrence_keysubject_typesubject_external_idseveritystatustimes_seenevidence_jsonbcurrent_operation_run_id
- Invariant:
- unchanged identical drift does not create duplicate findings
- resolved recurrence reopens through the existing lifecycle rules
Baseline Compare RBAC Summary
Run-level summary stored in compare run context.
- Existing container:
OperationRun.context.baseline_compare - New summary node:
rbac_role_definitions.total_comparedrbac_role_definitions.unchangedrbac_role_definitions.modifiedrbac_role_definitions.missingrbac_role_definitions.unexpected
- Constraint:
- keep rich counts in
context; do not add non-canonical summary keys tosummary_counts
- keep rich counts in
Relationships
- A
BaselineProfilebelongs to one workspace and has one active scope definition. - A
BaselineProfilehas manyBaselineSnapshotrecords. - A
BaselineSnapshothas manyBaselineSnapshotItemrecords, includingintuneRoleDefinitionitems when selected. - A
Tenanthas manyInventoryItemrows and manyPolicyVersionrows forintuneRoleDefinition. - A
Tenanthas many baseline compareOperationRunrows and manyFindingrows. - A Role Definition compare result links one baseline snapshot item to zero or one current inventory row and zero or one current
PolicyVersion.
Invariants
intuneRoleDefinitionis the only RBAC foundation type eligible for baseline compare in this release.intuneRoleAssignmentmust never appear in baseline capture, compare summaries, or findings.- Role Definition identity is ID-based; same-name recreated objects with new IDs are drift.
- Compare uses normalized governance-relevant content, not raw transport payload shape.
- Metadata-only changes stay distinguishable from permission changes.
- Baseline evidence remains reconstructable without UI-time provider calls.
- Workspace-owned baseline artifacts must not persist tenant IDs.
- Tenant-owned compare runs and findings must remain workspace- and tenant-scoped.
State Transitions
Baseline support state
- unsupported
- supported and selectable in baseline profile
Role Definition compare classification
- unchanged
- modified
- missing
- unexpected
RBAC finding lifecycle
- new
- reopened
- resolved
- closed
Compare trust state
- full coverage proven
- partial coverage proven with suppression
- coverage unproven and findings suppressed
Validation Rules
- Baseline profile foundation selections must be a subset of explicitly baseline-supported foundation types.
- Baseline snapshot items for
intuneRoleDefinitionmust carry stable identity and evidence-ready references. - Role Definition compare must ignore transport-only noise and ordering differences in permission blocks.
- Severity mapping must follow the approved RBAC rule set.
- Assignment foundation type must fail closed for baseline-compare selection and result generation.