2019-02-23 16:49:38 +01:00
|
|
|
security:
|
2019-03-14 18:01:41 +01:00
|
|
|
encoders:
|
2019-08-12 22:41:58 +02:00
|
|
|
App\Entity\UserSystem\User:
|
2019-06-16 12:59:11 +02:00
|
|
|
algorithm: auto
|
2019-03-14 18:01:41 +01:00
|
|
|
|
2019-02-23 16:49:38 +01:00
|
|
|
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
|
|
|
providers:
|
2020-01-07 19:25:19 +01:00
|
|
|
|
2019-03-14 18:01:41 +01:00
|
|
|
# used to reload user from session & other features (e.g. switch_user)
|
|
|
|
app_user_provider:
|
|
|
|
entity:
|
2019-08-12 22:41:58 +02:00
|
|
|
class: App\Entity\UserSystem\User
|
2019-03-14 18:01:41 +01:00
|
|
|
property: name
|
2019-02-23 16:49:38 +01:00
|
|
|
firewalls:
|
|
|
|
dev:
|
|
|
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
|
|
security: false
|
|
|
|
main:
|
2020-01-07 19:25:19 +01:00
|
|
|
anonymous: lazy
|
2019-10-26 23:22:27 +02:00
|
|
|
user_checker: App\Security\UserChecker
|
2019-02-23 16:49:38 +01:00
|
|
|
|
2019-12-23 18:45:32 +01:00
|
|
|
two_factor:
|
|
|
|
auth_form_path: 2fa_login
|
|
|
|
check_path: 2fa_login_check
|
|
|
|
csrf_token_generator: security.csrf.token_manager
|
|
|
|
|
2019-03-14 18:01:41 +01:00
|
|
|
# activate different ways to authenticate
|
2019-02-23 16:49:38 +01:00
|
|
|
|
2019-03-14 18:01:41 +01:00
|
|
|
#http_basic: true
|
|
|
|
# https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
|
2019-02-23 16:49:38 +01:00
|
|
|
|
|
|
|
# https://symfony.com/doc/current/security/form_login_setup.html
|
2019-03-14 18:01:41 +01:00
|
|
|
form_login:
|
|
|
|
login_path: login
|
|
|
|
check_path: login
|
|
|
|
csrf_token_generator: security.csrf.token_manager
|
|
|
|
use_referer: true
|
2019-09-12 17:50:33 +02:00
|
|
|
default_target_path: '/'
|
2019-03-14 18:01:41 +01:00
|
|
|
|
|
|
|
logout:
|
|
|
|
path: logout
|
|
|
|
target: homepage
|
2020-04-09 17:24:16 +02:00
|
|
|
handlers: [App\EventSubscriber\LogSystem\LogoutLoggerHandler]
|
2019-02-23 16:49:38 +01:00
|
|
|
|
2019-03-14 18:27:29 +01:00
|
|
|
remember_me:
|
|
|
|
secret: '%kernel.secret%'
|
|
|
|
lifetime: 2592000 # 30 days in seconds
|
|
|
|
|
2019-02-23 16:49:38 +01:00
|
|
|
# Easy way to control access for large sections of your site
|
|
|
|
# Note: Only the *first* access control that matches will be used
|
|
|
|
access_control:
|
2019-12-23 18:45:32 +01:00
|
|
|
# This makes the logout route available during two-factor authentication, allows the user to cancel
|
|
|
|
- { path: ^/logout, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
|
|
|
# This ensures that the form can only be accessed when two-factor authentication is in progress
|
2019-12-29 13:35:30 +01:00
|
|
|
- { path: "^/\\w{2}/2fa", role: IS_AUTHENTICATED_2FA_IN_PROGRESS }
|
|
|
|
# We get into trouble with the U2F authentication, if the calls to the trees trigger an 2FA login
|
|
|
|
# This settings should not do much harm, because a read only access to show available data structures is not really critical
|
|
|
|
- { path: "^/\\w{2}/tree", role: IS_AUTHENTICATED_ANONYMOUSLY }
|