Deux lots regroupés sur la branche feat/absence-management. Suppression complète du portail client : - retire ROLE_CLIENT (security.yaml) ; User::getRoles() ajoute toujours ROLE_USER - supprime l'entité ClientTicket (+ repo, states, relations), User.client et User.allowedProjects, NotificationService, ProjectAllowedExtension, le bloc ROLE_CLIENT de MailAccessChecker - front : pages /portal, layout portal, composants client-ticket/, AdminClientTicketTab, services/dto/i18n/docs associés - fixtures : retire les users client-liot / client-acme - migration Version20260522110000 (drop client_ticket, user_allowed_projects, colonnes liées ; task_document.task_id -> NOT NULL) - tests : retire les cas obsolètes testant le blocage des clients sur le mail Module gestion des absences (WIP) : - entités / migrations (Version20260521160000, Version20260522090000) - pages absences.vue / team-absences.vue, composants frontend/components/absence/ - services front, AccrueLeaveCommand, PublicHolidayController Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
81 lines
3.1 KiB
YAML
81 lines
3.1 KiB
YAML
security:
|
|
role_hierarchy:
|
|
ROLE_ADMIN: [ROLE_USER]
|
|
|
|
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
|
password_hashers:
|
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
|
|
|
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
|
providers:
|
|
app_user_provider:
|
|
entity:
|
|
class: App\Entity\User
|
|
property: username
|
|
|
|
firewalls:
|
|
dev:
|
|
# Ensure dev tools and static assets are always allowed
|
|
pattern: ^/(_profiler|_wdt|assets|build)/
|
|
security: false
|
|
login:
|
|
pattern: ^/login_check
|
|
stateless: true
|
|
provider: app_user_provider
|
|
login_throttling:
|
|
max_attempts: 5
|
|
interval: '1 minute'
|
|
json_login:
|
|
check_path: /login_check
|
|
username_path: username
|
|
password_path: password
|
|
success_handler: lexik_jwt_authentication.handler.authentication_success
|
|
failure_handler: lexik_jwt_authentication.handler.authentication_failure
|
|
mcp:
|
|
pattern: ^/_mcp
|
|
stateless: true
|
|
provider: app_user_provider
|
|
custom_authenticators:
|
|
- App\Security\ApiTokenAuthenticator
|
|
api:
|
|
pattern: ^/api
|
|
stateless: true
|
|
provider: app_user_provider
|
|
jwt: ~
|
|
logout:
|
|
path: /api/logout
|
|
target: /login
|
|
enable_csrf: false
|
|
delete_cookies:
|
|
BEARER:
|
|
path: /
|
|
|
|
# Activate different ways to authenticate:
|
|
# https://symfony.com/doc/current/security.html#the-firewall
|
|
|
|
# https://symfony.com/doc/current/security/impersonating_user.html
|
|
# switch_user: true
|
|
|
|
# Note: Only the *first* matching rule is applied
|
|
access_control:
|
|
- { path: ^/login_check, roles: PUBLIC_ACCESS }
|
|
- { path: ^/api/docs, roles: PUBLIC_ACCESS }
|
|
# Version de l'application en public
|
|
- { path: ^/api/version, roles: PUBLIC_ACCESS, methods: [ GET ] }
|
|
- { path: ^/_mcp, roles: PUBLIC_ACCESS, methods: [ GET ] }
|
|
- { path: ^/_mcp, roles: IS_AUTHENTICATED_FULLY }
|
|
# Mail : requiert authentification (le check ROLE_USER est dans MailAccessChecker)
|
|
- { path: ^/api/mail, roles: IS_AUTHENTICATED_FULLY }
|
|
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
|
|
|
|
when@test:
|
|
security:
|
|
password_hashers:
|
|
# Password hashers are resource-intensive by design to ensure security.
|
|
# In tests, it's safe to reduce their cost to improve performance.
|
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
|
algorithm: auto
|
|
cost: 4 # Lowest possible value for bcrypt
|
|
time_cost: 3 # Lowest possible value for argon
|
|
memory_cost: 10 # Lowest possible value for argon
|