TenantAtlas/app/Services/Intune
ahmido 92a36ab89e SCOPE-001: DB-level workspace isolation via workspace_id (#112)
Implements Spec 093 (SCOPE-001) workspace isolation at the data layer.

What changed
- Adds `workspace_id` to 12 tenant-owned tables and enforces correct binding.
- Model write-path enforcement derives workspace from tenant + rejects mismatches.
- Prevents `tenant_id` changes (immutability) on tenant-owned records.
- Adds queued backfill command + job (`tenantpilot:backfill-workspace-ids`) with OperationRun + AuditLog observability.
- Enforces DB constraints (NOT NULL + FK `workspace_id` → `workspaces.id` + composite FK `(tenant_id, workspace_id)` → `tenants(id, workspace_id)`), plus audit_logs invariant.

UI / operator visibility
- Monitor backfill runs in **Monitoring → Operations** (OperationRun).

Tests
- `vendor/bin/sail artisan test --compact tests/Feature/WorkspaceIsolation`

Notes
- Backfill is queued: ensure a queue worker is running (`vendor/bin/sail artisan queue:work`).

Spec package
- `specs/093-scope-001-workspace-id-isolation/` (plan, tasks, contracts, quickstart, research)

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #112
2026-02-14 22:34:02 +00:00
..
AppProtectionPolicyNormalizer.php feat/009-app-protection-policy (#11) 2025-12-29 16:11:50 +00:00
AuditLogger.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
BackupService.php feat: always capture policy when adding to backup (#22) 2026-01-02 14:33:29 +00:00
CompliancePolicyNormalizer.php feat(007): device config & compliance snapshot/restore improvements (#9) 2025-12-29 12:46:20 +00:00
ConfigurationPolicyTemplateResolver.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
DefaultPolicyNormalizer.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
DeviceConfigurationPolicyNormalizer.php feat(007): device config & compliance snapshot/restore improvements (#9) 2025-12-29 12:46:20 +00:00
EnrollmentAutopilotPolicyNormalizer.php feat/027-enrollment-config-subtypes (#31) 2026-01-04 13:25:15 +00:00
FoundationMappingService.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
FoundationSnapshotService.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
GroupPolicyConfigurationNormalizer.php feat(010): Administrative Templates – restore from PolicyVersion + version visibility (#13) 2025-12-30 01:50:05 +00:00
ManagedDeviceAppConfigurationNormalizer.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
PolicyCaptureOrchestrator.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
PolicyNormalizer.php fix: improve assignment capture/restore and filter name handling (#8) 2025-12-28 13:59:12 +00:00
PolicySnapshotService.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
PolicySyncService.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
PolicyTypeNormalizer.php fix: improve assignment capture/restore and filter name handling (#8) 2025-12-28 13:59:12 +00:00
RbacHealthService.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
RbacOnboardingService.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
RestoreDiffGenerator.php feat/011-restore-run-wizard (#17) 2025-12-31 19:14:59 +00:00
RestoreRiskChecker.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
RestoreService.php Spec 081: Provider connection cutover (#98) 2026-02-08 11:28:51 +00:00
ScriptsPolicyNormalizer.php feat/026-custom-compliance-scripts (#29) 2026-01-04 02:28:29 +00:00
SettingsCatalogCategoryResolver.php dev-merges/c709b36 (#3) 2025-12-21 23:15:12 +00:00
SettingsCatalogDefinitionResolver.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
SettingsCatalogPolicyNormalizer.php feat/017-policy-types-mam-endpoint-security-baselines (#23) 2026-01-03 02:06:35 +00:00
SnapshotValidator.php Intune RBAC: graceful unsupported-account handling, health-check fixes, tests and docs updates 2025-12-13 01:25:06 +01:00
TenantConfigService.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
TenantPermissionService.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
TenantRequiredPermissionsViewModelBuilder.php Spec 083: Required permissions hardening (canonical /admin/tenants, DB-only, 404 semantics) (#101) 2026-02-08 23:13:25 +00:00
TermsAndConditionsNormalizer.php feat/024-terms-and-conditions (#30) 2026-01-04 03:01:11 +00:00
VersionDiff.php feat: TenantPilot v1 - Complete implementation (Phases 1-12) 2025-12-12 02:27:54 +01:00
VersionService.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
WindowsDriverUpdateProfileNormalizer.php feat/018-driver-updates-wufb (#27) 2026-01-04 00:38:54 +00:00
WindowsFeatureUpdateProfileNormalizer.php feat/012-windows-update-rings (#18) 2026-01-01 10:44:17 +00:00
WindowsQualityUpdateProfileNormalizer.php feat/012-windows-update-rings (#18) 2026-01-01 10:44:17 +00:00
WindowsUpdateRingNormalizer.php feat/012-windows-update-rings (#18) 2026-01-01 10:44:17 +00:00