[prev in list] [next in list] [prev in thread] [next in thread] 

List:       forgerock-opendj
Subject:    [Opendj] Adding attributes to existing classes
From:       chris.ridd () forgerock ! com (Chris Ridd)
Date:       2013-05-16 8:48:47
Message-ID: 14804A5A-220A-4BA5-9B92-C246B4594034 () forgerock ! com
[Download RAW message or body]


On 15 May 2013, at 17:02, Ludovic Poitou <ludovic.poitou at forgerock.com> wrote:

> Hi Adam,
> 
> If you plan to extend an object class to add new attribute, the proper way is to \
> use either subclassing or auxiliary object class. Which means that you have to add \
> the object class when you are adding the new attributes to entries. There is no way \
> to have the object class to magically appear in the entries. 
> You shouldn't modify existing object classes especially if it's defined in \
> 00-core.ldif which means it standard.

There is another way to add additional attributes to entries using existing object \
class definitions - using DIT content rules.

They key off of an entry's structural object class, and you can do things like add \
additional MUST and MAY attributes, and also disallow attributes using NOT.

The string representation of the DIT Content Rules syntax is in RFC 4512 section \
4.1.6, which we extend slightly. Here's an example of me allowing objects using the \
inetOrgPerson structural object class to optionally have a country attribute.

$ bin/ldapmodify -h localhost -p 1389 -D "cn=Directory Manager" -w secret
dn: cn=schema
changetype: modify
add: ditcontentrules
ditcontentrules: ( 2.16.840.1.113730.3.2.2 desc 'Extra for inetOrgPerson' may ( c ) )

To be honest I haven't seen many people ever use DIT content rules, but they're \
standard and OpenDJ supports them. I think they'd work for Adam.

Regards,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.forgerock.org/pipermail/opendj/attachments/20130516/204b3a68/attachment-0001.html \



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic