Commit graph

6 commits

Author SHA1 Message Date
Imugiii
5a4897921e feat(admin): throttle du PIN d'action sensible par acteur (RG-T22)
Some checks failed
CI / php-lint (push) Successful in 19s
CI / secret-scan (pull_request) Successful in 8s
CI / secret-scan (push) Successful in 10s
CI / static-tests (push) Successful in 30s
CI / php-lint (pull_request) Successful in 19s
CI / auto-merge (push) Has been skipped
CI / static-tests (pull_request) Successful in 30s
CI / auto-merge (pull_request) Failing after 4s
Ferme le finding HIGH de la revue Produits (#17) : le PIN d'action sensible
etait verifie sans limitation de tentatives. Conception via panel multi-agents
(3 lentilles + synthese + passe adversariale, holds=true) puis revue de
l'implementation (holds=true).

Dimension du throttle = UTILISATEUR AGISSANT (identite de session, RG-T02), pas
l'email cible (contournable par rotation) ni l'IP (collateral sur poste partage).
Table dediee pin_throttle (entite 22) STRICTEMENT SEPAREE des compteurs de login
(user.failed_login_attempts / login_throttle) : un echec de PIN n'incremente aucun
compteur de connexion (pas d'escalade DoS vers le login).

- db/migrations/0002_pin_throttle.sql : table cle sur actor_user_id (UNIQUE, FK
  -> user ON DELETE CASCADE), separee du login. Appliquee a la base dev.
- ThrottlePolicy : dimension 'pin' (bornes propres PIN_THROTTLE_*, 30s..300s, plus
  permissives que le login : controle de dissuasion, residuel Faible).
- PinThrottle (nouveau) : isLocked / recordFailure (upsert atomique + backoff, une
  transaction, miroir d'AuthService) / reset (UPDATE simple). N'ecrit jamais
  user/login_throttle/audit_log.
- PinVerifier::payTimingDecoy : parite de timing du chemin verrouille.
- ProductController update/destroy : gate AVANT verification (leurre + 422
  generique, pas de pin.failed sous verrou actif = borne anti-flood de l'audit) ;
  recordFailure sur PIN faux ; reset sur succes, cle sur l'acteur de SESSION.
- Docs Merise 21 -> 22 entites : RG-T22 (mlt), entite 22 pin_throttle
  (mcd/mld/dictionary), couverture MCT 22/22 (mct).
- .env.example + docker-compose : PIN_THROTTLE_THRESHOLD/BASE/MAX/WINDOW.
- Journal RNCP : docs/journal/2026-06-15--p3-throttle-pin-rg-t22.md.

Tests : 188 verts (525 assertions), PHPStan L6 propre.
2026-06-15 22:03:07 +00:00
Imugiii
de355da54c docs: journal entry for 2026-06-04 prod-like conception decisions
Records the alignment review of all project docs and the point-by-point
decision session: drop commande_event, English naming convention, VAT
carried by product (after BOFiP fact-check), real menu customization,
full ingredient configurator, allergen modal. Lists open points D4-D8.
2026-06-04 10:19:25 +00:00
Imugiii
b09c461e94 docs: journal entry for session 4 smoke test infra
Captures the full bottom-end-to-bottom-end validation of the Docker
stack on the deployment host: env file merge with the BYAN tooling,
FQDN switch from acadenice.fr to stark.a3n.fr (using the existing
wildcard DNS), and three corrective fixes that surfaced during
'make init' (explicit IPAM subnet for the saturated host, init: true
on the cron service for dcron PID 1, static healthz file outside the
src bind-mount).

Documents 4 reasoned decisions with alternatives, 5 anticipated jury
questions, 5 conscious points of improvement, and maps 6 RNCP 37805
criteria (1.e.4, 5.b, 7.a.1, 7.a.2, 7.b.3, 7.c.4).
2026-04-30 11:52:45 +00:00
Imugiii
ac8b6a6791 feat(docker): complete stack with compose and 4 services
Deliver the full Docker stack for Bloc 5 DevOps (Cr 7.c.3 and 7.c.4):

- docker/apache/    Custom httpd:2.4-alpine with hardened main config,
                    MPM event tuning and 3 vhosts (healthz, kiosk static,
                    admin reverse FCGI to wakdo-app:9000). Kiosk vhost
                    explicitly denies .php to enforce Bloc 1 isolation.
- docker/php-fpm/   Custom php:8.3-fpm-alpine3.20 with pdo_mysql, opcache,
                    intl, exif, zip and tini for signal handling.
                    Dynamic pool 3-10 workers listening on TCP 9000.
- docker/cron/      Custom alpine:3.20 with dcron, mariadb-client, gzip.
                    Nightly mysqldump at 03h00 with 14-day rotation and
                    512-byte sanity check. Purge and stats jobs templated.
- docker-compose.yml  4 services orchestrated on 2 networks (internal
                      bridge + external reverse-proxy). 2 named volumes
                      for DB and uploads, bind-mount for backups.
                      Traefik labels for 2 routers with HTTPS redirect.

Makefile adds `make backup` (manual dump) and `make backup-ls`.
.gitignore adds /var/ for backup bind-mount path.
docs/journal/2026-04-24--infra-docker.md documents 5 decisions with
alternatives, maps 16 RNCP criteria to artefacts and prepares 6 jury Q&A.

Validated: `docker compose config --quiet` passes. Smoke test deferred
to next session (requires server .env).
2026-04-24 15:59:19 +00:00
Imugiii
324f5cdb74 docs: add RNCP 37805 referentiel and fix Cr 4.f mappings
Add official RNCP 37805 PDF source and a searchable text index of all
92 criteres across Bloc 1, Bloc 2 and Bloc 5 (DevOps option).

Correct Cr 4.f.1 / Cr 4.f.4 mappings in the journal and PROJECT_CONTEXT
section 8: only Cr 4.f.2 covers Git as a tool-mastery artefact. The
other three Cr 4.f criteria are soft skills evaluated at the oral
(knowledge sharing, self-review, individual contribution report).
Correction applied after reading the primary source end to end.
2026-04-24 15:27:06 +00:00
Imugiii
c5c6bacfba docs: setup journal structure and session 1 retro
Ajout de la structure docs/journal/ pour les retrospectives par feature,
destinees a la preparation de l'oral RNCP et a la tracabilite de la demarche
pour le jury.

Contenu :
- docs/journal/README.md : index + template d'entree (what/why/how/criteres
  RNCP/Q&A jury/ameliorations conscientes)
- docs/journal/2026-04-23--cadrage-projet.md : retrospective complete de la
  session de cadrage (brief RNCP, PROJECT_CONTEXT, bootstrap Git, decisions
  d'architecture, transparence methodologie IA)
- .gitignore : ajout de /docs/notes/ pour la couche de notes techniques
  personnelles (revisions oral, non versionnees)
2026-04-24 08:47:56 +00:00