|s i s t e m a o p e r a c i o n a l m a g n u x l i n u x||~/ · documentação · suporte · sobre|
9. Publishing digital certificates with LDAP
This section focuses on how to publish digital certificates into an ldap server. You need to publish digital certificates if you run a Certificaton Authority. Publishing to LDAP is a simple way to make this information available in the network .Also many certificate aware software uses LDAP as a preferred repository for user certificates.
This allows to keep users certificates with the rest of the user information avoiding useless replication of data.
To deal with certificates you need a cryptographic toolkit, the one used here is OpenSSL.
9.1. LDAP Server configuration
The LDAP server used here is OpenLDAP 2.0.x.
Your LDAP server must support objectclasses that allows attributes to store certificates. In particular you need to store in the LDAP server the Certification Authority certificate, the Certificate Revocation List, the Authority Revocation List and end users certificates.
The certificationAuthority objectclass implements the authorityRevocationList, certificateRevocationList and cACertificate attributes.
The inetOrgPerson objectclass supports the usercertificate (binary) attribute.
You can also use the mix-in objectclass strongAuthenticationUser to add certificates to non inetOrgPerson entries.
You can include required schemas to OpenLDAP including the following schemas into your slapd.conf file.
9.2. Certificate Publishing
Certificates are encoded using ASN.1 DER (Distingushed Encoding Rules). So it must be published into the LDAP server as a binary piece of data (using BER encoding).
You can convert a pem certificate into der format using openssl
Then an LDIF file can be created using the ldif utility provided with OpenLDAP. The command:
creates an usercertificate attribute encoded in BASE64. You can add this certificate to an LDIF entry and then use ldapmodify to add the certificate to an entry.
Where cert.ldif contains something like:
It is also possible to specify the certificate in the LDIF file as:
9.3. LDAP Aware Clients
Once you stored certificates in the server you may wonder to retrieve them.
Among other clients, Netscape has supprt to retrieve certificates automatically from an LDAP server. Using the Security Panel-->User Certificates-->Search Directory; you can search for certificates in the LDAP dierctory and have them automatically installed in your Netscape certificate database.
Another client that has good support for certificates is web2ldap www.web2ldap.de