You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.0 KiB

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