TenantAtlas/app/Models
ahmido ef380b67d1 feat(104): Provider Permission Posture (#127)
Implements Spec 104: Provider Permission Posture.

What changed
- Generates permission posture findings after each tenant permission compare (queued)
- Stores immutable posture snapshots as StoredReports (JSONB payload)
- Adds global Finding resolved lifecycle (`resolved_at`, `resolved_reason`) with `resolve()` / `reopen()`
- Adds alert pipeline event type `permission_missing` (Alerts v1) and Filament option for Alert Rules
- Adds retention pruning command + daily schedule for StoredReports
- Adds badge mappings for `resolved` finding status and `permission_posture` finding type

UX fixes discovered during manual verification
- Hide “Diff” section for non-drift findings (only drift findings show diff)
- Required Permissions page: “Re-run verification” now links to Tenant view (not onboarding)
- Preserve Technical Details `<details>` open state across Livewire re-renders (Alpine state)

Verification
- Ran `vendor/bin/sail artisan test --compact --filter=PermissionPosture` (50 tests)
- Ran `vendor/bin/sail artisan test --compact --filter="FindingResolved|FindingBadge|PermissionMissingAlert"` (20 tests)
- Ran `vendor/bin/sail bin pint --dirty`

Filament v5 / Livewire v4 compliance
- Filament v5 + Livewire v4: no Livewire v3 usage.

Panel provider registration (Laravel 11+)
- No new panels added. Existing panel providers remain registered via `bootstrap/providers.php`.

Global search rule
- No changes to global-searchable resources.

Destructive actions
- No new destructive Filament actions were added in this PR.

Assets / deploy notes
- No new Filament assets registered. Existing deploy step `php artisan filament:assets` remains unchanged.

Test coverage
- New/updated Pest feature tests cover generator behavior, job integration, alerting, retention pruning, and resolved lifecycle.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #127
2026-02-21 22:32:52 +00:00
..
AlertDelivery.php feat(alerts): test message + last test status + deep links (#122) 2026-02-18 23:12:38 +00:00
AlertDestination.php feat(alerts): Monitoring cluster + v1 resources (spec 099) (#121) 2026-02-18 15:20:43 +00:00
AlertRule.php feat(104): Provider Permission Posture (#127) 2026-02-21 22:32:52 +00:00
AlertRuleDestination.php feat(alerts): Monitoring cluster + v1 resources (spec 099) (#121) 2026-02-18 15:20:43 +00:00
AuditLog.php feat: TenantPilot v1 - Complete implementation (Phases 1-12) 2025-12-12 02:27:54 +01:00
BackupItem.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
BackupSchedule.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
BackupSet.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
BaselineProfile.php Baseline governance UX polish + view Infolist (#123) 2026-02-19 23:56:09 +00:00
BaselineSnapshot.php Baseline governance UX polish + view Infolist (#123) 2026-02-19 23:56:09 +00:00
BaselineSnapshotItem.php Baseline governance UX polish + view Infolist (#123) 2026-02-19 23:56:09 +00:00
BaselineTenantAssignment.php Baseline governance UX polish + view Infolist (#123) 2026-02-19 23:56:09 +00:00
EntraGroup.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
EntraRoleDefinition.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
Finding.php feat(104): Provider Permission Posture (#127) 2026-02-21 22:32:52 +00:00
InventoryItem.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
InventoryLink.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
OperationRun.php feat(spec-087): remove legacy runs (#106) 2026-02-12 12:40:51 +00:00
PlatformUser.php feat: implement auth structure system panel (#77) 2026-01-27 21:49:18 +00:00
Policy.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
PolicyVersion.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
ProviderConnection.php 073-unified-managed-tenant-onboarding-wizard (#90) 2026-02-04 23:30:55 +00:00
ProviderCredential.php feat: unify provider connection actions and notifications (#73) 2026-01-25 01:01:37 +00:00
RestoreRun.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
SettingsCatalogCategory.php dev-merges/c709b36 (#3) 2025-12-21 23:15:12 +00:00
SettingsCatalogDefinition.php feat: merge 001-filament-json 2025-12-14 20:23:18 +01:00
StoredReport.php feat(104): Provider Permission Posture (#127) 2026-02-21 22:32:52 +00:00
Tenant.php Settings foundation: workspace controls (#119) 2026-02-16 01:11:24 +00:00
TenantMembership.php 062-tenant-rbac-v1 (#74) 2026-01-25 15:27:39 +00:00
TenantOnboardingSession.php Spec 076: Tenant Required Permissions (enterprise remediation UX) (#92) 2026-02-05 22:08:51 +00:00
TenantPermission.php SCOPE-001: DB-level workspace isolation via workspace_id (#112) 2026-02-14 22:34:02 +00:00
TenantRoleMapping.php 062-tenant-rbac-v1 (#74) 2026-01-25 15:27:39 +00:00
TenantSetting.php feat: Workspace settings slices v1 (backup, drift, operations) (#120) 2026-02-16 03:18:33 +00:00
User.php feat(spec-091): BackupSchedule lifecycle + create-CTA placement rule (#109) 2026-02-14 13:46:06 +00:00
UserTenantPreference.php feat/031-tenant-portfolio-context-switch (#32) 2026-01-04 21:28:08 +00:00
VerificationCheckAcknowledgement.php Spec 075: Verification Checklist Framework V1.5 (fingerprint + acknowledgements) (#93) 2026-02-05 21:44:19 +00:00
Workspace.php Settings foundation: workspace controls (#119) 2026-02-16 01:11:24 +00:00
WorkspaceMembership.php feat(spec-091): BackupSchedule lifecycle + create-CTA placement rule (#109) 2026-02-14 13:46:06 +00:00
WorkspaceSetting.php feat: Workspace settings slices v1 (backup, drift, operations) (#120) 2026-02-16 03:18:33 +00:00