[Owncloud] ldap groups in an addressbook

Arthur Schiwon blizzz at owncloud.com
Wed Apr 3 12:12:34 UTC 2013


Hey,

On 04/03/2013 01:48 PM, Nicolas Mora wrote:
> Hello,
>
> I'm currently working on a ldap backend for the addressbook of
> owncloud. The goal is to use a ldap server to store the contacts
> (obviously :p ).
> The work in progress can be seen there for now :
> https://github.com/babelouest/apps/blob/contacts_ldap/contacts/lib/backend/ldap.php
> https://github.com/babelouest/apps/blob/contacts_ldap/contacts/lib/ldap/connector.php
>
> I have a couple of questions about ldap and user_ldap.
> In my implementation, the connection between a ldap entry and a vcard
> is based on an xml configuration :
> https://github.com/babelouest/apps/blob/contacts_ldap/contacts/appinfo/ldap_vcard_connector.xml
> I'm currently using user_ldap but only for myself, without any groups,
> so I don't know how it works with groups and user list.

I did not go to deep into detail with your code, but I do not see any 
connection to user_ldap? Actually, I see you are doing the connections 
and things all by yourself, e.g. in 
https://github.com/babelouest/apps/blob/contacts_ldap/contacts/lib/backend/ldap.php#L329

I've also seen that you provide methods to create adressbooks. As of 
ownCloud 5, there is only one of it, but devided into sections or so. 
Georg could elaborate there.

> My first question is about groups.
> In general, do you know if there is an ldap attribute that could be
> connected to the VCard 'CATEGORIES' attribute ?
> There are the groups attributes (CN) in the DN, but these are part of
> the DN, so they can't be modified easily. I thought of 'o' or 'ou'
> attributes, but these may be used for different purposes, depending on
> the application behind.
> In you opinion, what should be the best way to connect the 'CATEGORIES'
> property into an ldap entry ?

I am not aware of an attribute that simply provides categories or tags. 
You may want to have it configurable as the desired values can be taken 
from different attributes in different scenarios.

> The second question is more technical and is about the ldap sizelimit
> attribute on the server. When an addressbook has more entries than the
> sizelimit, how do you manage this with user_ldap ? Do you perform
> multiple ldap_search as a workaround ?

Multiple searches do not work, because you cannot specify any Offset.
What we do is to use Paged Results, which requires PHP >= 5.4 and the 
feature activitad on the LDAP server. Paged results basically enable you 
to do searches with Limits and Offsets, but you get and need to provide 
a cookie for this. The necessary methods are part of PHP since 5.4.

> I have several ideas how to manage sizelimit parameters, but I still
> haven't found one yet.

Cheers
Arthur


>
> Thanks in advance for your help.
>
> /Nicolas
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
>



More information about the Owncloud mailing list