security.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. security:
  2. enable_authenticator_manager: true
  3. # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
  4. password_hashers:
  5. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
  6. # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
  7. providers:
  8. users_in_memory: { memory: null }
  9. firewalls:
  10. dev:
  11. pattern: ^/(_(profiler|wdt)|css|images|js)/
  12. security: false
  13. main:
  14. lazy: true
  15. provider: users_in_memory
  16. # activate different ways to authenticate
  17. # https://symfony.com/doc/current/security.html#the-firewall
  18. # https://symfony.com/doc/current/security/impersonating_user.html
  19. # switch_user: true
  20. # Easy way to control access for large sections of your site
  21. # Note: Only the *first* access control that matches will be used
  22. access_control:
  23. # - { path: ^/admin, roles: ROLE_ADMIN }
  24. # - { path: ^/profile, roles: ROLE_USER }
  25. when@test:
  26. security:
  27. password_hashers:
  28. # By default, password hashers are resource intensive and take time. This is
  29. # important to generate secure password hashes. In tests however, secure hashes
  30. # are not important, waste resources and increase test times. The following
  31. # reduces the work factor to the lowest possible values.
  32. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
  33. algorithm: auto
  34. cost: 4 # Lowest possible value for bcrypt
  35. time_cost: 3 # Lowest possible value for argon
  36. memory_cost: 10 # Lowest possible value for argon