## Summary - add Intune RBAC role definitions and role assignments as foundation-backed inventory, backup, and versioned snapshot types - add RBAC-specific normalization, coverage, permission-warning handling, and preview-only restore safety behavior across existing Filament and service surfaces - add spec 127 artifacts, contracts, audits, and focused regression coverage for inventory, backup, versioning, verification, and authorization behavior ## Testing - `vendor/bin/sail bin pint --dirty --format agent` - `vendor/bin/sail artisan test --compact tests/Feature/Inventory/InventorySyncServiceTest.php tests/Feature/Filament/InventoryCoverageTableTest.php tests/Feature/FoundationBackupTest.php tests/Feature/Filament/RestoreExecutionTest.php tests/Feature/RestoreUnknownPolicyTypeSafetyTest.php tests/Unit/GraphContractRegistryTest.php tests/Unit/FoundationSnapshotServiceTest.php tests/Feature/Verification/IntuneRbacPermissionCoverageTest.php tests/Unit/IntuneRoleDefinitionNormalizerTest.php tests/Unit/IntuneRoleAssignmentNormalizerTest.php` ## Notes - tasks in `specs/127-rbac-inventory-backup/tasks.md` are complete except `T041`, which is the documented manual QA validation step Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #155
72 lines
2.3 KiB
PHP
72 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace App\Support\Providers;
|
|
|
|
final class ProviderReasonCodes
|
|
{
|
|
public const string ProviderConnectionMissing = 'provider_connection_missing';
|
|
|
|
public const string ProviderConnectionInvalid = 'provider_connection_invalid';
|
|
|
|
public const string ProviderCredentialMissing = 'provider_credential_missing';
|
|
|
|
public const string ProviderCredentialInvalid = 'provider_credential_invalid';
|
|
|
|
public const string ProviderConsentMissing = 'provider_consent_missing';
|
|
|
|
public const string ProviderAuthFailed = 'provider_auth_failed';
|
|
|
|
public const string ProviderPermissionMissing = 'provider_permission_missing';
|
|
|
|
public const string ProviderPermissionDenied = 'provider_permission_denied';
|
|
|
|
public const string ProviderPermissionRefreshFailed = 'provider_permission_refresh_failed';
|
|
|
|
public const string IntuneRbacPermissionMissing = 'intune_rbac.permission_missing';
|
|
|
|
public const string TenantTargetMismatch = 'tenant_target_mismatch';
|
|
|
|
public const string NetworkUnreachable = 'network_unreachable';
|
|
|
|
public const string RateLimited = 'rate_limited';
|
|
|
|
public const string UnknownError = 'unknown_error';
|
|
|
|
public const string IntuneRbacNotConfigured = 'intune_rbac.not_configured';
|
|
|
|
public const string IntuneRbacUnhealthy = 'intune_rbac.unhealthy';
|
|
|
|
public const string IntuneRbacStale = 'intune_rbac.stale';
|
|
|
|
/**
|
|
* @return array<int, string>
|
|
*/
|
|
public static function all(): array
|
|
{
|
|
return [
|
|
self::ProviderConnectionMissing,
|
|
self::ProviderConnectionInvalid,
|
|
self::ProviderCredentialMissing,
|
|
self::ProviderCredentialInvalid,
|
|
self::ProviderConsentMissing,
|
|
self::ProviderAuthFailed,
|
|
self::ProviderPermissionMissing,
|
|
self::ProviderPermissionDenied,
|
|
self::ProviderPermissionRefreshFailed,
|
|
self::IntuneRbacPermissionMissing,
|
|
self::TenantTargetMismatch,
|
|
self::NetworkUnreachable,
|
|
self::RateLimited,
|
|
self::UnknownError,
|
|
self::IntuneRbacNotConfigured,
|
|
self::IntuneRbacUnhealthy,
|
|
self::IntuneRbacStale,
|
|
];
|
|
}
|
|
|
|
public static function isKnown(string $reasonCode): bool
|
|
{
|
|
return in_array($reasonCode, self::all(), true) || str_starts_with($reasonCode, 'ext.');
|
|
}
|
|
}
|