diff options
Diffstat (limited to 'app/config')
-rw-r--r-- | app/config/config.yml | 51 | ||||
-rw-r--r-- | app/config/config_test.yml | 2 | ||||
-rw-r--r-- | app/config/parameters.yml.dist | 13 | ||||
-rw-r--r-- | app/config/parameters_test.yml | 1 | ||||
-rw-r--r-- | app/config/routing.yml | 44 | ||||
-rw-r--r-- | app/config/security.yml | 19 | ||||
-rw-r--r-- | app/config/services.yml | 6 | ||||
-rw-r--r-- | app/config/services_test.yml | 38 | ||||
-rw-r--r-- | app/config/tests/parameters_test.mysql.yml | 1 | ||||
-rw-r--r-- | app/config/tests/parameters_test.pgsql.yml | 1 | ||||
-rw-r--r-- | app/config/tests/parameters_test.sqlite.yml | 1 |
11 files changed, 149 insertions, 28 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index 8bef8312..bbcc682f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -46,7 +46,6 @@ twig: | |||
46 | doctrine: | 46 | doctrine: |
47 | dbal: | 47 | dbal: |
48 | driver: "%database_driver%" | 48 | driver: "%database_driver%" |
49 | driver_class: "%database_driver_class%" | ||
50 | host: "%database_host%" | 49 | host: "%database_host%" |
51 | port: "%database_port%" | 50 | port: "%database_port%" |
52 | dbname: "%database_name%" | 51 | dbname: "%database_name%" |
@@ -55,7 +54,6 @@ doctrine: | |||
55 | charset: "%database_charset%" | 54 | charset: "%database_charset%" |
56 | path: "%database_path%" | 55 | path: "%database_path%" |
57 | unix_socket: "%database_socket%" | 56 | unix_socket: "%database_socket%" |
58 | server_version: 5.6 | ||
59 | 57 | ||
60 | orm: | 58 | orm: |
61 | auto_generate_proxy_classes: "%kernel.debug%" | 59 | auto_generate_proxy_classes: "%kernel.debug%" |
@@ -79,10 +77,13 @@ doctrine_migrations: | |||
79 | 77 | ||
80 | # Swiftmailer Configuration | 78 | # Swiftmailer Configuration |
81 | swiftmailer: | 79 | swiftmailer: |
82 | transport: "%mailer_transport%" | 80 | transport: "%mailer_transport%" |
83 | host: "%mailer_host%" | 81 | username: "%mailer_user%" |
84 | username: "%mailer_user%" | 82 | password: "%mailer_password%" |
85 | password: "%mailer_password%" | 83 | host: "%mailer_host%" |
84 | port: "%mailer_port%" | ||
85 | encryption: "%mailer_encryption%" | ||
86 | auth_mode: "%mailer_auth_mode%" | ||
86 | spool: | 87 | spool: |
87 | type: memory | 88 | type: memory |
88 | 89 | ||
@@ -197,10 +198,17 @@ fos_oauth_server: | |||
197 | refresh_token_lifetime: 1209600 | 198 | refresh_token_lifetime: 1209600 |
198 | 199 | ||
199 | scheb_two_factor: | 200 | scheb_two_factor: |
200 | trusted_computer: | 201 | trusted_device: |
201 | enabled: true | 202 | enabled: true |
202 | cookie_name: wllbg_trusted_computer | 203 | cookie_name: wllbg_trusted_computer |
203 | cookie_lifetime: 2592000 | 204 | lifetime: 2592000 |
205 | |||
206 | backup_codes: | ||
207 | enabled: "%twofactor_auth%" | ||
208 | |||
209 | google: | ||
210 | enabled: "%twofactor_auth%" | ||
211 | template: WallabagUserBundle:Authentication:form.html.twig | ||
204 | 212 | ||
205 | email: | 213 | email: |
206 | enabled: "%twofactor_auth%" | 214 | enabled: "%twofactor_auth%" |
@@ -357,3 +365,30 @@ jms_serializer: | |||
357 | # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494 | 365 | # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494 |
358 | datetime: | 366 | datetime: |
359 | default_format: "Y-m-d\\TH:i:sO" # ATOM | 367 | default_format: "Y-m-d\\TH:i:sO" # ATOM |
368 | |||
369 | # see https://github.com/symfony/symfony-standard/pull/1133 | ||
370 | sensio_framework_extra: | ||
371 | router: | ||
372 | annotations: false | ||
373 | |||
374 | httplug: | ||
375 | clients: | ||
376 | wallabag_core: | ||
377 | factory: 'wallabag_core.http_client_factory' | ||
378 | config: | ||
379 | defaults: | ||
380 | timeout: 10 | ||
381 | plugins: ['httplug.plugin.logger'] | ||
382 | wallabag_core.entry.download_images: | ||
383 | factory: 'httplug.factory.auto' | ||
384 | plugins: ['httplug.plugin.logger'] | ||
385 | wallabag_import.pocket.client: | ||
386 | factory: 'httplug.factory.auto' | ||
387 | plugins: | ||
388 | - 'httplug.plugin.logger' | ||
389 | - header_defaults: | ||
390 | headers: | ||
391 | 'content-type': 'application/json' | ||
392 | 'X-Accept': 'application/json' | ||
393 | discovery: | ||
394 | client: false | ||
diff --git a/app/config/config_test.yml b/app/config/config_test.yml index fc067ff4..216f8431 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml | |||
@@ -1,6 +1,7 @@ | |||
1 | imports: | 1 | imports: |
2 | - { resource: config_dev.yml } | 2 | - { resource: config_dev.yml } |
3 | - { resource: parameters_test.yml } | 3 | - { resource: parameters_test.yml } |
4 | - { resource: services_test.yml } | ||
4 | 5 | ||
5 | framework: | 6 | framework: |
6 | test: ~ | 7 | test: ~ |
@@ -23,7 +24,6 @@ swiftmailer: | |||
23 | doctrine: | 24 | doctrine: |
24 | dbal: | 25 | dbal: |
25 | driver: "%test_database_driver%" | 26 | driver: "%test_database_driver%" |
26 | driver_class: "%test_database_driver_class%" | ||
27 | host: "%test_database_host%" | 27 | host: "%test_database_host%" |
28 | port: "%test_database_port%" | 28 | port: "%test_database_port%" |
29 | dbname: "%test_database_name%" | 29 | dbname: "%test_database_name%" |
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 6b0cb8e8..13e2584f 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist | |||
@@ -11,8 +11,6 @@ parameters: | |||
11 | # database_password: %env.database_password% | 11 | # database_password: %env.database_password% |
12 | 12 | ||
13 | database_driver: pdo_mysql | 13 | database_driver: pdo_mysql |
14 | database_driver_class: ~ | ||
15 | # database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver | ||
16 | database_host: 127.0.0.1 | 14 | database_host: 127.0.0.1 |
17 | database_port: ~ | 15 | database_port: ~ |
18 | database_name: wallabag | 16 | database_name: wallabag |
@@ -27,10 +25,13 @@ parameters: | |||
27 | 25 | ||
28 | domain_name: https://your-wallabag-url-instance.com | 26 | domain_name: https://your-wallabag-url-instance.com |
29 | 27 | ||
30 | mailer_transport: smtp | 28 | mailer_transport: smtp |
31 | mailer_host: 127.0.0.1 | 29 | mailer_user: ~ |
32 | mailer_user: ~ | 30 | mailer_password: ~ |
33 | mailer_password: ~ | 31 | mailer_host: 127.0.0.1 |
32 | mailer_port: false | ||
33 | mailer_encryption: ~ | ||
34 | mailer_auth_mode: ~ | ||
34 | 35 | ||
35 | locale: en | 36 | locale: en |
36 | 37 | ||
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 64e51976..257d2ace 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml | |||
@@ -8,4 +8,3 @@ parameters: | |||
8 | test_database_path: "%env(TEST_DATABASE_PATH)%" | 8 | test_database_path: "%env(TEST_DATABASE_PATH)%" |
9 | env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" | 9 | env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" |
10 | test_database_charset: utf8 | 10 | test_database_charset: utf8 |
11 | test_database_driver_class: ~ | ||
diff --git a/app/config/routing.yml b/app/config/routing.yml index 0bd2d130..d4defca0 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml | |||
@@ -51,3 +51,47 @@ craue_config_settings_modify: | |||
51 | 51 | ||
52 | fos_js_routing: | 52 | fos_js_routing: |
53 | resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" | 53 | resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" |
54 | |||
55 | 2fa_login: | ||
56 | path: /2fa | ||
57 | defaults: | ||
58 | _controller: "scheb_two_factor.form_controller:form" | ||
59 | |||
60 | 2fa_login_check: | ||
61 | path: /2fa_check | ||
62 | |||
63 | # redirect RSS feed to Atom | ||
64 | rss_to_atom_unread: | ||
65 | path: /{username}/{token}/unread.xml | ||
66 | defaults: | ||
67 | _controller: FrameworkBundle:Redirect:redirect | ||
68 | route: unread_feed | ||
69 | permanent: true | ||
70 | |||
71 | rss_to_atom_archive: | ||
72 | path: /{username}/{token}/archive.xml | ||
73 | defaults: | ||
74 | _controller: FrameworkBundle:Redirect:redirect | ||
75 | route: archive_feed | ||
76 | permanent: true | ||
77 | |||
78 | rss_to_atom_starred: | ||
79 | path: /{username}/{token}/starred.xml | ||
80 | defaults: | ||
81 | _controller: FrameworkBundle:Redirect:redirect | ||
82 | route: starred_feed | ||
83 | permanent: true | ||
84 | |||
85 | rss_to_atom_all: | ||
86 | path: /{username}/{token}/all.xml | ||
87 | defaults: | ||
88 | _controller: FrameworkBundle:Redirect:redirect | ||
89 | route: all_feed | ||
90 | permanent: true | ||
91 | |||
92 | rss_to_atom_tags: | ||
93 | path: /{username}/{token}/tags/{slug}.xml | ||
94 | defaults: | ||
95 | _controller: FrameworkBundle:Redirect:redirect | ||
96 | route: tag_feed | ||
97 | permanent: true | ||
diff --git a/app/config/security.yml b/app/config/security.yml index 02afc9ea..760b2550 100644 --- a/app/config/security.yml +++ b/app/config/security.yml | |||
@@ -31,12 +31,15 @@ security: | |||
31 | fos_oauth: true | 31 | fos_oauth: true |
32 | stateless: true | 32 | stateless: true |
33 | anonymous: true | 33 | anonymous: true |
34 | provider: fos_userbundle | ||
34 | 35 | ||
35 | login_firewall: | 36 | login_firewall: |
37 | logout_on_user_change: true | ||
36 | pattern: ^/login$ | 38 | pattern: ^/login$ |
37 | anonymous: ~ | 39 | anonymous: ~ |
38 | 40 | ||
39 | secured_area: | 41 | secured_area: |
42 | logout_on_user_change: true | ||
40 | pattern: ^/ | 43 | pattern: ^/ |
41 | form_login: | 44 | form_login: |
42 | provider: fos_userbundle | 45 | provider: fos_userbundle |
@@ -53,17 +56,27 @@ security: | |||
53 | path: /logout | 56 | path: /logout |
54 | target: / | 57 | target: / |
55 | 58 | ||
59 | two_factor: | ||
60 | provider: fos_userbundle | ||
61 | auth_form_path: 2fa_login | ||
62 | check_path: 2fa_login_check | ||
63 | |||
56 | access_control: | 64 | access_control: |
57 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 65 | - { path: ^/api/(doc|version|info|user), roles: IS_AUTHENTICATED_ANONYMOUSLY } |
58 | - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY } | ||
59 | - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY } | ||
60 | - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 66 | - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
67 | # force role for logout otherwise when 2fa enable, you won't be able to logout | ||
68 | # https://github.com/scheb/two-factor-bundle/issues/168#issuecomment-430822478 | ||
69 | - { path: ^/logout, roles: [IS_AUTHENTICATED_ANONYMOUSLY, IS_AUTHENTICATED_2FA_IN_PROGRESS] } | ||
61 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } | 70 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } |
62 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } | 71 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } |
63 | - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 72 | - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
73 | - { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY } | ||
64 | - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 74 | - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
75 | - { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY } | ||
76 | - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility | ||
65 | - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 77 | - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
66 | - { path: ^/settings, roles: ROLE_SUPER_ADMIN } | 78 | - { path: ^/settings, roles: ROLE_SUPER_ADMIN } |
67 | - { path: ^/annotations, roles: ROLE_USER } | 79 | - { path: ^/annotations, roles: ROLE_USER } |
80 | - { path: ^/2fa, role: IS_AUTHENTICATED_2FA_IN_PROGRESS } | ||
68 | - { path: ^/users, roles: ROLE_SUPER_ADMIN } | 81 | - { path: ^/users, roles: ROLE_SUPER_ADMIN } |
69 | - { path: ^/, roles: ROLE_USER } | 82 | - { path: ^/, roles: ROLE_USER } |
diff --git a/app/config/services.yml b/app/config/services.yml index 7b85d846..25bbe5dc 100644 --- a/app/config/services.yml +++ b/app/config/services.yml | |||
@@ -2,12 +2,6 @@ parameters: | |||
2 | lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber | 2 | lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber |
3 | 3 | ||
4 | services: | 4 | services: |
5 | # used for tests | ||
6 | filesystem_cache: | ||
7 | class: Doctrine\Common\Cache\FilesystemCache | ||
8 | arguments: | ||
9 | - "%kernel.cache_dir%/doctrine/metadata" | ||
10 | |||
11 | twig.extension.text: | 5 | twig.extension.text: |
12 | class: Twig_Extensions_Extension_Text | 6 | class: Twig_Extensions_Extension_Text |
13 | tags: | 7 | tags: |
diff --git a/app/config/services_test.yml b/app/config/services_test.yml new file mode 100644 index 00000000..1b3aff63 --- /dev/null +++ b/app/config/services_test.yml | |||
@@ -0,0 +1,38 @@ | |||
1 | services: | ||
2 | # see https://github.com/symfony/symfony/issues/24543 | ||
3 | fos_user.user_manager.test: | ||
4 | alias: fos_user.user_manager | ||
5 | public: true | ||
6 | |||
7 | fos_user.security.login_manager.test: | ||
8 | alias: fos_user.security.login_manager | ||
9 | public: true | ||
10 | |||
11 | wallabag_core.entry_repository.test: | ||
12 | alias: wallabag_core.entry_repository | ||
13 | public: true | ||
14 | |||
15 | wallabag_user.user_repository.test: | ||
16 | alias: wallabag_user.user_repository | ||
17 | public: true | ||
18 | |||
19 | filesystem_cache: | ||
20 | class: Doctrine\Common\Cache\FilesystemCache | ||
21 | arguments: | ||
22 | - "%kernel.cache_dir%/doctrine/metadata" | ||
23 | |||
24 | # fixtures | ||
25 | Wallabag\UserBundle\DataFixtures\: | ||
26 | resource: '../../src/Wallabag/UserBundle/DataFixtures/*' | ||
27 | tags: ['doctrine.fixture.orm'] | ||
28 | autowire: true | ||
29 | |||
30 | Wallabag\CoreBundle\DataFixtures\: | ||
31 | resource: '../../src/Wallabag/CoreBundle/DataFixtures/*' | ||
32 | tags: ['doctrine.fixture.orm'] | ||
33 | autowire: true | ||
34 | |||
35 | Wallabag\AnnotationBundle\DataFixtures\: | ||
36 | resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/*' | ||
37 | tags: ['doctrine.fixture.orm'] | ||
38 | autowire: true | ||
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml index 0b7b82eb..36b227fb 100644 --- a/app/config/tests/parameters_test.mysql.yml +++ b/app/config/tests/parameters_test.mysql.yml | |||
@@ -1,6 +1,5 @@ | |||
1 | parameters: | 1 | parameters: |
2 | test_database_driver: pdo_mysql | 2 | test_database_driver: pdo_mysql |
3 | test_database_driver_class: ~ | ||
4 | test_database_host: localhost | 3 | test_database_host: localhost |
5 | test_database_port: 3306 | 4 | test_database_port: 3306 |
6 | test_database_name: wallabag_test | 5 | test_database_name: wallabag_test |
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml index ea249324..60f51df6 100644 --- a/app/config/tests/parameters_test.pgsql.yml +++ b/app/config/tests/parameters_test.pgsql.yml | |||
@@ -1,6 +1,5 @@ | |||
1 | parameters: | 1 | parameters: |
2 | test_database_driver: pdo_pgsql | 2 | test_database_driver: pdo_pgsql |
3 | test_database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver | ||
4 | test_database_host: localhost | 3 | test_database_host: localhost |
5 | test_database_port: | 4 | test_database_port: |
6 | test_database_name: wallabag_test | 5 | test_database_name: wallabag_test |
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 64cd984b..2b92d579 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml | |||
@@ -1,6 +1,5 @@ | |||
1 | parameters: | 1 | parameters: |
2 | test_database_driver: pdo_sqlite | 2 | test_database_driver: pdo_sqlite |
3 | test_database_driver_class: ~ | ||
4 | test_database_host: localhost | 3 | test_database_host: localhost |
5 | test_database_port: | 4 | test_database_port: |
6 | test_database_name: ~ | 5 | test_database_name: ~ |