mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
58 lines
2 KiB
Diff
58 lines
2 KiB
Diff
From 488b781e030637ab6feafc0da640217e1d654ead Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <felix@piedallu.me>
|
|
Date: Tue, 11 Jun 2024 11:50:36 +0200
|
|
Subject: [PATCH 1/3] Add ldap auth
|
|
|
|
---
|
|
app/config/security.yml | 12 ++++++++++++
|
|
app/config/services.yml | 7 +++++++
|
|
2 files changed, 19 insertions(+)
|
|
|
|
diff --git a/app/config/security.yml b/app/config/security.yml
|
|
index 9ab51621..f4ea3d47 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: Symfony\Component\Ldap\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,10 @@ security:
|
|
|
|
secured_area:
|
|
pattern: ^/
|
|
+ http_basic_ldap:
|
|
+ provider: yunohost_users
|
|
+ service: Symfony\Component\Ldap\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..c67341e8 100644
|
|
--- a/app/config/services.yml
|
|
+++ b/app/config/services.yml
|
|
@@ -394,3 +394,10 @@ services:
|
|
public: false
|
|
tags:
|
|
- { name: pagerfanta.view, alias: default_wallabag }
|
|
+
|
|
+ Symfony\Component\Ldap\Ldap:
|
|
+ arguments: ['@Symfony\Component\Ldap\Adapter\ExtLdap\Adapter']
|
|
+ tags: [ldap]
|
|
+ Symfony\Component\Ldap\Adapter\ExtLdap\Adapter:
|
|
+ arguments:
|
|
+ - host: localhost
|
|
--
|
|
2.45.1
|
|
|