diff --git a/sources/patches/main-0001-Configure-LDAP-Authentication.patch b/sources/patches/main-0001-Configure-LDAP-Authentication.patch new file mode 100644 index 0000000..1a5175d --- /dev/null +++ b/sources/patches/main-0001-Configure-LDAP-Authentication.patch @@ -0,0 +1,57 @@ +From 257258faec6e760b8e9327e5d2f16d54520e797c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= +Date: Thu, 14 Mar 2024 23:21:36 +0100 +Subject: [PATCH 1/4] Configure LDAP Authentication + +--- + app/config/security.yml | 11 +++++++++++ + app/config/services.yml | 4 ++++ + 2 files changed, 15 insertions(+) + +diff --git a/app/config/security.yml b/app/config/security.yml +index 9ab51621..675d8905 100644 +--- a/app/config/security.yml ++++ b/app/config/security.yml +@@ -13,6 +13,14 @@ security: + property: username + fos_userbundle: + id: fos_user.user_provider.username_email ++ yunohost_users: ++ ldap: ++ service: yunohost.ldap ++ base_dn: ou=users,dc=yunohost,dc=org ++ search_dn: ++ search_password: ++ filter: (&(uid={username})(objectClass=posixAccount)) ++ default_roles: ROLE_USER + + # the main part of the security, where you can set up firewalls + # for specific sections of your app +@@ -39,6 +47,9 @@ security: + + secured_area: + pattern: ^/ ++ http_basic_ldap: ++ service: yunohost.ldap ++ dn_string: "uid={username},ou=users,dc=yunohost,dc=org" + form_login: + provider: fos_userbundle + csrf_token_generator: security.csrf.token_manager +diff --git a/app/config/services.yml b/app/config/services.yml +index 270e79d9..efdd34d5 100644 +--- a/app/config/services.yml ++++ b/app/config/services.yml +@@ -176,6 +176,10 @@ services: + tags: + - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } + ++ yunohost.ldap: ++ class: Symfony\Component\Ldap\LdapClient ++ arguments: ["localhost"] ++ + craue_config_cache_provider: + class: Symfony\Component\Cache\Adapter\FilesystemAdapter + public: false +-- +2.44.0 + diff --git a/sources/patches/main-0001-Add-logout-success-handler-for-yunohost.patch b/sources/patches/main-0002-Add-logout-success-handler-for-yunohost.patch similarity index 97% rename from sources/patches/main-0001-Add-logout-success-handler-for-yunohost.patch rename to sources/patches/main-0002-Add-logout-success-handler-for-yunohost.patch index 4fdbcbd..306f72f 100644 --- a/sources/patches/main-0001-Add-logout-success-handler-for-yunohost.patch +++ b/sources/patches/main-0002-Add-logout-success-handler-for-yunohost.patch @@ -1,7 +1,7 @@ From 2a08a2f7f34240a56a0f97f5c22905e5ab583323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 14 Mar 2024 23:24:52 +0100 -Subject: [PATCH 1/3] Add logout success handler for yunohost +Subject: [PATCH 2/4] Add logout success handler for yunohost --- app/config/security.yml | 2 +- @@ -15,12 +15,12 @@ index 675d8905..876f4471 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -63,7 +63,7 @@ security: - + logout: path: /logout - target: / + success_handler: yunohost.logout_success_handler - + two_factor: provider: fos_userbundle diff --git a/app/config/services.yml b/app/config/services.yml @@ -30,7 +30,7 @@ index efdd34d5..e073acc6 100644 @@ -176,6 +176,9 @@ services: tags: - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } - + + yunohost.logout_success_handler: + class: Wallabag\YunoHostBundle\Security\LogoutSuccessHandler + @@ -70,5 +70,6 @@ index 00000000..b3268243 + return new RedirectResponse($url); + } +} --- +-- 2.44.0 + diff --git a/sources/patches/main-0002-Workaround-for-Oauth-server.patch b/sources/patches/main-0003-Workaround-for-Oauth-server.patch similarity index 95% rename from sources/patches/main-0002-Workaround-for-Oauth-server.patch rename to sources/patches/main-0003-Workaround-for-Oauth-server.patch index 55033d5..69472e0 100644 --- a/sources/patches/main-0002-Workaround-for-Oauth-server.patch +++ b/sources/patches/main-0003-Workaround-for-Oauth-server.patch @@ -1,7 +1,7 @@ From 489a26f1971635a29abd402d2dc68002fa2e5583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 14 Mar 2024 23:26:29 +0100 -Subject: [PATCH 2/3] Workaround for Oauth server +Subject: [PATCH 3/4] Workaround for Oauth server --- .../oauth-server-bundle/Storage/OAuthStorage.php | 2 +- diff --git a/sources/patches/main-0003-fixup-Configure-LDAP-Authentication.patch b/sources/patches/main-0004-fixup-Configure-LDAP-Authentication.patch similarity index 92% rename from sources/patches/main-0003-fixup-Configure-LDAP-Authentication.patch rename to sources/patches/main-0004-fixup-Configure-LDAP-Authentication.patch index e3d6f91..893be2c 100644 --- a/sources/patches/main-0003-fixup-Configure-LDAP-Authentication.patch +++ b/sources/patches/main-0004-fixup-Configure-LDAP-Authentication.patch @@ -1,7 +1,7 @@ From 7b46eca04a7d65219228dd125d1a6d5737fa087a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 14 Mar 2024 23:36:08 +0100 -Subject: [PATCH 3/3] fixup! Configure LDAP Authentication +Subject: [PATCH 4/4] fixup! Configure LDAP Authentication --- app/config/security.yml | 2 +-