]> git.immae.eu Git - github/wallabag/wallabag.git/blame - app/config/security.yml
Add ldap
[github/wallabag/wallabag.git] / app / config / security.yml
CommitLineData
93fd4692 1security:
93fd4692 2 encoders:
fcb1fba5 3 FOS\UserBundle\Model\UserInterface: sha512
93fd4692 4
93fd4692 5 role_hierarchy:
2bc9cad7 6 ROLE_ADMIN: ROLE_USER
c3235553 7 ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
93fd4692 8
3b68f6ca 9 # /!\ This list is modified in WallabagUserBundle when LDAP is enabled
93fd4692 10 providers:
c3235553 11 administrators:
2bc9cad7
JB
12 entity:
13 class: WallabagUserBundle:User
14 property: username
a1691859 15 fos_userbundle:
08d6bedc 16 id: fos_user.user_provider.username_email
93fd4692
NL
17
18 # the main part of the security, where you can set up firewalls
19 # for specific sections of your app
20 firewalls:
5c895a7f
JB
21 # disables authentication for assets and the profiler, adapt it according to your needs
22 dev:
23 pattern: ^/(_(profiler|wdt)|css|images|js)/
24 security: false
25
fcb1fba5
NL
26 oauth_token:
27 pattern: ^/oauth/v2/token
28 security: false
4c5e5441 29
fcb1fba5
NL
30 api:
31 pattern: /api/.*
32 fos_oauth: true
33 stateless: true
cd1298d6 34 anonymous: true
fcb1fba5 35
c3235553 36 login_firewall:
2bc9cad7 37 pattern: ^/login$
c3235553
NL
38 anonymous: ~
39
3b68f6ca 40 # /!\ This section is modified in WallabagUserBundle when LDAP is enabled
d9169157 41 secured_area:
a1691859 42 pattern: ^/
d9169157 43 form_login:
a1691859 44 provider: fos_userbundle
5c895a7f 45 csrf_token_generator: security.csrf.token_manager
d9169157 46
2bc9cad7 47 anonymous: true
5a584614 48 remember_me:
2bc9cad7 49 secret: "%secret%"
5a584614 50 lifetime: 31536000
2bc9cad7
JB
51 path: /
52 domain: ~
5a584614 53
d9169157
J
54 logout:
55 path: /logout
56 target: /
c3235553 57
93fd4692 58 access_control:
88924980 59 - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY }
2b477030 60 - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY }
426bb453 61 - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY }
c3235553 62 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
fcb1fba5 63 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
1210dae1 64 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
a40a8038 65 - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
18c38dff 66 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
f3d0cb91 67 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
63e40f2d 68 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
f38e03dc 69 - { path: ^/annotations, roles: ROLE_USER }
152fcccd 70 - { path: ^/users, roles: ROLE_SUPER_ADMIN }
07c9b1c9 71 - { path: ^/, roles: ROLE_USER }