6.0.0-alpha10
5/15/25

[#11697] Refactored LDAP Prefs driver using Horde_Ldap
Summary Refactored LDAP Prefs driver using Horde_Ldap
Queue Horde Framework Packages
Queue Version Git master
Type Enhancement
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester heinz (at) htl-steyr (dot) ac (dot) at
Created 11/13/2012 (4566 days ago)
Due
Updated 08/11/2016 (3199 days ago)
Assigned
Resolved 08/11/2016 (3199 days ago)
Milestone Horde_Core 2.25.1
Patch Yes

History
08/11/2016 10:05:22 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ Horde_Core 2.25.1
 
08/11/2016 10:04:51 AM Git Commit Comment #20 Reply to this comment
Changes have been made in Git (master):

commit a013889cd1451c234b1c55bde420c0f2b97c2670
Author: Jan Schneider <jan@horde.org>
Date:   Thu Aug 11 12:03:36 2016 +0200

     uid is no longer required (Request #11697).

     Don't apply to FW_5_2 though, this is mostly cosmetic.

  horde/config/conf.xml | 2 --
  horde/package.xml     | 2 +-
  2 files changed, 1 insertion(+), 3 deletions(-)

http://github.com/horde/horde/commit/a013889cd1451c234b1c55bde420c0f2b97c2670
08/11/2016 10:04:50 AM Git Commit Comment #19 Reply to this comment
Changes have been made in Git (master):

commit d5ec2922df85674d6e4a018c558e5e9d340c784f
Author: Jan Schneider <jan@horde.org>
Date:   Thu Aug 11 11:55:50 2016 +0200

     [jan] Allow to specify user DN search parameters for LDAP with 
all bind methods (Request #11697, heinz@htl-steyr.ac.at).

  framework/Core/lib/Horde/Config.php             | 57 
+++++++++----------------
  framework/Core/lib/Horde/Core/Factory/Prefs.php |  2 +-
  framework/Core/package.xml                      |  4 +-
  3 files changed, 24 insertions(+), 39 deletions(-)

http://github.com/horde/horde/commit/d5ec2922df85674d6e4a018c558e5e9d340c784f
08/11/2016 09:54:11 AM Jan Schneider Comment #18 Reply to this comment
but i can't see any difference. What's wrong with my patch?
No idea what was going wrong. I was getting an error while patching, 
but just noticed that the patch still applied. Probably a PEBKAC.
08/10/2016 04:14:51 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #17
New Attachment: Horde_Config_git.patch Download
Reply to this comment
patch in comment 12 was against Horde_Core-2.25.0
now attached patch against git version

but i can't see any difference. What's wrong with my patch?

[Show Quoted Text - 16 lines]
08/10/2016 01:44:32 PM Jan Schneider Comment #16 Reply to this comment

[Show Quoted Text - 15 lines]
This patch doesn't apply against the latest Horde_Core package.
08/04/2016 06:50:42 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #15 Reply to this comment
ticket #12299 could now use the findUserDN function
08/04/2016 06:49:49 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #14
New Attachment: Factory_Prefs.patch Download
Reply to this comment
let LDAP-prefs backend use the Prefs configuration tab

08/04/2016 06:48:40 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #13
New Attachment: conf_xml.patch Download
Reply to this comment
Remove 'uid' setting from LDAP-preference setting
08/04/2016 06:46:54 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #12
New Attachment: Horde_Config.patch Download
Reply to this comment
I think that's a good idea actually, since we have to find the 
user's DN all over the place when using LDAP.
Added user parameters to all search modes  -> so findUserDN will work 
in all bind modes

user config parameter binddn/bindpw for searching user's DN is never 
used -> removed

I added this parameters with _configLDAPUser  because the funktion 
_configLDAPUser / the tag configldapuser is used in conf.xml for groups
maybe this function / the tag could be removed later


02/11/2016 03:51:43 PM Jan Schneider State ⇒ Accepted
 
01/28/2016 04:06:02 PM Jan Schneider Comment #11 Reply to this comment
Alternatively the $conf['ldap']['user']['uid'] and 
$conf['ldap']['user']['filter_type'] could be set
in all 'bindas' modes (in the global ldap configuration).
I think that's a good idea actually, since we have to find the user's 
DN all over the place when using LDAP.

See also ticket #12299.
06/11/2013 06:13:37 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #10 Reply to this comment
pong
03/14/2013 05:02:22 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #9 Reply to this comment
ping
01/30/2013 04:04:27 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #8 Reply to this comment
If we are using 'bindas' = 'anon' or 'bindas' = 'admin' then
$conf['ldap']['user']['filter_type'] is also unset.

I think it is important to use a filter for searching the user 
(searchfilter- or objectclass based)

Should i add filter_type (and the corresponding 'filter' respectively 
'objectclass' entry)
to the ldap preferencies configuration ( $conf[prefs][params] )?

Alternatively the $conf['ldap']['user']['uid'] and 
$conf['ldap']['user']['filter_type'] could be set
in all 'bindas' modes (in the global ldap configuration).

01/30/2013 02:41:24 PM Jan Schneider Comment #7 Reply to this comment
You cannot directly use findUserDN() because this expects the search 
key attribute in $params['user']['uid']. This is only used for (and 
only set when using) binding with the current user's credentials. For 
preferences there is $params['uid'] which must be used to find the 
user DN for the preference. This also answers your TODO in the 
constructor docs, why we need a separate 'uid' parameter.
Please update the current driver version from Git master to use a 
custom findUserDN().
01/30/2013 02:40:51 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 7d3bcbbfa44498d5986754b56e72218e2f2c0454
Author: Jan Schneider <jan@horde.org>
Date:   Wed Jan 30 15:36:50 2013 +0100

     Small tweaks (Request #11697).

  framework/Prefs/lib/Horde/Prefs/Storage/Ldap.php |   53 ++++++++++-----------
  1 files changed, 25 insertions(+), 28 deletions(-)

http://git.horde.org/horde-git/-/commit/7d3bcbbfa44498d5986754b56e72218e2f2c0454
01/30/2013 02:40:45 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit e1ac2c94b11be68cefa7964cb83594bd3ba71e35
Author: Jan Schneider <jan@horde.org>
Date:   Wed Jan 30 15:18:03 2013 +0100

     Those todos are looking fine actually (Request #11697).

  framework/Prefs/lib/Horde/Prefs/Storage/Ldap.php |    2 --
  1 files changed, 0 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/e1ac2c94b11be68cefa7964cb83594bd3ba71e35
01/30/2013 02:40:39 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 2b728b0984127742b8278b43ad28796cd755aabc
Author: Jan Schneider <jan@horde.org>
Date:   Wed Jan 30 15:16:23 2013 +0100

     [jan] Fix LDAP driver and use Horde_Ldap (Heinz Schweiger 
<heinz@htl-steyr.ac.at>, Request #11697).

  framework/Prefs/lib/Horde/Prefs/Storage/Ldap.php |  423 
++++++++--------------
  framework/Prefs/package.xml                      |    4 +-
  2 files changed, 151 insertions(+), 276 deletions(-)

http://git.horde.org/horde-git/-/commit/2b728b0984127742b8278b43ad28796cd755aabc
11/15/2012 02:37:38 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #3
New Attachment: Ldap.php Download
Reply to this comment
There was no patch attached.
Sorry

Heinz
11/15/2012 09:47:02 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
There was no patch attached.
11/13/2012 05:44:10 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Priority ⇒ 2. Medium
State ⇒ New
Patch ⇒ Yes
Milestone ⇒
Summary ⇒ Refactored LDAP Prefs driver using Horde_Ldap
Type ⇒ Enhancement
Queue ⇒ Horde Framework Packages
Reply to this comment
Hi
Since I am a longtime user of the horde, I will support the 
development of horde5.

At out site we use OPENLDAP-Dictinary to store users (also with theire 
horde preferences in an ou=horde under the users DN).

I have tried to extend horde prefs storage backend to use Horde_Ldap.

I would be happy my code improves horde.
Heinz

PS:
Horde_Core_Factory_Prefs, function create:  In the case of a 
Horde_Prefs_Storage_Ldap driver
the params for a newly created driverobject are taken from the 'ldap' 
configuration and not from the 'prefs' configuration.
So, only "Horde default" settings for ldap would work, "Custom 
settings" for Preferences are ignored.



Saved Queries