Implémente la Story 1.4 du système d'authentification avec plusieurs couches de protection contre les attaques par force brute. Sécurité backend : - Authentification JWT avec access token (15min) + refresh token (7j) - Rotation automatique des refresh tokens avec détection de replay - Rate limiting progressif par IP (délai Fibonacci après échecs) - Intégration Cloudflare Turnstile CAPTCHA après 5 tentatives - Alerte email à l'utilisateur après blocage temporaire - Isolation multi-tenant (un utilisateur ne peut se connecter que sur son établissement) Frontend : - Page de connexion avec feedback visuel des délais et erreurs - Composant TurnstileCaptcha réutilisable - Gestion d'état auth avec stockage sécurisé des tokens - Tests E2E Playwright pour login, tenant isolation, et activation Infrastructure : - Configuration Symfony Security avec json_login + jwt - Cache pools séparés (filesystem en test, Redis en prod) - NullLoginRateLimiter pour environnement de test (évite blocage CI) - Génération des clés JWT en CI après démarrage du backend
119 lines
3.6 KiB
JSON
119 lines
3.6 KiB
JSON
{
|
|
"name": "classeo/backend",
|
|
"description": "Classeo - Backend API (Symfony 8 + API Platform)",
|
|
"type": "project",
|
|
"license": "proprietary",
|
|
"minimum-stability": "dev",
|
|
"prefer-stable": true,
|
|
"require": {
|
|
"php": ">=8.5",
|
|
"ext-ctype": "*",
|
|
"ext-iconv": "*",
|
|
"ext-intl": "*",
|
|
"api-platform/core": "^4.0",
|
|
"doctrine/dbal": "^4.0",
|
|
"doctrine/doctrine-bundle": "^2.13 || ^3.0@dev",
|
|
"doctrine/doctrine-migrations-bundle": "^3.4",
|
|
"doctrine/orm": "^3.3",
|
|
"lexik/jwt-authentication-bundle": "^3.2",
|
|
"nelmio/cors-bundle": "^2.6",
|
|
"ramsey/uuid": "^4.7",
|
|
"symfony/amqp-messenger": "^8.0",
|
|
"symfony/asset": "^8.0",
|
|
"symfony/console": "^8.0",
|
|
"symfony/doctrine-messenger": "^8.0",
|
|
"symfony/dotenv": "^8.0",
|
|
"symfony/flex": "^2",
|
|
"symfony/framework-bundle": "^8.0",
|
|
"symfony/http-client": "8.0.*",
|
|
"symfony/mailer": "8.0.*",
|
|
"symfony/messenger": "^8.0",
|
|
"symfony/monolog-bundle": "^4.0",
|
|
"symfony/property-access": "^8.0",
|
|
"symfony/property-info": "^8.0",
|
|
"symfony/rate-limiter": "8.0.*",
|
|
"symfony/runtime": "^8.0",
|
|
"symfony/security-bundle": "^8.0",
|
|
"symfony/serializer": "^8.0",
|
|
"symfony/twig-bundle": "^8.0",
|
|
"symfony/uid": "^8.0",
|
|
"symfony/validator": "^8.0",
|
|
"symfony/yaml": "^8.0"
|
|
},
|
|
"require-dev": {
|
|
"doctrine/doctrine-fixtures-bundle": "^4.0",
|
|
"friendsofphp/php-cs-fixer": "^3.65",
|
|
"phpat/phpat": "*",
|
|
"phpstan/phpstan": "^2.0",
|
|
"phpstan/phpstan-doctrine": "^2.0",
|
|
"phpstan/phpstan-symfony": "^2.0",
|
|
"phpunit/phpunit": "^11.0",
|
|
"symfony/browser-kit": "^8.0",
|
|
"symfony/css-selector": "^8.0",
|
|
"symfony/debug-bundle": "^8.0",
|
|
"symfony/maker-bundle": "^1.62",
|
|
"symfony/phpunit-bridge": "^8.0",
|
|
"symfony/stopwatch": "^8.0",
|
|
"symfony/web-profiler-bundle": "^8.0"
|
|
},
|
|
"config": {
|
|
"allow-plugins": {
|
|
"php-http/discovery": true,
|
|
"symfony/flex": true,
|
|
"symfony/runtime": true
|
|
},
|
|
"sort-packages": true,
|
|
"process-timeout": 600
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"App\\": "src/"
|
|
}
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"App\\Tests\\": "tests/"
|
|
}
|
|
},
|
|
"replace": {
|
|
"symfony/polyfill-ctype": "*",
|
|
"symfony/polyfill-iconv": "*",
|
|
"symfony/polyfill-php72": "*",
|
|
"symfony/polyfill-php73": "*",
|
|
"symfony/polyfill-php74": "*",
|
|
"symfony/polyfill-php80": "*",
|
|
"symfony/polyfill-php81": "*",
|
|
"symfony/polyfill-php82": "*",
|
|
"symfony/polyfill-php83": "*",
|
|
"symfony/polyfill-php84": "*"
|
|
},
|
|
"scripts": {
|
|
"auto-scripts": {
|
|
"cache:clear": "symfony-cmd",
|
|
"cache:warmup": "symfony-cmd",
|
|
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
|
},
|
|
"post-install-cmd": [
|
|
"@auto-scripts"
|
|
],
|
|
"post-update-cmd": [
|
|
"@auto-scripts"
|
|
],
|
|
"test": "phpunit",
|
|
"phpstan": "phpstan analyse --memory-limit=512M",
|
|
"arch": "phpstan analyse tests/Architecture --configuration=phpstan.neon --level=1",
|
|
"cs-fix": "php-cs-fixer fix",
|
|
"cs-check": "php-cs-fixer fix --dry-run --diff",
|
|
"warmup": "bin/console cache:warmup"
|
|
},
|
|
"conflict": {
|
|
"symfony/symfony": "*"
|
|
},
|
|
"extra": {
|
|
"symfony": {
|
|
"allow-contrib": false,
|
|
"require": "8.0.*"
|
|
}
|
|
}
|
|
}
|