You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Tony Thompson <To...@stone-ware.com> on 2007/03/30 20:18:27 UTC
V1.0.1 schema
In v1.0 and even a 1.0.1 snapshot I had, I had hijacked the "member"
attribute and used it on an "inetorgperson" to track that users group
membership. Even though technically the schema didn't allow "member" on
an "interorgperson", Apache let me do it anyway. It looks like the
1.0.1 final release fixed that hole and it will no longer allow me to
use the "member" attribute on an "inetorgperson". If I want to keep
track of group membership on a user object, is there an attribute that I
should use? Will there ever be one in the base schema for that purpose?
Should I add my own "memberOf" attribute to use instead?
Thanks
Tony
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.
Re: V1.0.1 schema
Posted by Alex Karasulu <ak...@apache.org>.
BTW if you declare your own objectClass 'foo' as Emmanuel recommends there
are some subtle advantages to putting an attribute 'bar' into it. Usually
when you do searches you can search with a specific (objectClass=foo) filter
as opposed to using filters like (bar=*). This is nice because usually OC
is always indexed while bar may not be so having a special AUXILIARY OC foo
will have performance advantages in searches.
As you can see you don't want to use this extensibleObject thingy all the
time.
Alex
On 3/31/07, Emmanuel Lecharny <el...@gmail.com> wrote:
>
> Tony Thompson a écrit :
>
> >On 3/30/07, Tony Thompson <To...@stone-ware.com> wrote:
> ><snip>
> >Alex,
> >That does in fact work. I can use that workaround so I don't have to
> >add my own schema extension. Is that a recommended way to do things in
> >the directory? I guess at this point I am really looking for guidance
> >on the "right" way to do things.
> >
> >
> The 'ExtensibleObject' is, as mentionned by Alex, a workaround (sorry
> that I didn't mentionned it in my previous mail, it was out of my mind).
>
> It would be better to decalre your own ObjectClass, and to include the
> member attribute in it. All your entries will then have to use this
> specific ObjectClass. I don't know if this is something you can do, but
> at least, you will be in control. Adding ExtensibleObject will allow
> your users to add absolutly any attributes to entries, and it can be
> dangerous.
>
> Emmanuel
>
>
Re: V1.0.1 schema
Posted by Emmanuel Lecharny <el...@gmail.com>.
Tony Thompson a écrit :
>On 3/30/07, Tony Thompson <To...@stone-ware.com> wrote:
><snip>
>Alex,
>That does in fact work. I can use that workaround so I don't have to
>add my own schema extension. Is that a recommended way to do things in
>the directory? I guess at this point I am really looking for guidance
>on the "right" way to do things.
>
>
The 'ExtensibleObject' is, as mentionned by Alex, a workaround (sorry
that I didn't mentionned it in my previous mail, it was out of my mind).
It would be better to decalre your own ObjectClass, and to include the
member attribute in it. All your entries will then have to use this
specific ObjectClass. I don't know if this is something you can do, but
at least, you will be in control. Adding ExtensibleObject will allow
your users to add absolutly any attributes to entries, and it can be
dangerous.
Emmanuel
RE: V1.0.1 schema
Posted by Tony Thompson <To...@stone-ware.com>.
On 3/30/07, Tony Thompson <To...@stone-ware.com> wrote:
In v1.0 and even a 1.0.1 snapshot I had, I had hijacked the
"member" attribute and used it on an "inetorgperson" to track that users
group membership. Even though technically the schema didn't allow
"member" on an "interorgperson", Apache let me do it anyway. It looks
like the 1.0.1 final release fixed that hole and it will no longer allow
me to use the "member" attribute on an "inetorgperson". If I want to
keep track of group membership on a user object, is there an attribute
that I should use? Will there ever be one in the base schema for that
purpose? Should I add my own "memberOf" attribute to use instead?
If you add extensibleObject or something to that effect to the
objectClass attribute of the any entry then
that entry can contain any attributeType defined in any schema within
the server. Give that a try for a quick
workaround to your problem and let us know how it goes.
Alex,
That does in fact work. I can use that workaround so I don't have to
add my own schema extension. Is that a recommended way to do things in
the directory? I guess at this point I am really looking for guidance
on the "right" way to do things.
Thanks
Tony
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.
Re: V1.0.1 schema
Posted by Alex Karasulu <ak...@apache.org>.
Tony,
On 3/30/07, Tony Thompson <To...@stone-ware.com> wrote:
> In v1.0 and even a 1.0.1 snapshot I had, I had hijacked the "member"
> attribute and used it on an "inetorgperson" to track that users group
> membership. Even though technically the schema didn't allow "member" on an
> "interorgperson", Apache let me do it anyway. It looks like the 1.0.1final release fixed that hole and it will no longer allow me to use the
> "member" attribute on an "inetorgperson". If I want to keep track of group
> membership on a user object, is there an attribute that I should use? Will
> there ever be one in the base schema for that purpose? Should I add my own
> "memberOf" attribute to use instead?
>
>
If you add extensibleObject or something to that effect to the objectClass
attribute of the any entry then
that entry can contain any attributeType defined in any schema within the
server. Give that a try for a quick
workaround to your problem and let us know how it goes.
Alex
Re: V1.0.1 schema
Posted by Quanah Gibson-Mount <qu...@stanford.edu>.
--On Friday, March 30, 2007 9:32 PM +0200 Stefan Zoerner <st...@labeo.de>
wrote:
> Tony Thompson wrote:
>> Yeah, I am using that on the group side but I want to keep track of the
>> groups the user is in from the perspective of the user object. So,
>> something like this:
>>
>> cn=MyGroup,dc=example,dc=org
>> member: cn=MyUser,dc=example,dc=org
>>
>> cn=MyUser,dc=example,dc=org
>> memberOf: cn=MyGroup,dc=example,dc=org
>>
>> Tony
>>
>
> Hi Tony!
>
> I know that Active Directory does something exactly like that. Most
> directory servers I know don't. The information is redundant, and it is
> not easy to keep both directions of the association consistent.
>
> It seems to be an advantage to have the ability to perform a simple
> lookup and know all the groups a user belongs to. But with clever filter
> choice, you can determine direct group membership with a single search op
> without an attribute on the user side. And for *all* groups a user
> belongs to (directly or via groups within groups), you always need an
> algorithm with several search ops -- even if you have both directions
> stored.
>
> I recommend this article, If you not already know it. It contains
> descriptions of the algorithms.
> http://middleware.internet2.edu/dir/groups/rpr-nmi-edit-mace_dir-groups_b
> est_practices-1.0.html
Not necessarily. If you use dynamic groups, you can have a single
attribute on the user side that stores group membership, and then an
evaluated URI in a group object that creates the group "on the fly". It
works very well. Unfortunately, AD is broken in this area, and cannot use
them for authorization (it can only use static groups).
--Quanah
--
Quanah Gibson-Mount
Senior Systems Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
RE: V1.0.1 schema
Posted by Tony Thompson <To...@stone-ware.com>.
I wasn't aware of that article but it looks like it has some good info
in it, thanks.
I wasn't really looking for the directory to keep both attributes in
sync. My application already takes care of that for directories that
don't (Active Directory does it for you, eDirectory does not but has the
"groupMembership" attribute there for you, OpenLDAP does not keep the
two in sync nor does it have an attribute to use, apparently ApacheDS is
mostly like OpenLDAP). For OpenLDAP I am using the search method to
determine group membership when needed. For Active directory, I support
nested groups which requires me to devise the very clever search string.
Unfortunately, it is slow to have the directory perform that search all
the time even when you are using their Global Catalog. Kinda makes
sense since it is like making SQL queries against a database without any
indexes.
My application has one big requirement that doesn't let me use the
search option. I am taking advantage of the fact that ApacheDS does not
maintain referential integrity in DN type attributes. So, the
"memberOf" attribute has group DNs of groups that don't even exist in
the Apache directory instance. I typically consider this a deficiency
of the directory (seems to make sense that the directory would enforce
that) but in this one instance I actually need it to work that way.
So, it is sounding like my only option is to create my own schema
extension for "memberOf".
Tony
-----Original Message-----
From: Stefan Zoerner [mailto:stefan@labeo.de]
Sent: Friday, March 30, 2007 3:33 PM
To: Apache Directory Developers List
Subject: Re: V1.0.1 schema
Tony Thompson wrote:
> Yeah, I am using that on the group side but I want to keep track of
> the groups the user is in from the perspective of the user object.
> So, something like this:
>
> cn=MyGroup,dc=example,dc=org
> member: cn=MyUser,dc=example,dc=org
>
> cn=MyUser,dc=example,dc=org
> memberOf: cn=MyGroup,dc=example,dc=org
>
> Tony
>
Hi Tony!
I know that Active Directory does something exactly like that. Most
directory servers I know don't. The information is redundant, and it is
not easy to keep both directions of the association consistent.
It seems to be an advantage to have the ability to perform a simple
lookup and know all the groups a user belongs to. But with clever filter
choice, you can determine direct group membership with a single search
op without an attribute on the user side. And for *all* groups a user
belongs to (directly or via groups within groups), you always need an
algorithm with several search ops -- even if you have both directions
stored.
I recommend this article, If you not already know it. It contains
descriptions of the algorithms.
http://middleware.internet2.edu/dir/groups/rpr-nmi-edit-mace_dir-groups_
best_practices-1.0.html
Greetings from Hamburg,
Stefan
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.
Re: V1.0.1 schema
Posted by Stefan Zoerner <st...@labeo.de>.
Tony Thompson wrote:
> Yeah, I am using that on the group side but I want to keep track of the
> groups the user is in from the perspective of the user object. So,
> something like this:
>
> cn=MyGroup,dc=example,dc=org
> member: cn=MyUser,dc=example,dc=org
>
> cn=MyUser,dc=example,dc=org
> memberOf: cn=MyGroup,dc=example,dc=org
>
> Tony
>
Hi Tony!
I know that Active Directory does something exactly like that. Most
directory servers I know don't. The information is redundant, and it is
not easy to keep both directions of the association consistent.
It seems to be an advantage to have the ability to perform a simple
lookup and know all the groups a user belongs to. But with clever filter
choice, you can determine direct group membership with a single search
op without an attribute on the user side. And for *all* groups a user
belongs to (directly or via groups within groups), you always need an
algorithm with several search ops -- even if you have both directions
stored.
I recommend this article, If you not already know it. It contains
descriptions of the algorithms.
http://middleware.internet2.edu/dir/groups/rpr-nmi-edit-mace_dir-groups_best_practices-1.0.html
Greetings from Hamburg,
Stefan
RE: V1.0.1 schema
Posted by Tony Thompson <To...@stone-ware.com>.
Yeah, I am using that on the group side but I want to keep track of the groups the user is in from the perspective of the user object. So, something like this:
cn=MyGroup,dc=example,dc=org
member: cn=MyUser,dc=example,dc=org
cn=MyUser,dc=example,dc=org
memberOf: cn=MyGroup,dc=example,dc=org
Tony
________________________________
From: Emmanuel Lecharny [mailto:elecharny@gmail.com]
Sent: Friday, March 30, 2007 3:02 PM
To: Apache Directory Developers List
Subject: Re: V1.0.1 schema
Hi Tony,
the groupOfNames ObjectClass contains cn and member as MUST attributes. You may try this one .
Emmanuel
On 3/30/07, Tony Thompson <To...@stone-ware.com> wrote:
In v1.0 and even a 1.0.1 snapshot I had, I had hijacked the "member" attribute and used it on an "inetorgperson" to track that users group membership. Even though technically the schema didn't allow "member" on an "interorgperson", Apache let me do it anyway. It looks like the 1.0.1 final release fixed that hole and it will no longer allow me to use the "member" attribute on an "inetorgperson". If I want to keep track of group membership on a user object, is there an attribute that I should use? Will there ever be one in the base schema for that purpose? Should I add my own "memberOf" attribute to use instead?
Thanks
Tony
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.
--
Cordialement,
Emmanuel Lécharny
www.iktek.com
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.
Re: V1.0.1 schema
Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi Tony,
the groupOfNames ObjectClass contains cn and member as MUST attributes. You
may try this one .
Emmanuel
On 3/30/07, Tony Thompson <To...@stone-ware.com> wrote:
>
> In v1.0 and even a 1.0.1 snapshot I had, I had hijacked the "member"
> attribute and used it on an "inetorgperson" to track that users group
> membership. Even though technically the schema didn't allow "member" on an
> "interorgperson", Apache let me do it anyway. It looks like the 1.0.1final release fixed that hole and it will no longer allow me to use the
> "member" attribute on an "inetorgperson". If I want to keep track of group
> membership on a user object, is there an attribute that I should use? Will
> there ever be one in the base schema for that purpose? Should I add my own
> "memberOf" attribute to use instead?
>
> Thanks
> Tony
>
> This message (and any associated files) is intended only for the
> use of the individual or entity to which it is addressed and may
> contain information that is confidential, subject to copyright or
> constitutes a trade secret. If you are not the intended recipient
> you are hereby notified that any dissemination, copying or
> distribution of this message, or files associated with this message,
> is strictly prohibited. If you have received this message in error,
> please notify us immediately by replying to the message and deleting
> it from your computer. Messages sent to and from Stoneware, Inc.
> may be monitored.
>
>
--
Cordialement,
Emmanuel Lécharny
www.iktek.com