- Migration: ajoute sp_route/mode/is_reboot_channel/is_dynamic_dm sur teams_channels,
cree table teams_channel_rules (match resp/domain/env/msg_type/hostname pattern)
- Service teams_service.py: format texte plat compatible workflows existants,
write_sharepoint_notification (ecrit fichier .txt dans <sp_base>/<sp_route>/),
resolve_channel_for_server rules-based avec priorite reboot,
send_notification orchestre resolution + envoi
- Settings UI: CRUD canaux etendu (mode SP/webhook + flags reboot/dyn_dm),
CRUD regles avec match conditions, sharepoint_notif_path en secret app,
bouton Test ecrit fichier .txt en mode SP
- Mode is_dynamic_dm: prefixe le contenu par 'TO: <email>' pour permettre
un workflow PA unique qui dispatch dynamiquement aux responsables
- Pas d'OAuth requis: PatchCenter ecrit fichiers, Workflows PA cote SharePoint
(deja en place pour le .exe) declenchent et postent sur Teams
Mode webhook conserve mais inactif tant qu'OAuth Entra ID pas mis en place chez SANEF
- Nginx: headers HSTS/X-Frame/nosniff/CSP, rate limit login 5r/m
- CSP: self only, unsafe-inline (Tailwind JIT), object-src none, pas de CDN externe
- Assets locaux: Tailwind/HTMX/Alpine.js téléchargés dans /static/js/
- ACL réseau: table allowed_networks administrable depuis Settings
- Fichier /etc/nginx/patchcenter_acl.conf régénéré auto depuis la base
- PostgreSQL: logs connexion/déconnexion, requêtes lentes >1s, max 50 conn
- REVOKE CREATE pour user patchcenter, role readonly créé
- SSH: clé only, 3 tentatives, pas de TCP forwarding
- Backup toutes les 30min, rétention 3 jours
- Application 100% hors ligne (aucune dépendance internet côté navigateur)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Permissions 100% depuis user_permissions (plus de hardcode)
- Middleware injecte perms dans chaque requête
- Créneaux auto: 09h-12h30 / 14h-16h45, pas 15min, hprod lun-mar, prod mer-jeu
- Assignations par défaut: par domaine, app_type, zone, serveur (table default_assignments)
- Auto-liaison app_group: même intervenant recette+prod
- Audit Splunk: /var/log/patchcenter_audit.json (JSON one-line par event)
- Login/logout/campagnes/prereqs loggés en base + fichier
- Page erreur maintenance (500/404) avec contact SecOps
- Accents français dans toute lUI
- Operator affiché comme Intervenant
- Session 1h, redirect / vers dashboard si connecté
- Demo mode prereqs (DEMO_MODE=True)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>