-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
808b8d4
commit b67f0ff
Showing
4 changed files
with
65 additions
and
7 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
sources/patches/main-0001-Configure-LDAP-Authentication.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
From 257258faec6e760b8e9327e5d2f16d54520e797c Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <[email protected]> | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 2a08a2f7f34240a56a0f97f5c22905e5ab583323 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <[email protected]> | ||
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 | ||
|
2 changes: 1 addition & 1 deletion
2
...in-0002-Workaround-for-Oauth-server.patch → ...in-0003-Workaround-for-Oauth-server.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 489a26f1971635a29abd402d2dc68002fa2e5583 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <[email protected]> | ||
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 +- | ||
|
2 changes: 1 addition & 1 deletion
2
...fixup-Configure-LDAP-Authentication.patch → ...fixup-Configure-LDAP-Authentication.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 7b46eca04a7d65219228dd125d1a6d5737fa087a Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <[email protected]> | ||
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 +- | ||
|