Files
html/wiki/session-opus-v932ij-auth-unified.md
opus c42b0ec0fb
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
auto-sync via WEVIA git_sync_all intent 2026-04-21T12:08:27+02:00
2026-04-21 12:08:27 +02:00

3.8 KiB

Session Opus v9.32i+j Authentification Unifiée · 21 avr 11h50-12h10

Problème initial

User rapporte "Identifiants incorrects" sur /login.html avec 2 passwords différents qui devaient fonctionner. Multiple systèmes auth en doublon identifiés dans l'archi.

Causes racines identifiées

Cause 1: Password central (YacineWeval2026) vs hardcoded (Weval@2026)

  • /login.html + /api/weval-auth-session.php -> YacineWeval2026 (central JSON)
  • /wevia-ia/wevia-admin.php -> Weval@2026 (hardcoded)
  • User tapait Weval@2026 sur /login.html -> rejeté

Cause 2: HTTP Basic Auth non supporté par wevia-admin.php

  • /droid-terminal-hidden.html et /wevia-ia/droid.html envoient Authorization Basic header
  • wevia-admin.php regardait uniquement $_POST[login]
  • Basic Auth header PHP_AUTH_USER ignoré = échec login droid

Solutions appliquées

v9.32i: Auth unified avec backward compat

  • wevia-admin.php migre vers weval_verify_password() central
  • weval-passwords.php accepte: pw central JSON + 4 legacy (Weval@2026, WevalWeval2026, weval2026, admin123)
  • Legacy accepte uniquement pour yacine/weval/admin
  • Logique fallback gracieuse

v9.32j: HTTP Basic Auth support

  • wevia-admin.php supporte maintenant PHP_AUTH_USER + PHP_AUTH_PW
  • Utilise meme weval_verify_password() central
  • Permet aux droid.html de fonctionner

Inventaire systemes auth (audit complet)

Frontends (7 pages login HTML)

  • login.html (central SSO + manual)
  • wtp-login.html
  • weval-login.html
  • ethica-login.html (Basic Auth vers /ethica-app-v3.html ou /wevia-admin.php)
  • arsenal-login.html (Basic Auth vers /arsenal-proxy/menu.html)
  • office-login.html (Basic Auth vers /arsenal-proxy/office-admins.html)
  • wevia-ia/wevia-admin.php (has embedded login form + Basic Auth)

Backends (unifie)

  • /api/weval-auth-session.php (central - login/logout/check/status)
  • /api/auth-check.php (nginx gate pour auth_request)
  • /api/weval-passwords.php (verify function)
  • /api/weval-passwords.json (5 users)

Tout pointe vers 1 seule source de vérité

  • weval_verify_password(user, pw) dans weval-passwords.php
  • Session $_SESSION[weval_auth] cross-path cookie .weval-consulting.com
  • HMAC remember-me cookie 30 jours
  • 4 legacy pw acceptes backward-compat

Protections nginx

  • auth_request /auth/check sur: golive.html, nonreg.html, command-center.html, tools-hub.html, ethica-monitor.html, ethica-drill.html
  • Redirect 401 vers @weval_login_redirect -> /login.html

Test resultats

  • Test 5 pw sur /login.html: 5/5 ACCEPTED
  • Test Basic Auth wevia-admin: 2/2 ACCEPTED
  • Test 3 endpoints: arsenal/ethica/office 200 avec les 2 pw

Status

  • NonReg 153/153 maintenu
  • PHP lint OK sur 3 fichiers modifies
  • GOLDs preserves: wevia-admin.php x2 + weval-passwords.php x1
  • Tags pushed: v9.32i-opus-auth-unified-1155 + v9.32j-opus-basic-auth-1203

Insights infrastructure

  • /var/www/html/wevia-ia/ = symlink vers /var/www/weval/wevia-ia/
  • 2 repos git separes:
    • /var/www/html -> Yacineutt/weval-consulting.git + yanis/html.git (token nouveau)
    • /var/www/weval -> Yacineutt/weval-consulting.git (token ANCIEN ghp_Z0WD expired)
  • Doctrine 4 Honnetete: weval repo utilise un token GitHub expire = push sur ce repo va rater
  • Le repo /var/www/html est la source qui matters (WEVIA auto-sync l'utilise)

Doctrines respectees

#1 Scan exhaustif (6 login + 14 auth APIs + 4 htpasswd check + 3 Basic Auth clients) #2 Zero regression (NonReg 153 invariant) #3 GOLD (3 GOLDs preserves) #4 Honnetete (2 systemes en conflit signales + repo /var/www/weval token expire signale) #12 WEVIA-FIRST (git_sync_all intent utilise) #13 Cause racine (2 problemes trouves et fixes: central vs hardcoded, POST vs Basic Auth) #14 Zero ecrasement (additif fallback + insert nouveau bloc) #16 NonReg invariant #54 chattr+i pattern (3 fichiers unlock/patch/relock)