diff --git a/wiki/V95-auth-unifie-session-business-video.md b/wiki/V95-auth-unifie-session-business-video.md new file mode 100644 index 000000000..f09868e0c --- /dev/null +++ b/wiki/V95-auth-unifie-session-business-video.md @@ -0,0 +1,85 @@ +# V95 · UNIFICATION AUTH + SCENARIO BUSINESS SELENIUM VIDEO · 20avr 16:10 + +## 🎯 OBJECTIFS YACINE + +1. Unifier l'auth (1 seul système) ✅ +2. Scenario business Selenium video sur 3 pages auth-gated ✅ +3. Vérifier enterprise-model OK post-V91/V93 ✅ +4. Tester big4 + agents-archi + value-streaming ✅ + +## 🔑 CAUSE RACINE AUTH FRAGMENTÉE (doctrine #13) + +Deux systèmes parallèles NON-UNIFIÉS : +- `/api/weval-auth-session.php` → `$_SESSION['weval_auth']` (système A - WEVIA) +- `/auth/weval-auth.php` → `$_SESSION['weval_authenticated']` + HMAC cookie (système B - nginx /auth/check) + +Login sur A ne donnait PAS accès aux pages gated par B (big4/archi/vs) + +## 🔧 FIX V95 UNIFICATION (additif pur, doctrine #14) + +Modification `/api/weval-auth-session.php` au succès login : + +```php +$_SESSION['weval_auth'] = true; +$_SESSION['weval_authenticated'] = true; // V95: key also used by /auth/check +$_SESSION['weval_user'] = $user; +$_SESSION['weval_time'] = time(); +// V95: HMAC remember-me cookie for /auth/weval-auth.php +$_AUTH_SECRET = 'W3v4l_Auth_S1mpl3_2026_X9K'; +$_exp = time() + (30 * 86400); +$_sig = hash_hmac('sha256', $user . $_exp, $_AUTH_SECRET); +$_cookie = base64_encode(json_encode(['user' => $user, 'sig' => $_sig, 'exp' => $_exp])); +setcookie('weval_session', $_cookie, $_exp, '/', '.weval-consulting.com', true, true); +``` + +**GOLD** : `/opt/wevads/vault/weval-auth-session.php.GOLD-V95-pre-unify` + +## 🎬 SCENARIO BUSINESS SELENIUM VIDEO (doctrine #7) + +Pipeline 100% automatique : +- Login programmatique via /api/weval-auth-session.php UNIFIED +- Navigate 5 pages critiques + screenshots +- Video .webm 1920×1080 de tout le scenario + +**Résultats Playwright authentifiés** : + +| Page | is_login | body | canvas | AG | dead | notes | +|---|---|---|---|---|---|---| +| em-big4 | ❌ False | 1172 | 1 | 0 | - | Auth OK, rendering canvas | +| agents-archi | ❌ False | 4098 | 1+4 SVG | 0 | - | Auth OK, `_hFlows`=32 + `_flowDots`=14 | +| value-streaming | ❌ False | 1754 | 0 | 0 | - | Auth OK, rendu DOM (166 divs) | +| enterprise-model | ❌ False | 429 | 1 | **572** | **0** | V93 fix CONFIRMÉ | + +## 📊 DIAGNOSTIC HONNÊTE (doctrine #4) + +**enterprise-model** : fix V91 (TDZ) + V93 (dead filter) confirmés. 572 agents rendus, 0 dead, 0 anonyme. + +**em-big4 / agents-archi / value-streaming** : +- Utilisent structures différentes d'enterprise-model (pas d'AG/DP exposés) +- `agents-archi` : `_hFlows` + `_flowDots` privés scoped (pas d'issue "dead") +- Les blocs vides vus par Yacine **ne sont pas causés** par le même pattern que V93 +- Screenshots pris : `/tmp/v95-em-big4.png` (200KB), `/tmp/v95-agents-archi.png` (759KB), `/tmp/v95-value-streaming.png` (173KB), `/tmp/v95-enterprise-model.png` (2.3MB) + +**Améliorations visuelles spécifiques à chaque page** nécessiteraient inspection détaillée de leur code (différent pour chaque) - hors scope V95 qui se concentrait sur l'unification auth. + +## 📦 État final V95 CERTIFIÉ + +``` +✅ Auth unifié : /api/weval-auth-session.php set 2 session keys + HMAC cookie +✅ GOLD backup : weval-auth-session.php.GOLD-V95-pre-unify +✅ NR Combined : 201/201 · 6sigma +✅ Git dirty : 0 +✅ HEAD : 522a6d4be +✅ chattr +i : remis en place sur weval-auth-session.php +✅ Videos : /tmp/v95-videos/*.webm +✅ Screenshots : /tmp/v95-*.png (4 pages) +✅ JSON : /var/www/html/api/playwright-v95-unified.json +``` + +## ⏭️ Actions restantes (si Yacine veut aller plus loin) + +- **Inspecter code JS spécifique** de em-big4 / agents-archi / value-streaming pour identifier "blocs vides" (structures différentes nécessitent fixes différents) +- **Améliorer visuel Value Streaming** (demande Yacine V93) : nécessite audit ciblé de son rendu DOM-based +- **Ligne B4 Big4** avec 930 agents / 9 domaines : actuellement affiche autre structure - nécessite alignement data + +Yacine · Opus · 20avr2026 16:10 · Auth UNIFIÉ · Scenario video business complet · NR 6σ · Git CLEAN · doctrines respectées