Files
e-ticket/config/packages/security.yaml
Serreau Jovann 36456e8dfe Add rate limiting on login, order, invitation, contact routes
- Login: 5 attempts / 15 min (Symfony login_throttling)
- Order create: 10 / 5 min (sliding window)
- Invitation respond/register: 5 / 15 min
- Contact form: 3 / 10 min
- RateLimiterSubscriber with route-to-limiter mapping
- Returns 429 when rate limited

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 20:01:01 +01:00

48 lines
1.3 KiB
YAML

security:
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
providers:
app_user_provider:
entity:
class: App\Entity\User
property: email
firewalls:
dev:
pattern: ^/(_profiler|_wdt|assets|build)/
security: false
main:
lazy: true
provider: app_user_provider
login_throttling:
max_attempts: 5
interval: '15 minutes'
form_login:
login_path: app_login
check_path: app_login
enable_csrf: true
custom_authenticators:
- App\Security\KeycloakAuthenticator
entry_point: form_login
logout:
path: app_logout
target: app_home
role_hierarchy:
ROLE_ROOT: [ROLE_ORGANIZER, ROLE_USER]
ROLE_ORGANIZER: [ROLE_USER]
access_control:
- { path: ^/admin, roles: ROLE_ROOT }
- { path: ^/mon-compte, roles: ROLE_USER }
when@test:
security:
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
algorithm: auto
cost: 4
time_cost: 3
memory_cost: 10