|
1 | 1 | # Azure Phase 3 — Roadmap di completamento |
2 | 2 |
|
| 3 | +> **STATO AL 2026-06-09 (post-implementazione): ✅ chiusa lato cloud.** |
| 4 | +> La pipeline `HybridAgent producer → Service Bus → SealedBatchConsumerFunction → Azure SQL` |
| 5 | +> e la `EntraScanFunction` timer-driven sono state implementate, committate (commit |
| 6 | +> `3c53d39`), deployate su `dev3` e verificate (`az functionapp function list` → |
| 7 | +> 2 funzioni `EntraScan` + `SealedBatchConsumer`, zero eccezioni di startup in |
| 8 | +> App Insights). Unici task residui: (a) deploy operativo dell'HybridAgent su |
| 9 | +> almeno un server on-prem (servizio Windows con `appsettings.json` valorizzato, |
| 10 | +> + assegnazione SP come `hybridAgentPrincipalId` su `main.bicep`) e (b) |
| 11 | +> admin-consent delle permission Graph sulla MI `mi-func`. Tutto il codice |
| 12 | +> applicativo Azure-side è in produzione. |
| 13 | +
|
3 | 14 | > Generato il 2026-06-09 dopo la segnalazione _"sembra che l'hybrid worker non |
4 | 15 | > faccia mai la scansione su AD, e nemmeno la function faccia la scansione su |
5 | | -> Entra"_. Conferma: la segnalazione è corretta. Questo documento è |
| 16 | +> Entra"_. Conferma: la segnalazione era corretta. Questo documento è |
6 | 17 | > l'**unica** roadmap di riferimento per portare la pipeline di scansione |
7 | 18 | > Azure-side in produzione. |
8 | 19 |
|
|
14 | 25 | | Infra Bicep (Key Vault, App Config, SQL, Service Bus, Functions host) | ✅ Deployata | `Deploy-Azure.ps1 -EnvironmentName dev3` 33 risorse | |
15 | 26 | | `KeyVaultKekProvider` + `DekSealingService` (Functions) | ✅ Codice + DI | `Functions/Program.cs:65-90` | |
16 | 27 | | `HybridAgent.AdScanProducerJob` (Quartz job, seal & send) | ✅ Codice presente | `HybridAgent/Jobs/AdScanProducerJob.cs` | |
17 | | -| `HybridAgent.SealedBatchProcessor` (BackgroundService consumer SB) | ✅ Codice presente | `HybridAgent/Security/SealedBatchProcessor.cs` | |
| 28 | +| `HybridAgent.SealedBatchProcessor` (BackgroundService consumer SB) | ✅ Codice presente (usato solo per testing on-prem ↔ on-prem; in produzione il consumer è la Function Azure-side) | `HybridAgent/Security/SealedBatchProcessor.cs` | |
18 | 29 | | HybridAgent deployato su qualche server on-prem | ❓ **Da verificare con l'operatore** | Nessun deployment tracciato in `.azure/plan.md` | |
19 | 30 | | HybridAgent `appsettings.json` valorizzato (`Encryption:KeyVault:Uri`, `SealedBatch:ServiceBusFullyQualifiedNamespace`) | ❌ Vuoti nei file committati | `HybridAgent/appsettings.json` | |
20 | | -| Functions: classi `[Function]` (TimerTrigger, ServiceBusTrigger) | ❌ **Zero funzioni esistono** | `az functionapp function list -g rg-blkmon-dev3-italynorth -n func-blkmon-nsewij464oblc -o table` ⇒ `[]` | |
21 | | -| Functions Entra scanner (TimerTrigger) | ❌ Non implementato | Manca classe `EntraScanFunction` | |
22 | | -| Functions SB consumer per sealed batch da AD | ❌ Non implementato | Manca classe `SealedBatchConsumerFunction` | |
| 31 | +| Functions: classi `[Function]` (TimerTrigger, ServiceBusTrigger) | ✅ **2 funzioni live** | `az functionapp function list -g rg-blkmon-dev3-italynorth -n func-blkmon-nsewij464oblc -o table` ⇒ `EntraScan` + `SealedBatchConsumer` (verificato 2026-06-09 commit `3c53d39`) | |
| 32 | +| Functions Entra scanner (TimerTrigger) | ✅ Implementato | `Functions/Triggers/EntraScanFunction.cs` | |
| 33 | +| Functions SB consumer per sealed batch da AD | ✅ Implementato | `Functions/Triggers/SealedBatchConsumerFunction.cs` + handler condivisi `Core/Security/SealedBatchHandler.cs` + `Core/Security/IDekUnsealingFacade.cs` | |
23 | 34 | | Permessi Graph (`Device.Read.All`, `BitlockerKey.ReadBasic.All`) sul MI `mi-func` | ❌ Da concedere | Richiede admin consent del tenant | |
24 | 35 |
|
25 | 36 | **Cosa significa in pratica:** |
26 | | -- Nessuna scansione AD avviene oggi su nessun ambiente Azure, perché |
27 | | - l'HybridAgent — anche se compilato — gira solo in modalità heartbeat |
28 | | - (`AdScanProducerJob NOT scheduled` viene loggato all'avvio quando le due |
29 | | - config sono vuote) e, ammesso che venga deployato e configurato, non c'è |
30 | | - nessun consumer Service Bus lato Azure che persista i batch sigillati. |
31 | | -- Nessuna scansione Entra avviene mai, perché il progetto Functions non |
32 | | - contiene **nessuna** classe annotata `[Function]` — l'host gira a vuoto. |
| 37 | +- La pipeline cloud è **completa e in attesa di input dall'on-prem**. |
| 38 | + Appena il primo HybridAgent viene deployato con SP assegnata come |
| 39 | + `hybridAgentPrincipalId` su `main.bicep` (così riceve i ruoli `Key Vault Crypto User` |
| 40 | + scope-`encrypt-only` su `blkmon-agent-seal` + `Service Bus Data Sender` su |
| 41 | + queue `dek-sealed-batches`) e `appsettings.json` popolato, i batch sigillati |
| 42 | + iniziano a fluire e a essere persistiti su Azure SQL. |
| 43 | +- La scansione Entra parte automaticamente al primo trigger del CRON (default |
| 44 | + ogni 6h) appena viene concesso l'admin-consent delle permission Graph. |
| 45 | + Senza consent, l'host gira ma ogni chiamata Graph ritorna |
| 46 | + `Authorization_RequestDenied`. |
33 | 47 |
|
34 | 48 | ## 2. Architettura target (riepilogo) |
35 | 49 |
|
|
0 commit comments