You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Rina Kotadia <ko...@gmail.com> on 2013/05/24 16:33:21 UTC
Change Sequence Number
Hi ,
We are synchronizing users/groups from ApacheDS to our database using JNDI.
Have following questions
Que 1) I wanted to know to take users and group created/updated after last
synchronization which attribute I can use for changes happen on server?
Que 2) I found one "Change Sequence Number".If I want to take last
committed "CSN" how I can get this?
Que 3) If I have nested groups and add one user in subgroup,how can I track
this change in parent group ?
Thank you.
--
Regards,
Rina
Re: Change Sequence Number
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 5/24/13 10:10 PM, Quanah Gibson-Mount a écrit :
> --On Saturday, May 25, 2013 1:36 AM +0530 Kiran Ayyagari
> <ka...@apache.org> wrote:
>
>>
>> Le 5/24/13 4:33 PM, Rina Kotadia a écrit :
>>
>>> Hi ,
>>> We are synchronizing users/groups from ApacheDS to our database using
>>> JNDI. Have following questions
>
> Using JNDI for LDAP is always a bad idea would be the other thing to
> note.
You mean, using the Apache LDAP API is probably a better choice ? ;-) I
concur...
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Change Sequence Number
Posted by Quanah Gibson-Mount <qu...@zimbra.com>.
--On Saturday, May 25, 2013 1:36 AM +0530 Kiran Ayyagari
<ka...@apache.org> wrote:
>
>
>
>
>
>
> On Fri, May 24, 2013 at 8:38 PM, Emmanuel Lécharny <el...@gmail.com>
> wrote:
>
> Le 5/24/13 4:33 PM, Rina Kotadia a écrit :
>
>> Hi ,
>> We are synchronizing users/groups from ApacheDS to our database using
>> JNDI. Have following questions
Using JNDI for LDAP is always a bad idea would be the other thing to note.
--Quanah
--
Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra :: the leader in open source messaging and collaboration
Re: Change Sequence Number
Posted by Kiran Ayyagari <ka...@apache.org>.
On Fri, May 24, 2013 at 8:38 PM, Emmanuel Lécharny <el...@gmail.com>wrote:
> Le 5/24/13 4:33 PM, Rina Kotadia a écrit :
> > Hi ,
> > We are synchronizing users/groups from ApacheDS to our database using
> JNDI.
> > Have following questions
> >
> > Que 1) I wanted to know to take users and group created/updated after
> last
> > synchronization which attribute I can use for changes happen on server?
>
> Every modified entry has an OperationalAttribute containing the date of
> the last modification. You can fetch all the modified entry with such a
> filter :
>
> (modifyTimeStamp>={last modification synchro})
>
> For instance :
>
> (modifyTimeStamp>=20130524145400.000Z) (gives back all the entry
> modified since may, 24, 2013, 14:54)
>
> Of course, if you added some entries, they won't have this
> modifyTimeStamp attribute. You can improve the former filter by
> convering this use case :
>
> (|(!(modifyTimestamp=*))(modifyTimeStamp>=20130524145400.000Z))
>
> >
> > Que 2) I found one "Change Sequence Number".If I want to take last
> > committed "CSN" how I can get this?
>
> This CSN is an internal attribute which is used for replication. You
> can't really get back the last one in LDAP.
>
> a small correction here, when replication is enabled(which is enabled by
default) the last created CSN is
stored in each partition's root under 'contextCSN' attribute
so you can use a filter like
(entryCSN>={value-of-the-contextCSN})
to get the last modified entries
Note: using JNDI without the syncrepl control the order of events is not
guaranteed
> >
> > Que 3) If I have nested groups and add one user in subgroup,how can I
> track
> > this change in parent group ?
> What is your data structure here ? Are the subgroups stored using the
> 'member' Attribute in the parent group ? If so, you won't be able to
> know that the parent group ha sbeen modified because one of its subgroup
> has been modified.
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
--
Kiran Ayyagari
http://keydap.com
Re: Change Sequence Number
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 5/24/13 4:33 PM, Rina Kotadia a écrit :
> Hi ,
> We are synchronizing users/groups from ApacheDS to our database using JNDI.
> Have following questions
>
> Que 1) I wanted to know to take users and group created/updated after last
> synchronization which attribute I can use for changes happen on server?
Every modified entry has an OperationalAttribute containing the date of
the last modification. You can fetch all the modified entry with such a
filter :
(modifyTimeStamp>={last modification synchro})
For instance :
(modifyTimeStamp>=20130524145400.000Z) (gives back all the entry
modified since may, 24, 2013, 14:54)
Of course, if you added some entries, they won't have this
modifyTimeStamp attribute. You can improve the former filter by
convering this use case :
(|(!(modifyTimestamp=*))(modifyTimeStamp>=20130524145400.000Z))
>
> Que 2) I found one "Change Sequence Number".If I want to take last
> committed "CSN" how I can get this?
This CSN is an internal attribute which is used for replication. You
can't really get back the last one in LDAP.
>
> Que 3) If I have nested groups and add one user in subgroup,how can I track
> this change in parent group ?
What is your data structure here ? Are the subgroups stored using the
'member' Attribute in the parent group ? If so, you won't be able to
know that the parent group ha sbeen modified because one of its subgroup
has been modified.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com