Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 57652 invoked from network); 5 Jan 2007 22:18:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jan 2007 22:18:49 -0000 Received: (qmail 49788 invoked by uid 500); 5 Jan 2007 22:18:54 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 49757 invoked by uid 500); 5 Jan 2007 22:18:54 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 49746 invoked by uid 99); 5 Jan 2007 22:18:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2007 14:18:54 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of foravneet@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2007 14:18:45 -0800 Received: by nf-out-0910.google.com with SMTP id o25so8535451nfa for ; Fri, 05 Jan 2007 14:18:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tjZK5rBUiXRdgYiErB00F5hKkbMG91oonuGki6SlegmuI6CYH1/E3TgiHp5TxyfuaVix/91jyXk2sxMPQg8AVEtq4PyCDKkcaAytIqb46EhZOBHTYsNHbSyOiLhWW3eF8wcpQ0HnNp/gZ3zbsrfVav9ZVZIBdRgE4pu6EwAR2L0= Received: by 10.82.153.5 with SMTP id a5mr4289888bue.1168035502615; Fri, 05 Jan 2007 14:18:22 -0800 (PST) Received: by 10.82.163.16 with HTTP; Fri, 5 Jan 2007 14:18:22 -0800 (PST) Message-ID: <5d1d05550701051418q62775d31o2cebf4304f6d4690@mail.gmail.com> Date: Fri, 5 Jan 2007 14:18:22 -0800 From: "Avneet Singh" To: "Apache Directory Developers List" , elecharny@iktek.com Subject: Re: getting DISTINCT attribute values In-Reply-To: <459ECB99.3060406@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_32164_4338203.1168035502563" References: <5d1d05550701051348g4a83f305jb0c5adc21fb10df7@mail.gmail.com> <459ECB99.3060406@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_32164_4338203.1168035502563 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Emmanuel Thanks.. So its not possible.. I understand static groups are more efficien= t but I need to be able to get info on dynamic groups too.. Actually I need to develop a software piece which can connect to any given customer's LDAP server.. which might have either static or dynamic groups, and do authorizations based on the group. So getting list of all dynamic groups in the system was important ( to help user give permissions to those groups) -Avneet Singh On 1/5/07, Emmanuel Lecharny wrote: > > Avneet Singh a =E9crit : > > > Hello & Happy New Year.. > > Question..How can i get list of distinct values for a given attribute > > in a > > node in ApacheDS > > > > For e.g If I want to know list of distinct 'departmentNumber' my users > > belong to, how can I do that? > > Well, such requests are not possible genuine on a Ldap server. However, > there are solutions : > store all the groups in a specific branch (dc=3DdepartmentNumber, ...) > where you will store all the distincts departments, and all the > associated attributes. > Then, each user will point to those entries using an alias. > > This will have many advantages : > 1) you will have a quick access to the departmentNumber elements > 2) you will be able to avoid suplication of values if you add some > information to those entries > 3) as soon as you modify one of these entries, all the users belonging > to those departments will be updated (not directly, but anyway) > > Just have in mind that a Ldap Server is not a SQL database, so you will > need to organize your data in a efficient way. > > > Querying all users and finding this programitically would be too much > > memory > > and time consuming.(and not feasible for large user base) > > sure. > > > My real requirement is to get list of all dynamic groups in ADS (in > above > > example 'Deparments' is the dynamic groups identified by the attribute > > 'departmentNumber'. That's why I need list of unique departmentNumbers.= ) > > > > Does ApacheDS provides a way to do this?? > > Natively, no. You will have to organize your data in a way that fits > your requests. Remember that the Ldap Protocol offers very limited > requests : you can only filter, but not gather information ( 'unique', > 'sort' and such operation are currently not included in the server. > However, we may extend the server by including extended requests or > controls to deal with such requests. Just ask for them :) > > Hope it helps and that I didn't missed something... > > Emmanuel > > --=20 Regds Avneet Singh 781-492-4449 ------=_Part_32164_4338203.1168035502563 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi Emmanuel
Thanks.. So its not possible.. I understand st= atic groups are more efficient but I need to be able to get info on dynamic= groups too..
Actually I need to develop a software piece wh= ich can connect to any given customer's LDAP server.. which might have = either static or dynamic groups, and do authorizations based on the group.
So getting list of all dynamic groups in the s= ystem was important ( to help user give permissions to those groups)=
-Avneet Singh
 
On 1/5/07, E= mmanuel Lecharny <elecharny@g= mail.com> wrote:
Avneet Singh a =E9crit :

= > Hello & Happy New Year..
> Question..How can i get list of d= istinct values for a given attribute
> in a
> node in ApacheDS
>
> For e.g If I want to= know list of distinct 'departmentNumber' my users
> belong t= o, how can I do that?

Well, such requests are not possible genuine o= n a Ldap server. However,
there are solutions :
store all the groups in a specific branch (dc= =3DdepartmentNumber, ...)
where you will store all the distincts departm= ents, and all the
associated attributes.
Then, each user will point t= o those entries using an alias.

This will have many advantages :
1) you will have a quick access= to the departmentNumber elements
2) you will be able to avoid suplicati= on of values if you add some
information to those entries
3) as soon = as you modify one of these entries, all the users belonging
to those departments will be updated (not directly, but anyway)

= Just have in mind that a Ldap Server is not a SQL database, so you will
= need to organize your data in a efficient way.

> Querying all use= rs and finding this programitically would be too much
> memory
> and time consuming.(and not feasible for large user= base)

sure.

> My real requirement is to get list of all d= ynamic groups in ADS (in above
> example 'Deparments' is the = dynamic groups identified by the attribute
> 'departmentNumber'. That's why I need list of unique d= epartmentNumbers.)
>
> Does ApacheDS provides a way to do this?= ?

Natively, no. You will have to organize your data in a way that fi= ts
your requests. Remember that the Ldap Protocol offers very limited
r= equests : you can only filter, but not gather information ( 'unique'= ;,
'sort' and such operation are currently not included in the s= erver.
However, we may extend the server by including extended requests or
= controls to deal with such requests. Just ask for them :)

Hope it he= lps and that I didn't missed something...

Emmanuel




--
Regds
Avneet Singh
781-492-444= 9=20 ------=_Part_32164_4338203.1168035502563--