chill-skeleton-basic/config/packages/security.yaml

41 lines
2.0 KiB
YAML
Raw Normal View History

2022-07-11 17:27:00 +00:00
security:
enable_authenticator_manager: true
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
password_hashers:
2023-12-14 21:31:09 +00:00
Chill\MainBundle\Entity\User: 'auto'
Symfony\Component\Security\Core\User\User: plaintext
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
2022-07-11 17:27:00 +00:00
providers:
# providers added by chill-bundles recipes
# those providers are required to make chill working
chill_chain_provider:
chain:
providers: [chill_in_memory, chill_users]
chill_in_memory:
2022-07-11 17:27:00 +00:00
memory:
users:
admin: { password: '%env(resolve:ADMIN_PASSWORD)%', roles: ['ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH', 'ROLE_USER'] }
chill_users:
2022-07-11 17:27:00 +00:00
id: chill.main.user_provider
# end of providers added by chill-bundles recipes
# all other providers might be removed, unless you have specific needs
# TODO AFTER CHILL-BUNDLES RECIPES INSTALL: remove the user providers which are not used
2022-07-11 17:27:00 +00:00
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
when@test:
security:
password_hashers:
# By default, password hashers are resource intensive and take time. This is
# important to generate secure password hashes. In tests however, secure hashes
# are not important, waste resources and increase test times. The following
# reduces the work factor to the lowest possible values.
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