-
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?= <felix@piedallu.me> | ||
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
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
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