diff --git a/public/integrazioniext.html b/public/integrazioniext.html
index 7c76c56..af4fbb2 100644
--- a/public/integrazioniext.html
+++ b/public/integrazioniext.html
@@ -264,6 +264,8 @@
+ | POST | /token | read:all | Token exchange: API Key → JWT 15 min. lg231 usa questo JWT per le chiamate successive. |
+ | POST | /sso | sso:login (o read:all) | SSO federato: passa email + ruolo + responsabilità → JWT NIS2 2h. Utente creato se non esiste. Auditato. |
| GET | /status | — | Health check piattaforma, versione, DB. Nessuna auth. |
| GET | /compliance-summary | read:compliance | Score NIS2 aggregato (0-100), domain scores Art.21, rischi aperti, incidenti |
| GET | /risks/feed | read:risks | Registro rischi con livello ISO 27005, status, area. Filtri: ?level=high,critical&status=open |
@@ -394,6 +396,37 @@ $incidents = Nis2Client::get('/incidents/feed', $apiKey
// reference_id: $inc['id']
}
+ 3b. SSO federato — apertura diretta NIS2 da lg231
+
+ Quando un utente lg231 clicca "Apri NIS2" dal suo dashboard, lg231 chiama
+ POST /api/services/sso e redirige l'utente su NIS2 già autenticato,
+ portando con sé ruolo e responsabilità. Ogni accesso SSO è tracciato nell'audit trail.
+
+ // In lg231, quando l'utente clicca "Apri NIS2 Agile":
+$ssoResp = Nis2Client::post('/sso', $apiKey, [
+ 'user_email' => $currentUser['email'],
+ 'user_name' => $currentUser['first_name'] . ' ' . $currentUser['last_name'],
+ 'user_role' => 'compliance_manager', // mappa da ruolo lg231
+ 'caller_system' => 'lg231',
+ 'caller_user_id' => $currentUser['id'],
+ 'responsibilities' => [
+ ['area' => 'MOG 231', 'scope' => 'art.24-bis criminalità informatica'],
+ ['area' => 'OdV', 'scope' => 'monitoraggio cyber risk'],
+ ],
+]);
+
+if ($ssoResp['success']) {
+ $jwt = $ssoResp['data']['data']['token'];
+ $redirectUrl = $ssoResp['data']['data']['redirect_url'];
+ // Redirect con token nel fragment (sicuro, non nel server log)
+ header('Location: ' . $redirectUrl . '#sso_token=' . urlencode($jwt));
+}
+
+ NIS2 lato frontend: in dashboard.html aggiungere:
+ const ssoToken = location.hash.match(/#sso_token=([^&]+)/)?.[1];
+ if (ssoToken) { localStorage.setItem('nis2_token', ssoToken); location.hash = ''; }
+
+
Checklist implementazione lg231
- company-ms: aggiungere
nis2_api_key, nis2_org_id, nis2_enabled a provider-config