6.0.0-git
2019-05-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 2012-11-13 (2384 days ago)
Due
Updated 2016-08-11 (1017 days ago)
Assigned
Resolved 2016-08-11 (1017 days ago)
Milestone Horde_Core 2.25.1
Patch Yes

History
2016-08-11 10:05:22 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ Horde_Core 2.25.1
 
2016-08-11 10:04:51 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
2016-08-11 10:04:50 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
2016-08-11 09:54:11 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.
2016-08-10 16:14:51 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]
2016-08-10 13:44:32 Jan Schneider Comment #16 Reply to this comment

[Show Quoted Text - 15 lines]
This patch doesn't apply against the latest Horde_Core package.
2016-08-04 18:50:42 heinz (at) htl-steyr (dot) ac (dot) at Comment #15 Reply to this comment
ticket #12299 could now use the findUserDN function
2016-08-04 18:49:49 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

2016-08-04 18:48:40 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
2016-08-04 18:46:54 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


2016-02-11 15:51:43 Jan Schneider State ⇒ Accepted
 
2016-01-28 16:06:02 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.
2013-06-11 18:13:37 heinz (at) htl-steyr (dot) ac (dot) at Comment #10 Reply to this comment
pong
2013-03-14 17:02:22 heinz (at) htl-steyr (dot) ac (dot) at Comment #9 Reply to this comment
ping
2013-01-30 16:04:27 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).

2013-01-30 14:41:24 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().
2013-01-30 14:40:51 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
2013-01-30 14:40:45 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
2013-01-30 14:40:39 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
2012-11-15 14:37:38 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
2012-11-15 09:47:02 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
There was no patch attached.
2012-11-13 17:44:10 heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 2. Medium
Summary ⇒ Refactored LDAP Prefs driver using Horde_Ldap
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
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