Hi,
Peter Gietz wrote:
since my name was mentioned I thought I should answer. I will try to explain, what I understood about ldap.xml. I want to state that I am in discussions with Michael about it and would propose a new ldap configuration style, which is more aligned to LDAP-schema conventions. If I find time (which most probably will be not sooner than in a couple of months) and if I get Michaels OK, I will volunteer to rewrite the stuff accordingly.
You have my OK. You have much more experience with LDAP than I and I am happy about everyone who can takeover a part.
Not having written the current stuff, I cannot promise that I understood it 100% and I herewith ask Michael to comment and correct me where I am wrong or not specific enough. I did have a look at the code, but not very closely due to lack of time. Where I wasn't sure, I included "(???)".
Ok lets look at an example (my comments are behind #):
Cool idea - BTW it is bug (from me) that the code is not documented.
<openca>
[...] # general ldap settings (host, port, etc), not the question here and quite nicely described in 7.2. of the user documentation
# at http://www.openca.org/openca/docs/online/ch02s07.html
<ldap>
<schema> # begining of the schema specification, which is not documented, and which normally
# is not changed by users but just used as is
<default> # there are three classes of ldap-entries defined here: certificate for storing user and server certificates;
# ca for storing ca certificates and default for any other kind of entries (???). All three kinds are configured the same way.
Correct. <default> is used for LDAP nodes which does not contain certificates or CA certificates. This can happen if OpenCA has to create parts of the LDAP tree. Otherwise you can ignore the <default> definitions.
[...] # I will skip to the certificate section, because the examples are more usefull to you.
# You shouldn't amend the default section anyway AFAICS (???)
</default>
<certificates>
<rdn> # an LDAP entry is here categorized after the RDN (the relative distinguished name) which is a constituent of the
# DN (distinguished name). for Example the rdn of the entry with the dn "cn=misterx, dc=company,dc=com" is
# "cn=misterx". In ldapterms the schema of an entry is IMO better categorized after the structural objectclass. Here
# it is rather the attribute type used in the RDN
The reason for this bad design is simple - a certificate only contains a DN but no specifications about the used/implied object classes. Therefore it is recommended for large directories that the LDAP structure should be created by a nother software and not with OpenCA. OpenCA should only fill certs and CRLs into the LDAP.
<attributetype>serialNumber</attributetype> # specifies the attribute type of the rdn everything below until the
# next </rdn> is about entries that have an rdn with this attributetype
... at top of the DN
<must> # here the attribute types are specified which have to be present in the entry-type described here
<attributetype>cn</attributetype>
<attributetype>sn</attributetype>
</must> # ok now we have said that entries that use serialNumber as RDN have to include the attributes sn and cn
# since serialNumber is used as RDN attribute it should also be included in the list of must attributes but
# seems to be missing in the config (???)
No and yes ;-D I think it is time to explain the code logic. I use the attributetype of the RDN only to determine the objectclass stack. The must and may area completely results from the definitions of the objectclasses and do not directly depend on the attributetype in the RDN. Otherwise some directory servers block an entry if the RDN at top of the DN is not a seperate entry in the node. Nevertheless I do not want to add stuff which is incompatible with the original schemas.
BTW if we detect an attributetype from <may> then we add the attribute. This is always true for serialNumber in this case.
<may> # now the same with optional attributes
<attributetype>serialNumber</attributetype>
<attributetype>mail</attributetype>
<attributetype>emailAddress</attributetype>
<attributetype>ou</attributetype>
<attributetype>o</attributetype>
<attributetype>st</attributetype>
<attributetype>l</attributetype>
</may> # ok now we said that entries that use serialNumber as RDN may include the attributetypes serialNumber,
# mail, email, ou, o, st and l in addition to the must attributes
<structural> # now (at last) comes the specification of the structural object class. An object class describes the character
# (and schema) of an entry. Object classes can be inherited from others. One and only one inheritance chain # specifies the main characteristic of the entry and is thus named structural object class (inheritance chain).
# the following is the usual standard structural object class inheritance chain for persons, where inetOrgPerson
# is derived from organizationalPerson and the latter is derived from person.
# BTW an object class is referenced in the LDAP-entry by the objectclass attributetype, e.g.: objectclass=person
<objectclass>person</objectclass>
<objectclass>organizationalPerson</objectclass>
<objectclass>inetOrgPerson</objectclass>
</structural>
<auxiliary> # auxiliary object classes are additional objectclasses that contribute additional attribute types to an entry defined
# by a structural object class. Thus the objectclass pkiUser is a standard aux object class for including an
# attributetype for storing certificates. It can be added to any kind of entry (person, organization, service, device, ...)
<objectclass>opencaEmailAddress</objectclass>
<objectclass>opencaUniquelyIdentifiedUser</objectclass>
<objectclass>pkiUser</objectclass>
</auxiliary> ok, pkiUser and two objectclasses defined by openca are added to entries that use serialNumber as RDN
</rdn> # and this was it for one entrytype now follows the next:
<rdn>
[...]
</rdn>
[...]
</certificate>
<ca> # here come definitions for ca certificates
[...]
</ca>
</schema> # and here we are done.
</ldap>
</openca>
The important think to understand is that the definitions in <must> and <may> are directly inherited from the objectclass specificiations in the standards.
ok now we know what the stuff all means, but I doubt that it is wise to change the configuration nevertheless. If you do, you in any case have to be sure that your statements here are not in contradiction with the LDAP-schema definitions used. e.G the Objectclass has cn and sn as must attributes and thus they should be specified as must attributes here as well. This makes changing the stuff quite
complex.
Nevertheless you can introduce your private schemas in ldap.xml like you use them in your LDAP server.
Michael -- _______________________________________________________________
Michael Bell Humboldt-Universitaet zu Berlin
Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin _______________________________________________________________
smime.p7s
Description: S/MIME Cryptographic Signature
