Table of Contents
List of Figures
List of Tables
List of Examples
Public key infrastructures are one of the most widely accepted musts of the future. The problem is that more and more applications can be secured with such crude things like certificates and keys but it is really difficult to setup PKIs and it is really expensive too because flexible trustcentersoftware for Unix is expensive. This was the starting point of OpenCA. Our goal is the production of an open source trustcentersystem to support the community with a good, inexpensive and future-proof solution for their base infrastructure.
OpenCA started in 1999. The first idea consists of three major parts - a Perl webinterface, an OpenSSL backend for the cryptographic operation and a database. This simple concept is still the todays base. Nearly operations can be performed via some webinterfaces. The only difference is that we have six preconfigured interfaces and you can create so many interfaces like you want. The cryptographic backend is still OpenSSL. This is no disadvantage. We want to build the organizational infrastructure for an PKI. This is our major job and the guys from OpenSSL have much more experience with crypto than we. Our databases store all the needed informations about the users crypto objects like certificate signing requests, certificates, certificate revocation requests and CRLs.
Public interface
LDAP interface
RA interface
CA interface
SCEP
OCSP
IP-filters for interfaces
Passphrase based login
Certificate based login (incl. smatcards)
Role Based Access Control
flexible certifcate subjects
flexible certificate extensions
PIN based revocation
digital signature based revocation
CRL issuing
Warnings for expiring certificates
support for nearly every (graphical) browser
OpenCA is designed for a distributed infrastructure. It cannot only handle an offline CA and an online RA. You can build a hierarchy with three or more levels. The goal is a maximum flexibility to support big organizations like universities, grids and global companies. OpenCA is not only a small solution ofr small and medium research facilities.
The OpenCA guides consist of four parts. The first part is a designguide which should help you to setup an good infrastructure. The second part describes all the activities which must be performed offline by some administrators. The third part is the user guide which describes all the available features. The last part is the technology guide which documents the ideas behind OpenCA. This documentation is only for developers and hardcore administrators to understand what's going on.
Finally we wish to thank everybody who helped us programming, testing and documenting OpenCA. This include of course all the universities and companies which finance the work of our developers.
Table of Contents
The meaning of this guide has changed. It must be reorganized. It should now help people to implement a PKI which use the full power and flexibility of OpenCA. Mainly it should give the people an overview about the hierarchies which can be implemented with OpenCA.
Before you start installing or editing OpenCA you should understand the most important principles of OpenCA's design. The first section describes the general design and the second section describes the software design.
This guide will be incomplete at every time because it is the part of documentation which must changed at every time the software changes. So please be lenient toward us :)
Table of Contents
We start here from scratch to give everybody a chance to understand how OpenCA works. So if you think about these boring guys who write this please take in mind that also OpenCA novices must have a chance to understand the software.
Normally every server in the infrastructure of the trustcenter has it's own database for security reasons. This hierarchy is the backbone of the trustcenter. \
After you know the basic infrastructure of OpenCA you possibly want to know what we think about such things like CA, RA, LDAP and a public interface which is sometimes called webgateway. OpenCA supports all these softwarecomponents via special web interfaces.
Node (for node management)
CA
RA
LDAP
Pub
SCEP
This interface manages the database and handles all the export and import functionalities.
The database can be initialized what means that OpenCA can create all the tables but OpenCA cannot create the database itself because this differs for every vendor. So we need a database with the appropriate accessright and a new database. The interface includes some functions for the backup and recovery of such a node but please bear in mind that you MUST have a seperate backup of the CA's private key and certificate. There is no default mechanism in OpenCA to backup the private key. We don't implement it because first we found no general secure way to backup a private key and second the most CA's use HSMs and therefore you need a completely different and usually proprietary backup strategy.
The export and import will be handled by this interface too. You can configure different rules for the synchronization with nodes on a higher and a lower level of the hierarchy. This includes the configuration of the objects and status which can be exchanged. The configured filters avoid status injections from lower levels of the hierarchy.
The CA interface has all function which you need create certificates and CRLs (Certificate Revocation Lists). The CA includes also all functions which you can use to change the configuration via a webinterface. It is not possible to change the configuration via another webinterface.
The CA is the home of the batchprocessors too. OpenCA includes some powerful batchprocessors to create certificates fullautomatically from ERP-systems (Enterprise Ressource Planning - e.g. SAP, HIS, NIS or /etc/passwd).
OpenCA's RA is able to handle all kinds of requests. This include things like editing requests, approving requests, creating private keys with smartcards, delete wrong requests and email users.
The LDAP interface was implemented to seperate the LDAP management completely from the rest of the software. This is necessary because there are many functions which are really special for LDAP admins too because only a few users need these features.
generates CSRs (certificate signing request) for Microsoft Internet Explorer
generates CSRs for Mozilla 1.1+ and Netscape Communicator and Navigator
generates clientindependent requests and private keys (e.g. for KDE's konqueror or server administrators which don't know how to create a private key and request)
receives PEM-formatted PKCS\#10 requests from servers
enrolls certificates
enrolls CRLs
supports two different methods revocation
search certificates
tests usercertificates in browsers (Microsoft Internet Explorer and Netscape Communicator and Navigator 4.7x)
Table of Contents
This chapter should give you a lot of hints which you should bear in mind if you design your first PKI. Please don't ignore this section if you are an experienced PKI administrator. We try to list the big traps here. So if you know another major problem then please add it.
This section lists hardware issues which were a problem for some PKIs during it's productional use. This list does not discuss performance issues.
One of the biggest problems of PKI systems is the time. There are two different kinds of computers - online and offline. The usual administrators logic is that a network connected computer can use a timeserver. The question is can you trust this timeserver? A timeserver creates two problems. First is the timestamp really from the timeserver and second is the time source of the timeserver trustworthy? The connection to a timeserver can be secured via tunnel technologies like IPsec but the real problem is the timesource. The most timeservers use finally a radio clock which receives a not signed timesignal from radiostation. This signal can be easily faked because it is very weak. So network timesources really insecure.
After the online computers lost all of their advantages we can discuss offline technologies. Radioclocks are problematical and so we have not to discuss them twice. Also many buildings made from good ferroconcrete has no problems with radiosignals because they implement really nice Faradeay cages. What we have for alternatives? First we need a trustworthy timesource. Simply take a digital watch and compare it's time with several other clocks in the internet, the videotext of your TV, a radioclock, the sun ;-), GPS and any other source you can find. Second you transfer the time from your watch to the computer. Last but not least you have to check the drift and the clock itself on the computer. The drift is a small and easy to handle problem. The clock itself is a much bigger problem. If your computer is always connected to a power outlet then the clock should only drift. Please remember this if you put your CA on a notebook and the notebook into a safe. Several new notebooks have really bad CMOS batteries which result in a wrong time at every reboot. You see time is not trivial.
The most common hardware crashs are cooler and disk failures. You should have of course a backup with all important data - especially with ALL issued certificates. Never lose a certificate or you must revoke the complete CA. Backups are a nice thing but it costs some time to recover from a backup. This results in two facts. First you must have a detailed (time-) plan how to recover from a backup. Second you should be able to tolerate diskcrashes. RAIDs are sometimes expensive but they helps a lot (ask you SAN admins :) ).
Usually you will see if your laptop crashes. A crashing offline computer can be detected by visual monitoring too. A crashing online component of a PKI is problem because important informations are not available. Such informations are new certificates and CRLs. Your services are offline too. This includes SCEP. If a public interface of the security infrastructure is down then you will get problems with your users in the future. So the trust into a running infrastructure is very fast gone. Please note that a simple ping is not enough. You cannot detect a crashed web or OpenCA perl server with a ping. Software bugs can also cause 100 percent load. I know this problem from our web mail programs really well.
If your offline CA consists of one offline notebook and you want to ensure dual control and no single point of failure then you can do it for example with one IT module safe and two data safes. An IT module safe is a safe with own climatisation and UPC which has the same physical protection level like a safe. This safe is used to allow nonstop operation of the notebook which reduces time and availability problems. All three safes should have two locks. This ensures dual access control by key sharing. This is really simple and really efficient too.
The IT module safe includes the notebook (with the CA private key) and the front part of the passphrase.
The first data safe includes the backups (including the private key backups) and the back part of the passphrase.
The second data safe includes the front and back parts of the passphrase.
Please remember that this is a really simple idea for medium risk CAs. High risk CAs should be use more complex schemes to not only tolerate one broken safe. They should be able to tolerate at minimum two broken safes to have a longer schedule for the roll-out of a new CA.
This is more an area for a facility manager. The rooms with the PKI safes inside should have for solid walls and a door with two locks. The room including the climatisation system should be fire safe for 90 minutes (F90). The room and the entry should be camera observed. The cameras in the room itself should show the persons but not the keyboards and monitors. Papers should not be readable. The recorder for the camera should record one week at minimum. The room needs an alarm system. The room must be safe against electro magnetic pulse (EMP) and water too. This is only a short notice. Please ask some assurance specialists or architects for more details.
A PKI is only fully operational if all services of the PKI are fully operational. This include things like OCSP and SCEP but it includes the public gateway too. Many people think it is enough if OCSP and one CDP still works but this is wring. The first thing is that the most applications don't understand OCSP. The second problem is that the last running CDP perhaps only support LDAP but there are applications which only supports HTTP and even more problematic is single running HTTPS CDP. The core mistake in this assumption is the meaning of fully operational. A PKI is not fully operational if only the CDPs still work. If nobody can download a new certificate or a certificate of a user which he never contacts before the PKI service is interupted. The PKI is still secure but many people mix up secure and operational.
In a time of server consolidation and omnipresent networks it is important to understand that all public PKI services must be available after a single failure. This includes network and power outages. A second fibre only helps if it is not in same pipe like the other one. a digger don't differs between the fibres if it cuts a pipe - I know this situation really well :( If you have big distributed units then it is recommended that at minimum two of these units run the public interfaces. In this case you should have independent interconnects.
Today this section consists of two big groups of problems - CDPs and application specific problems. First we discuss all the CDP stuff and second we discuss the different applications. Several applications are discussed in the other OpenCA guides too if we developed special configurations to solve the problem.
CRL Distribution Points are a critical area. THere were several PKIs in the first years which have no CDPs or only one CDP. Secure applications must verify the state of a used certificate. Such applications check the CDP field in the extensions of a certificate to find a usable verification source. Today a CRL Distribution Point has not to be a source for a CRL. It can be an OCSP responder too. A CDP is today more a Certificate Status Point.
The first question is which protocols must be supported. The common procols LDAP and HTTP should be supported always. HTTP is supported by nearly all devices but some devices like LDAP more than HTTP - especially some network solutions. Additionally there are OCSP and HTTP. OCSP is a protocol to verify the state of a single certificate. This protocol has a much better performance for slow network interconnects if you have large installations with many (revoked) certificates. HTTPS supports you with a trusted source but is a trusted source necessary for CRLs? Usually no but sometimes yes. CRLs are signed by the CA and they have period of validity. There is only one working attack. If a certificate was revoked, the old CRL is still valid and the CDP uses HTTP then an attacker could present the user the old CRL. So this attack is more a question of security policy than a technical question. The validity period is a policy question too because the most application don't accept CRLs if the timestamp for the next update is over. The cool aspect is the fact that a CRL is never invalid. There can only be a newer CRL but like mentioned this is more a political discussion.
The second question is how many physical CDPs do you need. If you design a scalable infrastructure then you must be able to tolerate service interruptions of several compontents like cables, routers, switches and servers. It is a really good idea to have always a local CDP if you have only a single interconnect to your central network but otherwise not every branch office need it's own CDP because if there computers including their file and mail systems are offline then it is not necessary to have a CDP online.
The third question is a really trickey one. Which order should the CDPs have? The question is interesting in the case of network outages. If you support LDAP and HTTP, you have three servers which all serve both protocols, the CDP are ordered like the servers and server one and two are not available because of a more or less big digger then your applications waits for four timouts until it can access the first CDP successfully. The application has to wait for timeouts from LDAP on server one, HTTP on server one, LDAP on server two and HTTP on server three. So it is a really good idea to mix the order of protocols and servers. This is most important for application which understand many protocols. Stupid alphabetical ordering using the DNS names is not recommended or do you think a user waits two minutes for the verification of every recipient of an email if he wants to send a commit for a meeting?
The last question is today often a not hundert percent solvable problem. Can a supported and necessary protocol crash other applications? If you use HTTPS then you should invest some time on this problem because it is a typical hen and egg problem. If you have Microsoft client and the client tries to verify the certificate status via a HTTPS CDP then it receives a certificate from the HTTPS server. This certificate must be verified. If the certificate is from the same CA then the client contact the HTTPS CDP again to verify the certificate and the verification problem starts again. This is a nice method to implement a busy wait. The only solution is to get a server certificate from another authority which use no CDPs or at minimum no HTTPS CDPs. The insight is that you should be really careful with the usage of crypto protected CDPs.
If you start thinking about emailsecurity then the starting point is S/MIME or PGP but sometimes the admin know ethereal and they continue with IMAPS and POPS. So far so good. Later they think about server based security and try to implement SMTP over TLS. OpenCA issues certificates which can be used for SMTP over TLS because the certificates act as client and server certificates. If you use other software than OpenCA or you create a new role for such servers then you should read the documentation of your SMPT server really carefully.
A SMTP server can use two methods for SMTP over TLS. It can use one certificate which includes the extensions for TLS client and servers or it can use two certificates - one client and one server certificate. Please read the specs carefully and then read specifications for TLS clients and TLS servers. If the SMTP server reports an error after start tls then there is usually a missing extension or a problem with the certificate chain. See Section 3.2.2, “SMTP server”.
Old netscape clients are not conform with the RFC standards. They use the common name as a regex to match the servername. They ignore the subject alternative name completely. A workaround is described in the configuration area of OpenSSL (see Section 3.2.1, “HTTPS server”).
OpenLDAP is an open source software but it's TLS implementation is not the best one. It doesn't check the subject alternative name first. First it checks the common name of the subject to match the DNS name or IP address. This fails of course if the certificate subject inlcudes a regex for old Netscape clients. Two non standard compliant softwares collidate here. Netscape needs regular expressions, OpenLDAP don't support regular expressions and both softwares doesn't check the subject alternative name first. So it's your job to made a tradeoff or to use Mozilla.
dual access control (physical and technical but first organizational apsects)
access control but who controls the access control regulations (no self control)
how to integrate privacy officers public certificates - not always public certificates - which fields must be published? PID vs. new ID what is the identity of a person in convetional areas
There are numerous situations where it is a good idea to operate more than one PKI for endusers. Perhaps you need a server CA and a seperate user CA. Sometimes an old CA is still active by issueing CRLs because there are still valid certificates but the new CA already issues certificates. Other people using different CAs to establish an easy access control by the certificate chains (so called trust paths). You see there really many situations where you have to operate more than one PKI.
The most PKI programmers like me have no problem to distinguish between different PKIs because we always ask who issues this certificate but which normal user do this. He simply looks at the certificate, calls the hotline and asks why the certificate for Jon Doe with the serial 12345 does not work. The guy from the hotline looks into it's computer and answers that the certificate is correct and valid. So what's going on?
A certificate has two significant things to identify a certificate which are different from the common name in the subject of the certificate and which are easy to handle (by the way keyID and issuer from the authority key identififer are not easy to handle for an enduser). First there is a serial and second there is an issuer. If a customer calls a hotline then the easiest way to handle a problem are organization wide unique serials. If you start a second CA or you have to repalce an old CA never reuse serials if this is possible. You will search for hours if somebody calls you and reports a broken certificate chain for certificate 12345 and you two of those certificates. If you ever issued certificates with identical serials then always asks for the issuer if you receive an error report. Never ever create a replacement for an old CA with the same name. It only course trouble.
The resume is very simple. If you avoid duplicate identifiers then automatically avoid many problems.
Table of Contents
This guide should describe all installation and administration issues of OpenCA. Some answers are perhaps in the FAQ but every detail which you can find in our docs about the istallation you can find here.
Table of Contents
Apache
mod_ssl
OpenSSL
OpenLDAP
Perl
Digest::MD5 is usually problematical on modern Linux distros because Perl 5.8 includes Digest::MD5 already and some old version of Digest::MD5 has big problems with new Perl. You can simple outcomment Digest::MD5 in src/modules/Makefile.
Gettext causes sometimes trouble because version 1.0.0 has a different export behaviour than 1.0.1. The result of this small "bug" is that OpenCA doesn't work with gettext 1.0.0. Please update your gettext or remove it from the system.
CGI::Session is sometimes problematical if you use OpenCA's access control. If you login then OpenCA sends you a cookie and write some session data to the disk. Old version of CGI::Session doesn't flush the data automatically and so the data files on the server disk are empty. OpenCA::AC includes some fixes but it is strongly recommended to have only CGI::Session 3.92+ on your system.
i386 with Linux, FreeBSD, OpenBSD and NetBSD
UltraSparc with Solaris 8 and Linux
PowerPC with AIX
OpenCA uses the usual Open Source method to configure the source. We only use configure to compile and install the software but we don't use configure for the configuration of the installed system. configure make some defaults settings but the real configuration is described in the post-install section.
We will describe the ideas and options in the next section grouped by such things like path settings, mail, web-server related stuff. If you don't understand an explanation then please contact <openca-user@lists.sf.org>. The install options are now lesser because we changed the installation process from 0.9.1 to 0.9.2 to get usable packages and better internationalization.
We don't document the general options of configure because it is not our job to document autoconf. We will only describe OpenCA specific options.
Usually OpenSSL is present on the most Unix systems because it is the best available Open Source cryptotoolkit. The problem is that several old distributions only include support for OpenSSL 0.9.6 but OpenCA needs version 0.9.7.
If you install an OpenSSL from source then it installs in /usr/local/ssl. This is the directory which you must specify. If you system already includes a proper version then you have not to use this option or you can enter /usr on the most linux boxes.
If you install OpenCA on a server with a special language setting or you want to use this server with a special language interface then you must specify the locale. OpenCA supports today de_DE, es_ES, fr_FR and it_IT.
OpenCA installs several files which should not be owned by the webserver user. Usually the owner can be root or special OpenCA user. It is recommended to use another user than root.
OpenCA installs several files which should not be owned by the webserver group. Usually the group can be root or special OpenCA group. It is recommended to use another user than root. If you install several CA you can setup a group openca or pki for example.
We have three different groups of paths - common stuff, prefixes for the different components of OpenCA and the paths for files of the webserver.
One path cannot be classified - --with-module-prefix=DIR. This path can be used to put all Perlmodules which OpenCA installs in one directory to be able to remove OpenCA from your system without any residues. It is also a good idea to use this option if you need different OpenCA installations with different versions of OpenCA on your system. Later versions of OpenCA can have different modules with different interfaces which are not backwards compatible.
OpenCA includes a directorystructure to store all relevant data in one central place. This place can be specified with --with-openca-prefix. This installation option is recommended for normal installations from the source code. Secure or not the most users want to install packages (e.g. RPM or DEB). Packages have the big advantage that you remove or add a software without any risks. In this case we have to support the package maintainers with configuration options to build packages which conform with the guidelines for the distros. Therefore you can use --with-etc-prefix, --with-lib-prefix and --with-var-prefix too.
Today there are six different components - ca, ra, ldap, pub, node and scep. Every component must have a different name to have distinguished configuration files and distinguished paths. All the names will be calculated automatically. You have only to edit these prefixes if you need a special configuration like a second RA on the same machine.
The webserver configuration is the most complex and most simple part of the configuration too. If you have single http-server for OpenCA then you only need four options to configure OpenCA for this server. If you have a full featured corporate portal then you can integrate this software seemlessly in the the server. Therefore you can configure a lot of details. So we hope you find a good tradeoff ;-)
Every webserver needs some basic informations. These informations are the hostname (--with-web-host), the user (--with-httpd-user) and the group of the server (--with-httpd-group). These are the rudimentary informations which OpenCA needs before you can start configuring the paths. The defaults are an empty hostname, nobody and nogroup.
The most trivial installation case is the default apache installation. In this case you have only to set --with-httpd-fs-prefix to the directory where your apache is. All other directories will be set automtically.
The standard webserver doesn't use Apache's default installation. Therefore it is possible to configure every detail of the installation. The first splitting is into CGI (--with-cgi-fs-prefix) and HTDOCS (--with-htdocs-fs-prefix). The most test systems don't need the other options. They have only to know where the appropriate directories are.
Our software was designed for really big companies and organizations too. They have usually portals for their employees and customers. If you have to integrate an OpenCA interface into such a portal then there are good news for you - you don't have to edit paths and links by hand. You can configure the placement of CGI and HTDOCS area of every interface seperately. The options are --with-(ca|ra|ldap|pub|node|scep)-(cgi|htdocs)-fs-prefix). We think that more flexibility is not necessary. So if you think OpenCA is to unflexible then write a mail to us with your ideas.
The mailoptions are deprecated too. Please read the post-install section to understand how to configure mail. Please don't use the configure option because they can be removed in the next releases.
You can enable three extra features for compilation and installation. SCEP and OCSP can be enabled because they are extra softwarepackages which can work independently from OpenCA but they are included in the distribution. The option --enable-package-build is used to support package maintainers. If it is activated all common parts of OpenCA are not installed automatically. This allows packagers to build seperate conflict free packages for every interfaces because all Perl modules and the common stuff can be put into seperate packages.
install-ca
install-common is only interesting for package maintainers because they can install the common stuff seperately from the rest.
install-ext is the same like install online. This install target is deprecated.
install-ldap
install-node
install-offline installs ca and node
install-online installs ra, ldap, pub, scep and node
install-pub
install-ra
install-scep
install-docs
OpenCA incudes a startup script for it's daemons. The script is named OPENCADIR/etc/openca_start. The script starts the XML cache and the main server loop of OpenCA. Please remember to run this script after every boot operation. It is recommended to integrate a script openca to the appropriate runlevel.
After the installation all necessary files are in the correct directories but there are hunderts of files called *.template. These files contain placeholders which can be configured in OPENCADIR/etc/config.xml. Before you start using OpenCA check this file and run OPENCADIR/etc/configure_etc.sh.
OPENCADIR/etc/configure_etc.sh loads OPENCADIR/etc/config.xml and creates the correct files. If you use packages from distribution then OPENCADIR is usually empty because they create a directory /etc/openca.
config.xml contains seven big sections which will be described first. Second we describe how to setup an installation with only one common area but two management interfaces. This is useful if you want to test the dataexchange.
Here you have to define some options which are relevant for several interfaces. The ca locality, organization and country affects the distinguished name and the preconfiguration of the LDAP stuff. Nevertheless you should read the LDAP section too. The values which you enter are directly used for l, o and c.
The mailpart is used for the node and RA interface. The sendmail field defines the command which will be used to send mails. You must have a mailprogram with a sendmail interface (e.g. postfix). You can enter every program which works like sendmail -n. There are several people which like postfix more than sendmail and we don't like do decide which mailprogram is the best one. The option send_mail_automatic configures the node interface. If the value is YES then OpenCA sends all incoming mails during an import automatically. This can be nice but it is dangerous too if you make a mistake. The service_mail_account is used as From for all sended mails. Usually this should be something like <pki@your_org.edu>.
The last option policy_link defines a link to your policy. It is highly recommended to don't ignore this value. If you have such a reference then you can modify the page request_success.html (add a hint) and the users can read all about the PKI at every time they want. If you have no such link then you receive dozens questions which are really simple but cost a lot of time and you have no base for your operations. Ok, I think I have not to explain the advantages of a policy here ...
Sometimes you need to run a CA on really unusual ports or you have to use https. It is also a little bit difficult for us to guess your correct hostname. Therefore you can specify these parameters in config.xml. The httpd_port should be the default port of the protocol and in this case it can be empty. If you need to run for example a http server on port 8080 then you have to use the option. Please remember to set the colons if you specify a port.
CRL distribution points (CDPs) can be specified extra. This is necessary because there are softwares which has problems with https in general or other softwares which try to download a CRL and before they start the download they want to check the CRL of the webserver but the CRL is not present (or why should somebody tries to download it :) ) and so an endless loop starts - Microsoft CAPI is such a software.
If you setup a real CA then it is highly recommended to edit all files in OPENCADIR/etc/openssl/extfiles and OPENCADIR/etc/openssl.cnf too. Every certificate should contain at minimum two CDPs. It is best practice to have two http CDPs and two ldap CDPs. Such a solution allows fast migration and a good reliability.
Before you start working with OpenCA's LDAP code please be sure that your LDAP server knows the objectclasses pkiUser, pkiCA and uniquelyIdentifiedUser. The last objectclass was introduced by Entrust Technolgies to have a clean way to include serialnumbers into the subject of the certificate. Yes, it is proprietary but there is no other way to do it.
If you set this option to "yes" then the LDAP code will be activated.
If you want that the LDAP server will be updated during the import from a higher level of the hierarchy then you must set this option to YES.
This is the hostname of your LDAP server.
This is the port where your LDAP server listens.
The bind DN of the user which OpenCA uses to add data to the server.
The passphrase for OpenCA's ldap account.
First you have to decide which database module you want to use. OpenCA supports two modules - one for DBM files and one for SQL databases. DB activates support for DBM files and DBI activates the SQL support.
This is the type of the DBD driver. We support Pg, MySQL, Oracle and DB2. If you need support for another database then please contact us.
name of the database which OpenCA should use
host of the database but sometimes the drivers don't need the host.
same as for host
the database user for OpenCA
has not to be explained :)
OpenCA has a mechanism to isolate the different interfaces from eachother to avoid conflicts especially double serialnumbers. The module_shift is the number of bits reserved for the IDs. You can use IDs from 0 to (2^module_shift - 1). 0 is the ID of the CA. All the other _module_ids must be in the scope of the module shift. Please be careful you cannot change the module_shift after the first definition.
The _url_prefix options define the exact positions in the webserver. This depends highly on the positions of the files in the filesystem but you can configure aliases in the httpd.conf. So OpenCA is fully flexible.
This is the PEM encoded private key of the SCEP interface. It has the same format like for mod_ssl.
This is the PEM encoded certificate of the SCEP interface. It has the same format like for mod_ssl.
This is the passphrase for the private key of the SCEP server. If you use a not encrypted private key (what is not recommended - then please set an empty string here. interface. It has the same format like for mod_ssl.
This is the name of the OpenSSL engine. If you want to add an option like -keyform then please use this style: lunaca -keyform e.
This must be the absolute path to the LunaCA utility.
This is the slot id of the Luna CA3.
This is the application id of the Luna CA3.
The configuration of the dataexchange is really complex in OpenCA. You can find a description in the section about the configuration of the dataexchange (see Section 9, “Dataexchange”). If it is your first OpenCA installation then please use one of the templates. If you setup a production level PKI then you must understand this configuration before you use it. This is one of the most important configuration options to guarantee the security of the PKI.
Before the explanations start please notice that it is important to first install the online components and then the offline components if you follow the instructions because the configuration of the offline components take care about the already configured onlinei components.
The first installation uses only the normal steps - ./configure --with-your-options, make, make install-online, edit OPENCADIR/etc/config.xml and OPENCADIR/etc/configure_etc.sh. Please use your options to configure the software and use the hierarchy level ra.
chmod 000 etc/servers/*.conf*
The first four steps are the same as for the online components except of the configuration options where you should change at minimum the hierarchy level to CA. So first you do ./configure --with-your-options, make, make install-offline and edit OPENCADIR/etc/config.xml.
/Test/OpenCA/etc/ /Test/OpenCA/lib/servers/ca_node /Test/OpenCA/lib/servers/ca /Test/htdocs/ca /Test/htdocs/ca_node
menu.xml must be fixed manually because it includes only a basic configuration. You have to copy a complete menu section. The section must be renamed from ca_node to ra_node. The cgi_prefix must be fixed too. Please verifies the menus with the names ra, ldap and pub to use the correct links to the node interface. If all values are correct then you have now a working testinstallation with two management interfaces.
Table of Contents
Before we with the access control itself some introductorily notes about the module ID. Every module in OpenCA has a module-ID. This ID you can find in the configurationfile of a module. The ID is used to create unique serial numbers for the requests. The moduleshift defines how many bits at the beginning of a serial number (the least significant bits) are reserved for the module's ID. The advantage is that you can issue a request at any module of OpenCA without synchronizing the databases at every time you issue a request because the module's Id is part of every request serial. The parameter in the configurationfiles are ModuleID and ModuleShift. You can configure both parameters via ./configure. The options are --with-module-shift, --with-ra-module-id and --with-pub-module-id. The ID of the CA is at every time zero.
<openca> <access_control> The complete configuration should be here. </access_control> </openca>
channel verification
login
session management
ACLs
The channel configuration checks the parameters of the incoming connection to detect misconfigured apaches and obsolete clients. The values in the configuration are regular expressions except of the type. The type defines the type of the environmentvariables which should be tested. Today we support only mod_ssl.
Example 4.1. channel configuration
<channel> <type>mod_ssl</type> <protocol>ssl</protocol> <source>192.168.0.1</source> <asymmetric_cipher>.*</asymmetric_cipher> <asymmetric_keylength>0</asymmetric_keylength> <symmetric_cipher>.*</symmetric_cipher> <symmetric_keylength>128</symmetric_keylength> </channel>
none
passwd
x509
The first possibility means that there is no login and everybody who pass the channel verification can use the interface. This possibility is nothing else than the deactivation of the access control.
This is not only an option for debugging and testing. You can also use this option if you want to use a RA interface on a server which allows only RA access from the local machine but not over a remote computer.
<login> <type>none</type> </login>
Example 4.2. Login and Passphrase configuration
<login> <type>passwd</type> <database>internal</database> <passwd> <user> <name>root</name> <algorithm>sha1</algorithm> <digest>3Hbp8MAAbo+RngxRXGbbujmC94U</digest> </user> <user>...</user> ... </passwd> </login>
We prepared a script to generate the digests. The name of the script is openca-digest and it will be installed during make install*. The program is used like "openca-digest (help|sha1|crypt|md5) string".
Example 4.3. Authentication with certificates
<login <type>x509</type> <chain>OPENCADIR/var/crypto/chain</chain> </login>
The filtering of the users is not the job of the login because the login has only to identify the user. The filtering has to be implemented in the ACLs. Therefore we cannot recommend the x509 (smartcard) authentication until now.
Example 4.4. Session configuration
<session> <type>cookie</type> <directory>@var_prefix@/session/cookie</directory> <lifetime>1000</lifetime> <session>
Example 4.5. Basic ACL configuration
<acl_config> <acl>yes</acl> <list>@etc_prefix@/rbac/acl.xml</list> <command_dir>@etc_prefix@/rbac/cmds</command_dir> <module_id>0</module_id> <ca_cert>@var_prefix@/crypto/cacerts/cacert.pem</ca_cert> <map_role>no</map_role> <map_operation>no</map_operation> </acl_config>
enable (yes) or disable (no) the access control list
defines the place of the ACL
specify the directory which contains the configuration files of the scripts
This is the id of the interface. This id is unique for every interface.
The CA certificate in PEM format is used to verify signatures. You can use here another certificate than of the CA which you control with this access control. This is useful if you have a user CA and a server CA. You can login into the interface of the server CA with a certificate from the user CA.
enable (yes) or disable (no) the mapping from certificates to roles if the certificate of the user is known
enable (yes) or disable (no) the mapping from the names of the scripts to the supplied operation
Example 4.6. Permission for serverInfo
<acl> <permission> <module>0<</module> <role>root<</root> <operation>serverInfo</operation> <owner></owner> </permission> <permission>...</permission> ... </acl>
every access right is defined in a permission element
this is the module id of the used web interface. Every installed gateway of OpenCA is a module in the terms of RBAC. If you install the RA then there is a new module with the id 1.
is the name of the user if map_role is no and the role of the certificate if map_role is yes. The roles are part of every role based system. OpenCA defines a set of default roles which you can simply extend by other roles which you need.
Every certificate will be assigned a role if it is issued on the CA. The role of a certificate service request is the role which the requests asks for. The role of a certificate revocation request is the role of the certificate to which the CRR belongs. The CA-certificate(s) and the CRLs have no explicit role because they have automatically the “superrole”. If there is an action where the user is not identified by a certificate then the role which is used is automatically the empty role. This is sometimes necessary for example if you want to control your public gateway by RBAC.
is the name of the script if map_operation is no and the operation of the script if map_role is yes.
is the role of the object which will be automatically detected by the configuration of the script
Example 4.7. Allow all
<acl> <permission> <module>.*</module> <role>.*</role> <operation>.*</operation> <owner>.*</owner> </permission> </acl>
This method is used if an operation affects a certificate and the role should be detected by the serial of the certificate.
This method is used if an operation affects a CSR and the role should be detected by the serial of the CSR.
This method is used if an operation affects a CRR and the role should be detected by the serial of the CRR. The CRR will be loaded and the certificate which should be revoked will be loaded and the role of the certificate is used.
The use of this method is not recommended because the role is not protected by any cryptographic mechanisms.
The operator must have the right to perform this operation for every role.
This method is used to signal that an object is handled which affects the CA directly (e.g. CA-certificate, CRL). The operator needs access to the “superrole”.
<openca> <token_config> <default_token>CA</default_token> <token>...</token> ... </token_config> </openca>
which will be used by the software for the token. There are four names today - CA, BP (batch processors), KEYBACKUP and LOG.
This defines the type of the token. Today there are three types (OpenSSL, Empty and LunaCA3) but we can add modules for every token you need if the token is supported by OpenSSL. We add a module per token to be able to handle the different details and proprietary tools to manage the tokens.
The mode describes how the token should be used. OpenCA knows three modes standby, session and daemon. standby means that you must login to the token for every action, session activates the token for the whole user session and daemon runs the token in a daemon mode which means that the token must be stopped explicitly. Please read the docs about the different token types because not every token supports every mode.
If the token login requires a password which the user have to enter at the webpage then you should specify a sheet where the user can do it. Usually there are prepared sheets already installed at OPENCADIR/lib/servers/server_name/sheets/token_login.html. So you have only to specify the default sheet.
This is the path to binary of OpenSSL. It is called SHELL because it is the cryptoshell which we use. Simply run the binary without any options and you know what we mean.
filename of the file with the private key
the number of the components of the passphrase. If you have two groups of administrators and every group has only one part of the passphrase then you can enter 2 and OpenCA will display two seperate input fields for the different parts.
path to the PEM formatted certificate
path to the DER formatted certificate
path to the TXT formatted certificate - this is only important for the CA token.
directory which includes the certification path - this is not only important for the CA because the chain is sometimes included into signatures.
This token is only a dummy if the key is not a really seperate key. Often the administrators simply use symlinks to the CA keys and certs for the keybackup etc.. An empty token is redirect to the default token which is usually the CA token.
Luna CA3 comes with a utility to manage things like login and keygeneration. You have to enter the complete path here.
This is an ID for the slot of the token.
This is the application ID to avoid conflicts with other application. Please remeber that the APPID must be lesser than the SLOT.
OpenCA uses this file to detect that the token is already activated if the token runs in daemon mode. There is no way to find out this fact directly via a tool from Chrysalis-ITS.
You must care about three configurationfiles and -directories etc/openssl/openssl.cnf, etc/openssl/openssl and etc/openssl/extfiles. The first file contains the configuration for the CA. This means the file is used for the generation of the initial CA-CSR, the selfsigned certificate (if you setup a Root CA) and the CRLs. The file is configured fullautomatically during the installation but if you are setting up a serious CA then you should check this file too. The directory etc/openssl/openssl contains the configuration for the different roles except of the extensions. The relevant things which you must compare with your policy are the lifetime of the certificate and the algorithm which is used to sign the certs. The dircetory etc/openssl/extfiles contains the definitions of the extension. Please check these files carefully.
[[RFC3280] The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign the certificate. This extension is used where an issuer has multiple signing keys (either due to multiple concurrent key pairs or due to changeover). ]
The authority key identifier is used for path construction. Only if you create a self-signed root CA certificate then you only need the subject key identifier. You can use the subject key identifier of the CA certificate or/and the issuer's certificate serial and issuer name. It is recommended to use both. It is important to understand that the name is the name of the issuer of the CA certificate. If you have a root CA, a sub CA and a user certificate then the name in the authority key identifier is the subject of the root CA's certificate.
Example 4.8. OpenSSL configuration - Authority Key Identifier
authorityKeyIdentifier=keyid,issuer:always
The different names of HTTPS servers are one of the most problematic things in the todays world. Like for many other cryptographic issues in the web there is a standard for servercertificates - RFC 2818 “HTTP over TLS”.
The standard defines that you have to check the subject alternative name for an appropriate entry (DNS or IP see RFC 2459). If this search fails then check the common name in the distinguished name of the certificate.
If you use Microsofts Internet Explorer then you have no problems. The IE is full standard compliant. The problem is Netscape. They use the common name like a regular expression in Unix. The common name can be in the format “(server1|server2).my_domain.org”. The clever ones would argue now that we must simply set the subject alternative name like defined by RFC 2818 and set a normal common name because the subject alternative is checked first. This is a nice idea but Netscape ignores the subject alternative name if it checks the name of the server versus the content of the certificate.
The solution is a mix between RFC 2818 and Netscape behaviour. You must set the common name in the distinguished name like Netscape defines it. After this you must set all DNS-names and the IPs of the server in the subject alternative name. If you do this then all standard compliant browsers will evaluate the subject alternative name first and will ignore the common name in the distinguished name. So the certificate is standard compliant but supports the cruel behaviour of Netscape too.
Before you think this is a perfect solution then please think about aliases. My personal record are 20 different names for one computer which I have to code in a common name. If you think that it is easy then please remember that a common name can only be 64 characters long.
Mailservers usually include SMTP daemons. SMTP servers act as server and client because they work in a hierarchy. Some server softwares like sendmail require that the SMTP server identifies itself as a SMTP client if it contacts another SMTP server. Usually you only want to issue one certificate per server and not one certificate per service and therefore you have to set the extensions for SSL Client and SSL Server like recommended by OpenSSL (please see "man x509" after you installed OpenSSL). If you use sendmail then you can create a server certificate for the SMTP server and an additional client certificate. Sendmail supports two certificates per server or better per daemon.
Example 4.9. Minimal SSL client extensions
keyUsage = digitalSignature extendedKeyUsage = clientAuth nsCertType = client
Example 4.10. Minimal SSL server extensions
keyUsage = digitalSignature, keyEncipherment extendedKeyUsage = serverAuth, msSGC, nsSGC nsCertType = server
Example 4.11. Minimal SMTP extensions for a single certificate
keyUsage = digitalSignature, keyEncipherment extendedKeyUsage = clientAuth, serverAuth, msSGC, nsSGC nsCertType = client, server
If you want to use OpenCA with F-Secure VPN+ then you should bear in mind that this software can only download a CRL via http or ldap. They don't support https and ldaps. This is important if you configure your CRLDistributionPoints in OPENCADIR/etc/openssl/extfiles/*.ext. You can easily fix this problem by using LDAP for CRL-distribution.
Certificates for VPN+ Gateways and Machine certificates should include the DNS name and IP address in the subject alternative name. The certificates for the persons to authenticate them can be contain anything you want. It must only be valid client certificates.
First we describe the concept of additional attributes and then we describe the two general types of requests - external prepared PKCS#10 requests and during the interaction generated requests.
Usually the first question is about what does an additional attribute be? Additional attributes where introduced to store extra informations in a request without publishing these informations. Big organizations or trustcenters need a lot of information and only a minimal subset should be public. If you are a postmaster or a webmaster of a university then it is a good idea to put the general emailaddresses into the certificates but it is not really optimal to store the telephonenumber in the certificate. Nevertheless it makes sense for the trustcenter stuff to have the phonenumber in a case of emergency.
Example 4.12. Additional attributes configuration
ADDITIONAL_REQUEST_ATTRIBUTES "requestercn" "email" "department" "telephone" ADDITIONAL_ATTRIBUTES_DISPLAY_VALUE "Name (first and Last name)" "Email" "Department" "Telephone" ADDITIONAL_REQUEST_ATTRIBUTES_STRING_TYPE "LATIN1_LETTERS" "EMAIL" "LATIN1_LETTERS" "LATIN1_LETTERS"
These are the internal names for the attributes.
Here you have to define the displayed names for the attributes. This is useful for example if you have two public interfaces for example an english and a german one.
LETTERS
TEXT
NUMERIC
MIXED
DATE
TEL
LATIN1_LETTERS
LATIN1
The first certificates which were needed in the open source are were server certificates. The most systems which use such certificates are Apaches, OpenLDAPs, IMAPDs, POPDs, SMTPDs and S-Tunnel. Such systems generate the private key by itself - means the administrator generate a key by hand or via the software but there is no interaction with the trustcenter's software until the administrator created a request with the key or exported a request from the software.
Example 4.13. PKCS#10 configuration
DN_TYPE_PKCS10_REQUIRED_ELEMENTS "CN" "OU" "O" "C" DN_TYPE_PKCS10_BASE "O" "C" DN_TYPE_PKCS10_BASE_1 "OpenCA" DN_TYPE_PKCS10_BASE_2 "it"
Example 4.14. Basic CSR configuration
Basic_CSR_Keysizes "512" "768" "1024" "2048" "4096" DN_TYPES "BASIC" DN_TYPE_BASIC_KEYGEN_MODE "SERVER" DN_TYPE_BASIC_KEYGEN_SHEET "@lib_prefix@/servers/@pub_prefix@/sheets/basic_csr_confirm_request.html" DN_TYPE_BASIC_BODY "Y" DN_TYPE_BASIC_BASE "O" "C" DN_TYPE_BASIC_ELEMENTS "emailAddress" "CN" "OU" DN_TYPE_BASIC_NAME "Basic User Request" DN_TYPE_BASIC_BASE_1 "@ca_organization@" DN_TYPE_BASIC_BASE_2 "@ca_country@" DN_TYPE_BASIC_ELEMENT_1 "E-Mail" DN_TYPE_BASIC_ELEMENT_1_MINIMUM_LENGTH 7 DN_TYPE_BASIC_ELEMENT_1_REQUIRED "YES" DN_TYPE_BASIC_ELEMENT_2 "Name" DN_TYPE_BASIC_ELEMENT_2_MINIMUM_LENGTH 3 DN_TYPE_BASIC_ELEMENT_2_REQUIRED "YES" DN_TYPE_BASIC_ELEMENT_3 "Certificate Request Group" DN_TYPE_BASIC_ELEMENT_3_SELECT "Internet" "Partners" "Employees" "Trustcenter" DN_TYPE_BASIC_ELEMENT_3_MINIMUM_LENGTH 8 DN_TYPE_BASIC_ELEMENT_3_REQUIRED "YES"
The default type which is supported by OpenCA is BASIC. You can simply add a type and set a correct link in the public gateway. You can find an example on the public gateway by looking at the link “Basic Request”.
The prefix of every definition is now DN_TYPE_BASIC_. The NAME defines the displayed name (e.g. "Request for managers only"). The BODY defines the type of the request. If the value is Y or YES then a key and a request will be stored and if necessary generated. If the value is N or samp then only a header will be generated. This option is used to get the necessary data from a user to initialize a smartcard on the registration authority.
DN_TYPE_BASIC_KEYGEN_MODE specifies the way how to generate a key and request. The supported modes are SERVER, SPKAC and IE. SPKAC is used with Opera, Mozilla and Netscape, IE is used for Microsoft Internet Explorer and SERVER is used for all other situations.
The BASE is the part of the subject which is not editable by the user who requests a certificate. The other BASE_numbers define the values of the elements which are used for the not editable part of the subject.
These are the displayed names of the elements. The normal user don't know what is a CN or a commonName. The most users will be confused if they see two fields with the same name (e.g. OU). So you can give the attributes some names which match their semantic.
This field defines what the minimum length of the value is. If you don't know it then simply use 0.
Usually the user has to fill all fields but sometimes it is a good idea to have some optional fields. If you have such an optional field then please set the value to something different than “YES”. If a value is entered by the user then the option *_ELEMENT_number_MINIMUM_LENGTH still will be checked.
All fields are textfields by default. You can specify *_ELEMENT_number_SELECT followed by a list of values. OpenCA creates a HTML-select from this definition.
If you need some more options or you have an export from an ERP database then there is an additional method to create HTML-select fields. You can create a XML file which must contain a list. The filename you must specify here.
Example 4.15. Configuration example for a XML file based HTML-select
<openca> <basic_csr> <basic> <element_3> <option>Computer staff</option> <option>Management</option> ... </element_3> </basic> </basic_csr> </openca>
This options enforce the inclusion of the request's serial in the subject of the certificate. This is a simple method to guarantee that the subject is unique. True values are Y, YES and ON.
If the serial of the request will be included then this option defines which attribute is used for the serial.
This options enforce the inclusion of the certificate's serial in the subject of the certificate. This is a simple method to guarantee that the subject is unique. This option is more recommended than SET_REQUEST_SERIAL_IN_DN because the value is tranparent. True values are Y, YES and ON.
If the serial of the certificate will be included then this option defines which attribute is used for the serial.
This option is used to enforce recommendations of S/MIME v3. If you don't want to include the emailaddress in the subject then you can use this option. OpenCA will remove the emailaddress from the subject before it issues the certificate. True values are again Y, YES and ON.
base dn or suffix: dc=university,dc=edu user dn: dc=mike tester,dc=university,dc=edu webserver dn:dc=www,dc=university,dc=edu ca dn:dc=CA,dc=university,dc=edu
There are two things which must be changed in the configuration files of the servers.
basedn "dc=university,dc=edu" ldaproot "dc=manager,dc=univesity,dc=edu"
DN_TYPE_BASIC_BODY "YES" DN_TYPE_BASIC_KEYGEN_MODE "SERVER" DN_TYPE_BASIC_KEYGEN_SHEET "/usr/local/OpenCA/lib/servers/pub/sheets/basic_csr_confirm_request.html" DN_TYPE_BASIC_BASE "DC" "DC" DN_TYPE_BASIC_ELEMENTS "DC" DN_TYPE_BASIC_NAME "Basic User Request" DN_TYPE_BASIC_BASE_1 "University" DN_TYPE_BASIC_BASE_2 "edu" DN_TYPE_BASIC_ELEMENT_1 "Name"
Please check the installed or prepared files with the name main.html because several HTML files display the suffix of all the DNs.
You can find these files in lib/servers/ra/mails. They are the default templates for the mails which RA Operators can send to the users. They include the suffix of the LDAP server. This suffix is called Dir Root. This suffix must be changed according to the real suffix of your LDAP server.
You must modify the files OPENCADIR/etc/openssl/openssl.cnf and OPENCADIR/etc/openssl/openssl/*.conf. The policy and req sections must be changed to support requests and certificates with subjects in the dc-style. If you don't know how to configure OpenSSL then please read the documentation of OpenSSL.
If you generate the initial request for the CA request then please ignore all the fields for the normal subjectstyle. Simply enter nothing in all field until the software displays the window which show you the complete subject. There you have to enter the complete subject of the CA request. The subject is in RFC 2259 format and all “DC” must be written in big letters because OpenSSL is case sensitive.
The most people want to use OpenCA for issuing certificates to users or they want to test a PKI without buying a commercial trustcenter only for testing. So they want create a request, approve the request and issue a certificate. The problem is that they forget to the edit the request and the subjct alternative name was not set.
OpenCA knows two switches in ca.conf to set the subject alternative name automatically. The switch AUTOMATIC_SUBJECT_ALT_NAME enables the mechanism to set the subject alternative name automatically if it was not set in the header of the request. The second switch DEFAULT_SUBJECT_ALT_NAME defines the type of the default value. Actually we implemented only support for the emailaddress. If you need support for DNS name(s) or IP addresse(s) then contact us. We only don't implement it because nobody need it until now.
If you edit the subject alternative name on the RA interface then you see only four fields where you can enter parts of the alternative name. If you fill all fields then you will get at next time you want to edit the alternative name one additional field. If you know that you need more or less fields then you can change the option CSR_MAX_SUBJECT_ALT_NAMES in the configuration files. The option defines the number of the displayed fields by default. It is NOT a hard limit.
OpenCA provides an LDAP interface for users to download certificates from a central repository. This interface can be utilised by browser address books and specialised LDAP clients.
Before the OpenCA RA components can write certificates and CRLs to the directory you must have an LDAP compliant directory installed and available to the RA components (this can be on the same or different machine). One example of an appropriate directory is the OpenLDAP project.
core.schema
cosine.schema
inetorgperson.schema
Ensure the directory is started with the appropriate suffix (e.g. o=myorg,c=gb).
Ensure the rootdn is specified.
Ensure the root password is specified.
If you set this option to yes or on then the LDAP code will be activated.
This is the hostname of your LDAP server.
This is the port where your LDAP server listens.
This option contains the base-DN of your LDAP-server. It is the root of your LDAP-server. This is the same thing which is called suffix in OpenLDAP's configurationfile. You can add here several suffixes if your LDAP server supports this feature (e.g. OpenLDAP v2). The suffixes must be seperated by whitespaces (e.g. "o=Humboldt-University of Berlin, c=DE" "o=Charite, c=DE").
This is the DN of the user which OpenCA uses to bind to the LDAP-server and add or remove entries. The most user set here the rootuser of the LDAP-server but this is not mandatory.
This is the passphrase for the DN which is used to bind to the server (ldaproot). Actually this is a cleartext passphrase.
OpenCA supports LDAP v2 and v3. The default is v2 because all servers can support v2. Several new distributions especially of Linux deactivates the LDAP v2 support. So if your OpenCA LDAP code completely fails check first the protocol versions of OpenCA and your LDAP server.
Some other options like ldaptls and ldapsasl require LDAP v3. So be really careful which protocol you use. If your LDAP server supports protocol version 3 then please use it. It avoids a lot of trouble.
Use no or yes to deactivate or activate TLS. Please remember that this option only works with LDAP v3.
Use no or yes to deactivate or activate SASL. Please remember that this option only works with LDAP v3. We use CRAM-MD5 for passphrase hashing.
This option will be used by the node interface. If the value is yes then the LDAP server will be updated automatically during imports of certificates, CRRs or CRLs.
Some users want to store the CRL in a special node of the LDAP server which is not identical with the issuer of the CRL. This can be happen if the user specifies a special CRL Distribution Point (CDP) which differs from the subject of the CA certificate. Here you can specify this special distinguished name. Please remember that OpenCA is today not able to add this node automatically if it is not present.
Some users want to store the CA certificate in a not standard conform node which means that there is perhaps an already existent directory which conflicts with the PKI structure. Here they can add the distinguished name of this special node. This node can be automatically added by OpenCA.
OpenCA supports the possibility to exclude roles from certificate publishing. This can be useful for security reason and be required by privacy laws. If you have such a special role simply add it to to this options (e.g. "Corporate Security" "Security Officer" "IDS").
As long as the option updateLDAPautomatic is set to yes the RA will attempt to upload certificates to the directory after an import. Before this can happen the directory must be initialised and the appropriate structure must be implemented. In this version of OpenCA this initialization is done automatically.
SCEP is the successor of CEP the Certificate Enrollment Protocol. Both protocols were developed from Cisco. The idea is to have simple but secure protocol to enroll certificates and CRLs. Today many network components use SCEP to manage certificates and CRLs. Some of these components are Switches, Routers, Firewalls and VPN-Softwares.
OpenCA support SCEP via an own web interface. The interface is called scep and you can install it via "make install-scep". After the installation you have only to configure the file OPENCADIR/etc/servers/scep.conf or you edit OPENCADIR/etc/config.xml before you run OPENCADIR/etc/configure_etc.sh. Please remember to only filter via IP addresses because SCEP doesn't support any authentication mechanisms. A SCEP client can connect the interface via http://your_host/cgi-bin/scep/scep.
This is the PEM encoded private key of the SCEP interface. It has the same format like for mod_ssl.
This is the PEM encoded certificate of the SCEP interface. It has the same format like for mod_ssl.
This is the passphrase for the private key of the SCEP server. If you use a not encrypted private key (what is not recommended - then please set an empty string here. interface. It has the same format like for mod_ssl.
This is the PEM encoded private key of the SCEP interface. It has the same format like for mod_ssl.
This is the PEM encoded certificate of the SCEP interface. It has the same format like for mod_ssl.
This is the passphrase for the private key of the SCEP server. If you use a not encrypted private key (what is not recommended - then please set an empty string here. interface. It has the same format like for mod_ssl.
The dataexchange of OpenCA is highly configurable. So first we have to describe some general concepts.
If you look at OpenCA from a database viewpoint then OpenCA is a tree of hierarchical organized databases. Every database is used by some web interfaces. So one node of the hierarchy consists of a database and some web interfaces. If we describe the dataexchange then we describe the dataexchange between nodes. This is the reason why we called the management interface node.
A node can exchange data with a node of a higher level of the hierarchy or with several nodes which are on a lower level of the hierarchy. If export data to a higher level of the hierarchy then we UPLOAD data and if we import data from such a node then we DOWNLOAD data. If import data from a lower level then we RECEIVE data and if export data to such a node then we ENROLL data.
If you exchange object in a security relevant area then you must define which object with which state you want to exchange. Therefore you can define in OpenCA which objects with which state you accept from which direction. Also OpenCA allows only to overwrite existing objects if you DOWNLOAD CA-certificates, CRLs, CSRs and CRRs. Status or object injections are not accepted in all other situations. OpenCA includes some default configurations to help you on the way to secure configuration.
Example 4.16. Download configuration
DOWNLOAD_CA_CERTIFICATE_STATES VALID DOWNLOAD_CERTIFICATE_STATES VALID DOWNLOAD_CRL_STATES VALID DOWNLOAD_CRR_STATES ARCHIVED DELETED APPROVED DOWNLOAD_CSR_STATES ARCHIVED DELETED DOWNLOAD_MAIL_STATES CRINS DEFAULT
Example 4.17. Export configuration
EXPORT_IMPORT_UP_DEVICE "/dev/fd0" EXPORT_IMPORT_UP_START "" EXPORT_IMPORT_UP_STOP "" EXPORT_IMPORT_UP_EXPORT "/bin/tar -cvfp @__DEVICE__@ -C @__SRC__@" EXPORT_IMPORT_UP_IMPORT "/bin/tar -xvf @__DEVICE__@ -C @__DEST__@" EXPORT_IMPORT_UP_TEST "/bin/tar -tvf @__DEVICE__@"
Example 4.18. Local export configuration
EXPORT_IMPORT_DOWN_DEVICE "openca.tar" EXPORT_IMPORT_DOWN_START "/sbin/ifconfig eth0 up" EXPORT_IMPORT_DOWN_STOP "/sbin/ifconfig eth0 down" EXPORT_IMPORT_DOWN_EXPORT "/bin/tar -cvfp /usr/local/openca/var/tmp/@__DEVICE__@ -C @__SRC__@" "/usr/bin/scp /usr/local/openca/var/tmp/@__DEVICE__@ openca@ra.openca.org:/usr/local/OpenCA/var/tmp/" "rm /usr/local/openca/var/tmp/@__DEVICE__@" EXPORT_IMPORT_DOWN_IMPORT "/usr/bin/scp openca@ra.openca.org:/usr/local/OpenCA/var/tmp/@__DEVICE__@ /usr/local/openca/var/tmp/@__DEVICE__@" "/bin/tar -xvf /usr/local/openca/var/tmp/@__DEVICE__@ -C @__DEST__@" "rm /usr/local/openca/var/tmp/@__DEVICE__@" EXPORT_IMPORT_DOWN_TEST ""
The standard data exchange between RA and CA is done via /dev/fd0 (floppy). If the CA and RA are really big then it is recommended to change the data exchange location to a simple file on the local system (for example OPENCADIR/var/tmp/fd0). Please always remember that your apache must be able to access this file. You can also do a chown and set the owner to apache's user.
You also have to edit the dataexchange sections of the .conf files in OPENCADIR/etc/servers/ to point to the new file (edit the lines EXPORT_IMPORT_*_DEVICE).
It is recommended to erase the file after transfers, because the exchange can contain private keys of users.
If the CA and RA are located on different machines in a secure environment with perhaps an offline CA it can be difficult to do the dataexchange via simple files (the files have to be transferred between CA and RA, either via a diskette or ftp (not secure)). OpenCA offers the possibility to do the dataexchange automatically via scp.
Create a new file for the export with the correct permissions like OPENCAIDR/var/tmp/fd0
Edit the ra_node.conf file in OPENCADIR/etc/servers/ to point to the new file (edit the lines EXPORT_IMPORT_*_DEVICE).
The EXPORT_IMPORT_DOWN_DEVICE is the file used for datexchange and must have the same name as the one defined in ra_node.conf on the RA side.
The EXPORT_IMPORT_DOWN_START can have no value or a value like "ifconfig eth0 up" in which case the CA goes online for the dataexchange.
The EXPORT_IMPORT_DOWN_STOP can have no value or a value like "ifconfig eth0 down" in which case the CA goes offline after the dataexchange.
In the EXPORT_IMPORT_DOWN_EXPORT line we can define the operations OpenCA has to perform when doing an export (CA to RA transfer).
In the EXPORT_IMPORT_DOWN_IMPORT line we can define the operations OpenCA has to perform when doing an import (RA to CA transfer).
In the EXPORT_IMPORT_DOWN_TEST line we can define the operations that have to be performed to test the transfer (was it successful or not).
If you create a new node e.g. a second RA then you have to support this node with the dataexchange mechanism. Every interface of OpenCA must have a unique module ID. OpenCA manage the complete dataexchange with the ID of the node interface. The node interface knows which object of which datatype was already received by another node.
If you want to create a new node then you must create the corresponding files in OPENCADIR/var/log. You have simply to create some files in the directories OPENCADIR/var/log/enroll and OPENCADIR/var/log/download depending on the direction which you use for epxort. These directories contain some files of the style $number_$datatype. $number is the module ID of the node to which you want to export the data. The datatype is from the exported objects.
If you created a new module ID (e.g. you setup another RA) then you have simply to touch the file $number_$datatype. The new file is empty and so all objects will be exported.
This is only a short introduction to PostgreSQL. This section should not replace the reading of the PostgreSQL Administration Guide but after the lecture of this section you should be able to setup OpenCA very easily with a real datbase and not only with DBM files. This is important because PostgreSQL has transaction support which is essential for serious database applications.
If we talk about real world databases then it is a good idea to mention pgadmin III. The old versions pgadmin I and II only support windows. The third version supports Unix too. So there is now a GUI like for MySQL available which can be used to manage the database. There are people who think that GUIs are not necessary but they enhance the management of several things a lot because not everybody has the time and skill to optimize it's PostgreSQL database perfectly.
Another note about security, please never trust database security mechanisms fully. Use at every time a small IP-firewall in front of your database server. The default installation of OpenCA is a datbase server on localhost. If you want to install a database server on a different machines than the OpenCA components then always install these servers at minimum in a DMZ. Databases like PostgreSQL has today it's own strong security mechanisms but they have from time to time some big bugs. OS-based IP-filters like ipf or netfilter are usually more robust.
large object are included
create the database newly on recovery
export all data as insert commands to support on the fly database mogration
columnname based inserts to support rearrangement of column ordering
DBM file are much easier to handle than real SQL databases. If you want to use these database then you must only ensure that the directory which should contain the database files is fully writeable, readable and accessible by the webserver user. This will be handled by OpenCA's installation routine automatically. Sometimes in the past the users choose the wrong webserver user. The result is a message in the logs that the function configError doesn't exist. This happens because the OpenCA script cannot load the library files. The new versions of OpenCA (0.9.1.4+) display correct errormessages in this case. Extra actions by the installing administrator are not necessary.
Please never forget that DBM files don't support transactions. If you implement a real world PKI then it is strongly recommend to use SQL databases to have a consistent state of the PKI even in the case of a system crash. DBM has also problems with multi user access for example on web servers with high loads.
Table of Contents
This is the ultimate user guide for OpenCA. Here we want to answer all the questions which user can have if they use OpenCA.
Table of Contents
This section describes the public interface to the OpenCA PKI. From these screens a user can view current certificate lists, manage certificates and download CA and revocation certificates.
This section describes the CA related utilities a user can access. Each heading below relates to a link on the left hand menu bar.
By hitting this link the user is presented with a page titled "CA-Certificate Page". This page contains links to CA certificates in various formats.
In order for the user to "trust" certificates generated through OpenCA they must have the Certificate Authority root certificate installed. This page provides an easy mechanism for them to do that. Most users will just click the "CA-certificate in format CRT" and follow the instructions presented to them by their environment (e.g. In IE they have the option to "Open" the file and then "Install Certificate").
Apache Web server administrators would use the link "CA-certificate" to download the certificate in the appropriate format for inclusion in the Apache configuration files.
By hitting this link the user is presented with a screen entitled "CRL Page". This page contains links to certificate revocation lists in various formats.
Many certificate aware clients (like Microsoft Outlook and Netscape Navigator) make use of certificate revocation lists to ensure that certificates are still valid and have not been revoked.
Three links are provided each containing the current CRL in a different format depending on the client. Normal client users would download the CRL in DER format for inclusion in their browser. Web server administrators would use the PEM format. The text format is downloaded as a human readable file.
This section allows the user to manage their certificates. It allows certificate request, retrieval, testing and revocation.
This link presents the user with a page offering a number of certificate request methods. There are subtile differences between methods which are described below. Each one of the links will take the user to a form. The user will fill in the form and submit the data. The data submitted will be used to create a certificate signing request (CSR) which will go to the certificate Authority to sign and return as a certificate.
E-Mail: The email address associated with the certificate
Name: The name of the user
Certificate Request Group: This is usually the department or sub group the user belongs to
Role: The certificate role within the hierarchy, this is usually "User" for most normal users
Registration Authority: This is usually the physical location at which the user is to be identified (e.g. Personnel)
PIN: A password used to verify the CSR
Key Size: The size of the key used in the CSR (Usually set to 1024
After submitting the form the next set of screens the user sees will depend on the client being used and the type of request selected. After the CSR has been generated and submitted the user will be issued with a Certificate Request ID. This takes the form of an integer number. It is important that the user notes this number down as it is required when retrieving their certificate.
Once the user has requested their certificate the Certificate Authority will process the certificate request. This may involve a face to face identification of the user at the Trust Center. When the certificate has been created the user will be informed by email. This email will also include a Certificate Revocation Number (CRIN), this number should be kept in a safe place as it will be required if the user to needs to revoke their own certificate in the future.
By pressing this link, OpenCA will try to determine what browser the user is using to request their certificate. Once this has been established the CSR form is presented to the user. The CSR (along with the associated private and public keys) will be generated by the user's browser and submitted to the Certificate Authority.
This link leads to a server side key and CSR generation. A user would use this link if their browser did not support CSR generation, of if for some reason they wanted the Certificate Authority to generate the keys and CSR (e.g. For key backup on the server).
This link should be used if the client is a Netscape type browser (e.g. Navigator or Mozzilla). The CSR generated by the client will be of the type SPKAC.
This link should be used if the client is an Internet Explorer type browser. The CSR will be generated by the client.
This link is used to submit a web server certificate request. This is slightly different from a normal client certificate request as the CSR will have already been generated at the web server. There is a field used to upload the CSR, so the user must make sure that they have a CSR to upload before selecting this option.
This link is the same as the "Basic Request" in that the keys and CSR are not generated at the client. This request is used when the Certificate Authority is going to create the key pair and certificate on a hardware token. You only enter your data and the data is stored at the server but no cryptographic operations take place without operator interaction. In simple terms it is like an email with "Hello, I need a cert. Sincerly your Jon Doe".
This link provides the mechanism for a user to retrieve the requested certificate and install it in the browser.
The user is presented with a screen and a set of instructions. The most important being that the user must be using the same computer that was used to request the certificate. This is important because both IE and Netscape type browsers need to link the certificate back to the CSR and private keys, this can only be done if the computer that was used to generate the CSR is used to retrieve the certificate.
The serial number of the certificate signed by the Certificate Authority
The serial number of the submitted request issued to the user at CSR submission time
This is the ID which i used for the batchprocessor. Usually this ID is an account but the ID was defined by the administrator of the batchprocessors.
Upon pressing the "Continue" button, OpenCA attempts to install the certificate into the user's browser. The screens presented to the user depend on the browser being used.
By pressing this link the user is presented with a screen displaying the session server and client certificate details. In most cases this screen will only display the details of the web server certificate used to secure the session (as this screen is not usually access via pages requiring client side authentication).
The user is offered the opportunity to "Sign" a set of data to test the client certificate. Upon pressing the "Sign" button the user is asked to choose the certificate they wish to use to sign the test data. Once they have chosen their certificate they may be asked to enter the pass phrase securing their private keys (this depends on how the user installed the certificate and private keys during key generation time). Once they that completed this the results of the signing process are displayed.
This screen gives the user the opportunity to revoke their own certificate. To do this they need to fill in the form and press "Continue". The Certificate Serial number can be obtained by examining the certificate (using browser functions) or by looking up the certificate in the valid certificates list. The CRIN code was sent to the user at certificate creation time.
This set of options provides the user with lists of certificates in various states, valid, expired, revoked and suspended. It also provides an interface for the user to search for a certificate.
Following this link the suer is presented with a screen displaying all valid certificates. The screen shows 20 certificates at a time. The user can scroll through the valid certificates by using the "Extra References" link in the top right of the screen.
The serial number of the certificate
The common name associated with the certificate
The date and time the certificate was issued
The email address in the certificate (the user can click this link to mail the certificate holder)
The type of certificate (e.g. User)
A user can view the content of a certificate by clicking the serial number of the certificate they wish to view. OpenCA presents a screen displaying the certificate details. At the bottom of this screen are two new links where the user can download the certificate (and install it into their browser) or initiate the revocation procedure (in order to do this the user must have the CRIN number for the certificate being viewed, this number is presented to the certificate holder at certificate creation time, so only the certificate holder can revoke their own certificate).
Clicking this link shows the user a list of all the expired certificates. The screen shows 20 certificates at a time. The user can scroll through the expired certificates by using the "Extra References" link in the top right of the screen.
Clicking this link shows the user a list of all the revoked certificates. The screen shows 20 certificates at a time. The user can scroll through the revoked certificates by using the "Extra References" link in the top right of the screen.
Clicking this link shows the user a list of all the suspended certificates. The screen shows 20 certificates at a time. The user can scroll through the suspended certificates by using the "Extra References" link in the top right of the screen. Suspended certificates are certificates that have had the revocation process started but not yet revoked by the Certificate Authority.
This link provides a screen to enable users to search for a certificate on the system. The screen allows the user to search based on the criteria of name, email or distinguished name. Wild cards are allowed (e.g. Chris*) in each of the fields. You do not have to fill in each of the fields for the search function to find a match, but the more search data you enter the finer the granularity of the search.
This section displays outstanding requests. New certificate requests and revocation requests can be displayed.
Following this link the user is presented with a list of all the current certificate requests at the Registration Authority. The screen shows 20 requests at a time. The user can scroll through the list by using the "Extra References" link in the top right of the screen.
Following this link the user is presented with a list of all the current certificate revocation requests at the Registration Authority. The screen shows 20 revocation requests at a time. The user can scroll through the list by using the "Extra References" link in the top right of the screen.
This section describes the registration authority interface to the OpenCA PKI. From these screens an RA Administrator can manage certificate requests, view certificate information and manage the RA server.
Each one of the headings below coresponds to a section in the left hand menu pannel of the default RA screens.
Pressing this link takes the user to the RA Node interface. From here the RA user can control data flow to and from the RA.
This link displays the user submitted requests and enables the RA Administrator to presses them.
Pressing this link displays a main screen giving the user a drop down list of Registration Authorities to act as. Depending on the configuration "Trustcenter itself" is the default. Clicking the "Continue..." button displays a list of the certificate requests at the selected RA.
Each one of the requests must be processed in turn. By clicking the serial number of the request the user is presented with the details of the request. Four options are then available to the RA User:
Pressing this button allows the RA User to edit the details of the request. The editable fields are; Subject alternative name (this is usually defaulted to the supplied email address, but can contain other fields), Subject (or the DN) and Role (or certificate type).
Pressing this button allows the RA User to approve the request and use a certificate to sign this approval. Upon pressing the button the RA User is presented with a list of certificates with which to sign the request approval. Note, if the requests are going to be processed on the CA as a batch process, then each request must be signed with a valid RA certificate (signed by the certificate authority).
Pressing this button approves the request. Note, this can potentially be dangerous as the CA Administrator will have to make a trust decision to process the request or not. If the approved request was signed by a valid RA cert then this decision is unnecesary.
This section allows the user to look at certificates and requests in all states.
The RA Node is the interface used to control RA operations that deal with external interfaces, for example exporting request data to the Certificate Authority.
This section lists the OpenCA components.
This link takes the user to the main CA Server page. This link is only available if the CA is accessable. In the normal OpenCA configuration the CA is offline and so this link will fail.
This section takes the user to a screen to manage the LDAP server, if one has been configured. The following options are available.
This section lists the options available to configure and maintain the RA Node.
This screen is used to set up your OpenCA RA. It is intended that the screen be used once and once only. There are two links:
The RA Administrator should press this link to run the data base initialisation script. Note if you run this script on an existing data base then you are likely to loose all existing data. Be careful !
This link is used to exchange data with other areas of the PKI infrastructure (e.g. CA). Depending on your implementation of OpenCA, only some of the following sections will apply.
It is unlikely that there will be a lower level of the hierachy at the RA.
It is unlikely that there will be a lower level of the hierachy at the RA.
This section is used to download data from the CA to the RA. In order to use this section, data must have already been exported from the CA. This data is usually stored on a floppy disk. Upon clicking any of the following links the user is prompted "You need to provide a support to proceed (depends on your configuration). Are you sure you want to continue ?". This means that you need to have read access to the device that the exported data is on (e.g. the floppy drive).
Pressing this link imports all the data that has been exported from the CA into the RA.
Pressing this link imports only the configuration data from the CA to the RA. This is data like user roles (certificate types).
This section enables the RA Administrator to export data to the export device ready for import to the CA. Upon clicking any of the following links the user is prompted "You need to provide a support to proceed (depends on your configuration). Are you sure you want to continue ?". This means that you need to have write access to the device that the exported data going to be written to (e.g. the floppy drive).
Note, the export of data is in the form of a delta, i.e. only new or modified data is exported. It is an administration task to modify this behaviour.
This section allows the RA Administrator to backup and recover the OpenCA RA database. It is good practice to perform a data base backup regularly.
Pressing this link backs up the database to the export device. Upon clicking the link, the user is prompted "You need to provide a support to proceed (depends on your configuration). Are you sure you want to continue ?". This means that you need to have write access to the device that the exported data going to be written to (e.g. the floppy drive).
Pressing this link configures the data base for import of data. If you are rebuilding the RA then it is important to press this link.
If the RA data base is based on DBM files (i..e the default option), use this link to recover the backup data.
If the RA data base is an SQL data base (the preffered option) then use this link to recover the backup data.
Pressing this link sends the "New User" emails out to new users. These emails tell the users that their certificates are aready for collection and gives them a link to the public interface to collect their certificates.
Pressing this link sends new users an encrypted CRIN mail. The CRIN mail contains a pin code that the user must enter when revoking their own certificates. The user should be able to decrypt the message as they would have created the private key during their certificate request process. The message is encrypted using the public key in the certificate request.
This set of screens controls the uploading of data to the LDAP Directory (if there is one configured).
Pressing this link uploads the CA certificate to the LDAP server. The main screen shows this process and indicates the upload status and success or failure.
Pressing this link uploads the current valid certificates to the LDAP direcrectory and removes revoked certificates from the directory. The main screen shows the status and indicates success or failure.
This link displays a main screen showing the CA certificate. Clicking on the serial number of the certificate displays a new page showing the certificate details.
As this page is from the LDAP server, there are 4 LDAP related options:
Allows the user to enter a modified DN for the certificate and then publish it to the LDAP directory with the modified DN.
This link displays a list of the valid certificates. Clicking the serial number of a certificate displays the certificate details.
As this page is from the LDAP server there a 4 LDAP related options:
Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.
This link displays a list of the expired certificates. Clicking the serial number of a certificate displays the certificate details.
As this page is from the LDAP server there a 4 LDAP related options:
Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.
This link displays a list of the suspended certificates. Clicking the serial number of a certificate displays the certificate details.
As this page is from the LDAP server there a 4 LDAP related options:
Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.
This link displays a list of the revoked certificates. Clicking the serial number of a certificate displays the certificate details.
As this page is from the LDAP server there a 4 LDAP related options:
Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.
This link displays a list of the certificate revocation lists (CRLs). Clicking the Ver (***is this a bug, I think you should click the CRL serial number ***) of the CRL displays the CRL details lists the revoked certificates.
Clicking on the serial number of a revoked certificate displays the certificate details screen in the same way as pressing the "View Certificates Valid" link.
As this page is from the LDAP server there are 2 LDAP related options:
Table of Contents
This link initializes the database. If you use OpenCA::DB then the backend consists of DBM files. If you use OpenCA::DBI then the backend consists of an SQL database. Today we support MySQL, PostgreSQL, IBM DB2 and Oracle. If you need another database then please contact us.
Here we do the keygeneration for the CA. You have to enter the algorithm for the key itself, the algorithm for the encryption of the key and the length of the key. If you entered all the cryptographic paramters then you must enter the passphrase if you use an software token from OpenSSL. If you use a hardware token then you must active this token by the appropriate action.
If you start creating a new certificate request for the CA certificate then you will be prompted for several informations which will be needed to create a certificate of the style “emailAddress=...,cn=...,ou=...,o=...,c=...”. After you entered all the data OpenCA will display the complete subject of the request. This is the last time when you can modify the subject. If you need another style e.g. dc style then you can enter in this field a subject of your kind. After you entered all parameter for the request the private must be activated (usually via a passphrase).
There are two general options for a CA certificate in OpenCA. You can use the CA as a root CA then you have to create a selfsigned certificate or you can setup a sub CA then you have to go to another CA and let it sign your request. Both variation need a different handling.
If you want to create a new root CA then you have simply to create a new selfsigned CA certificate. This is much more simple then to setup a new sub CA but it is more dangerous. Before you create a new CA certificate please check OPENCADIR/etc/openssl/openssl.cnf. The extension are in the section v3_ca. It is highly recommend to set the option subjectAltName explicitly. If you click on the link then you have only to activate the private key and the rest will be done automatically.
We talk about a “root CA” in this section but the CA which issues the CA certificate for the new CA which is a sub CA has not to be a root CA. We only use this term to have to different unique namespaces for the CAs in this section.
First you have to export the request to the root CA which has to issue your CA certificate. OpenCA will create a tar file on your export media. This tar file contains a file careq.pem. This file is your request in PKCS#10 format. The encoding is PEM (base64). Please go with this request to the root CA and follow its instruction for request processing.
If the root CA issued a certificate for the new sub CA then you have to create a new tar file on your import media. The tar file must contain the file cacert.pem which is the new CA certificate. If you click on the link for th import of the new CA certificate then OpenCA copies the file to all necessary places.
The last steps can also be done on the interface for the nodemanagement but it is a good idea to do it during the intialization to get a consistent state. The rebuild of the CA chain is necessary to verify digital signatures correctly. If you want to setup a sub CA then you must add all CA certificates of the CA chain in PEM format to the directory OPENCADIR/var/crypto/chain/ before you rebuild the chain.
The really last step is the export of the configuration to the online server(s). The most OpenCA users ignore this step and handle all the communication between the different nodes of the PKI hierarchy via the interface for the node management. If this is you first OpenCA usage then you should export the configuration and import it into the online server.
This link uses the automatic browser detection of OpenCA so the key and request will be generated by the browser. If you want to use smartcards for the user certificates then you can create the first keypair on a smartcard too if you use the PKCS#11 or CSP drivers of the vendor. It is recommended to use the role “CA operator” for the first user certificate.
Like editing on the RA. See Section 2, “CSR Handling - a request HOWTO” for more details.
Like the issue link if you view a certificate on the CA. See the request handling in the user guide.
See Section 3, “Certificate Handling” for an explanation of the options.
how to submit the new request
how to edit a request
how to approve a request
how to issue a certificate
how to enroll a certificate
how to delete a request
explanations of the input fields
X.509 certificates are very well known and the format is really established but in the first years there are some problems with the requests because there was no simple protocol to submit requests via clientinterfaces. The result is that there is one standardized format for requests and one proprietary format too. The standard request format is PKCS#10 which is supported by all servers (e.g. web, mail, VPN) and Microsoft Internet Explorer. Netscape developed an own format called SPKAC. This proprietary format is used today by Mozilla and Opera. Surprisingly there is software available which uses certificates and private keys to encrypt data like emails or https-connections but is not able to create a private key or a request. Such a software is KDE's konqueror today. This software simple want to load prepared private key and certificate.
If you think “Wow what a complex area!” then please are not shocked but I don't talked about the request generation until now. The request is only the data but we need something like a procedure for creation and transport of the request too. The browsers know two ways today - Microsofts CAPI (Microsoft Internet Explorer) and Netscape's tag “keygen” (Mozilla, Netscape, Opera). A third way is the way of konqueror which expects we do all for it. A second big area are servers. Some servers like Apache has the same behaviour like konqueror. So you have generate the keys and requests by hand or go to the PKI's public interface and let the PKI does the job. Some other servers like VPN server can generate private keys and requests by itself. Servers and VPN clients support in contrast to webbrowsers two transport protocols - the manual way and SCEP. Usually you can copy the request to a floppy and go to your PKI or you use SCEP to handle all the communication with the PKI automatically.
Now is the moment to calm down and realize that we try to cover all these aspects and you have only to know what you have for a software and what you want to do. The following sections describe the steps for the different kinds of requests and submission technologies. If you have an Internet Explorer or need a certificate for Microsoft Outlook (express) then you must only read the section for the Microsoft Internet Explorer and so on. If you don't know what to do then simply use the interface with the automatic browserdetection.
You have to enter all the informations on the first screen. Please use only keylengths of 512, 1024 and 2048 bits. Other keylengths are actually not supported. It is highly recommended to use at minimum 1024. We recommend that you use 2048 bit because of the last theoretical papers on RSA algorithm. 1024 bits are still safe but it can happen that 1024 will cracked in the next years. If you entered all informations correctly and click ok then you will see a second screen. If you do something wrong then you will see the first screen again.
The second screen shows you the entered informations again. Please check the details. If you click ok then your Internet Explorer will start to generate a new key and request. If the operation succeeds then OpenCA will show you a success page with the serial number of the request. Please remeber this serial before you get in touch with the registration authority.
SPKAC request are used by Netscape, Mozilla and Opera. All three browser support the special tag keygen which is used to generate the private key and the request.
On the first screen you have to enter all the informations. The keylength can be ignored because you must select it on the second screen again because there is no way to set a default. If you entered all informations correctly and click ok then you will see a second screen. If you do something wrong then you will see the first screen again.
The second screen shows you the entered informations again. Please check the details. Now you have to select a keylength. It is highly recommended to use at minimum 1024. We recommend that you use 2048 bit because of the last theoretical papers on RSA algorithm. 1024 bits are still safe but it can happen that 1024 will cracked in the next years. If you click ok then your browser will start to generate a new key and request. If the operation succeeds then OpenCA will show you a success page with the serial number of the request. Please remeber this serial before you get in touch with the registration authority.
There are two methods to submit a pregenerated PKCS#10 - the webinterface or SCEP. SCEP will be covered completely seperate from this section. If you have a PKCS#10 request then you can upload it to the PKI's database. If it is rejected with an errormessage related to the subject (the distinguished name) of the request and you don't know what you are doing wrong then please contact your registration authority. It is possible configure some restrictions to enforce usable requests.
This is not a real request type. It is more a webformular that send an information to the RA that you want a smartcard. The request does not contain any cryptographic informations. It is simply used to collect some first informations about you.
This technology uses the same webpages like Microsoft Internet Explorer or Mozilla but there is a big difference. The browsers will generate the private key and request by themselves and only send them to the server but this interface will only send your entered data to the server and the server will create the key and request. You can use this technology for exaple if you need a certificate for a server and you have absolutely no idea from PKIs or you have a browser like konqueror which can use certificates and keys but is not able to generate requests.
On the first screen you have to enter all the informations. If you choose a keylength then it is highly recommended to use at minimum 1024. We recommend that you use 2048 bit because of the last theoretical papers on RSA algorithm. 1024 bits are still safe but it can happen that 1024 will cracked in the next years. If you entered all informations correctly and click ok then you will see a second screen. If you do something wrong then you will see the first screen again.
The second screen shows you the entered informations again. Please check the details. If you click ok then your data will be send to the server again and the server creates a private key and a request for you. Please remember the PIN. It is used to protect the private key. The databases on the server have no backup from this PIN! If all operations succeeds then OpenCA will show you a success page with the serial number of the request. Please remeber this serial before you get in touch with the registration authority.
The automatic browserdetection is used to determine which mechanism should be used to handle your kind browser. Please use this only if you need a personal user certificate because it really difficult to extract a certificate for a server from a browser and convert it to an appropriate format. If you use an Internet Explorer then please read section for Microsoft client requests. If you use Mozilla, Netscape, Opera or a Mozilla derivate like Phoenix or Firebird then please read the section for SPKAC requests. All other user browser will covered by the section for serverside key and request generation.
The input fields in this area are used to generate the subject of the certificate. The subject of a certificate is the name of the certificate.
These informations are only used internally. The entered data is stored in the database of the PKI but they are not part of the certificate. These fields are usually used for things like telephonenumber, addresses and personal IDs.
This is your role in the PKI. A role has several effects. First it decides which extensions will be added to your certificate. The extensions define for applications the certificate can be used. Second it can be used to manage the access rights in the PKI.
Deprecated. Will be replaced by LOA.
The PIN will be always hashed and stored in the database. It is planned to use the PIN to identify the issuer of the request because only he can know the PIN. This is not implemented today but the PKI can be configured to use this PIN to allow you start a revocation if you lost the private key and/or certificate. The PIN is called CRIN in this case.
If you use serverside key and request generation then this is the PIN for the private key. Only you know this PIN!
This is the used length of the private key. Please check this value on the second form too because some browser like Mozilla lost this information if OpenCA asks for your approval for the key and request generation.
If a user submits a request then this request must be verified by an operator. The operator can look at the request by using the request lists or search the database. If he wants to edit the request then he has to click on edit.
The subject alternative name contains additional informations for other softwares which use the certificate but have not the private key. Therefore this alternative name contain informations like emailaddresses, DNS names, IP addresses and more. Emailaddresses are important if you use this certificate for emailencryption because the most clients support only S/MIME v2 and this requires an emailaddress in the certificate. DNS names and IP addresses are useful if you use the certificate for SSL servers or VPNs.
If you use a patched OpenSSL 0.9.7 or an OpenSSL 0.9.8+ to issue certificates for Microsoft Smartcardlogin then you have to edit the configuration of the RA. You must add the option for othername to CSR_SUPPORTED_SUBJECT_ALT_NAMES and you have to set the correct number of available options at CSR_DEFAULT_SUBJECT_ALT_NAME_FIELDS.
This is the name of the certificate. The least significant information is at top. It is the same order like in RFC 2253 (LDAP string representation).
This is the requested role. The RA operator must set the correct one.
These are informations which will assembled only for internal usage. Here you can store such things like contact addresses and special phonenumbers.
If a RA operator is sure that all informations are now correct then he can approve the request. You can do this with and without a digital signature. The digital signature secures the request against manipulation after the approval.
If you are on the CA interface and you look at the request then you can only issue a certificate from the request or delete the request. If you click on issue then you have to enter the passphrases or whatever your OpenCA needs to unlock the private key. That's all.
Please read the section which describes the certificate handling to understand how certificates will be enrolled to the user. If you use a SCEP device then please read the SCEP section.
If you look at a certificate signing request on the RA or CA then you have the option to delete the request. This is necessary if a request has to be rejected by a PKI. If you click on delete then you will be prompted for an additional ok. If you want to make a deleted request valid again then go to the deleted request and renew it.
This section describes all the things which you can do with a displayed certificate.
You can find a certificate with two methods. The first method is the search. Go to
--> . You can enter some parameters in the displayed search form. The form only accepts wildcards if you use a SQL database. If the search suceeds then you can choose certificate which will be displayed.The second method is a little bit more “stupid”. Got to -->
and try to find the appropirate certificate in the lists. You can navigate by using the links in line Extra References.You can directly download a certificate into your browser by entering an appropriate serial. You musr know the serial of the certificate, of the request or you ID in the batchprocessors. The browser will be automatically detected by the software. Please remember that this method only works if you generated the private key with this browser and the private key is still in your keystore on computer.
There are three different ways to download a certificate. You can download passive data. You can download the private key and the certificate and you can install the certificate of another user. If you already have the private key and you want to install a new certificate in your browser then please use the direct download because this is the only software part which sends special HTML-pages for direct certificate installation.
If you only need a certificate in a special format then can choose the format and click on
. The certificate will be send with an appropriate MIME type which prevents browsers from installation. You can save the certicate on a disk and you can do what you (or the policy) want to do with it.If you want to download a certificate and the private key there are two possibilities. If the operation is allowed on your interface and the configuration switch REQUIRE_PASSWD_PUBLIC is set to NO then you can click on download. If you need the key in a format different from PKCS#8 then you must enter the passphrase to convert the private key. After this you will receive the key and certificate and you can save them.
If the operation is allowed on your interface and the configuration switch REQUIRE_PASSWD_PUBLIC is set to YES then you must go to your RA Operator and ask them to set a passphrase. We do this to avoid denial of service attacks against the private key of a user. It is strongly recommended do delete the passphrase after a short period of time and to generate the passphrases with things like openssl rand. User or admin “generated” passphraes are often not really secure. If the admin for this certificate via the RA interface then you can go again to your interface and donwload the certificate and private key. You have to enter the passphrase for the private key first and then the software asks you for a second passphrase to grant you access to the export command. If you downloaded the key then please inform the RA Operator and ask him to remove the passphrase to avoid denial of service attacks against you private key.
Sometimes you need a certificate of another user never sends you a signed mail. If you have a normal installation with LDAP support then you can search the certificate in the directory. There are installation where this service is not available. In this case you can go to the certificate page and if the appropriate functionality (INSTALL_CERT) is activated in the configuration then you can click on install an the certificate will be automatically installed in your certificate store. After this you can use it to encrypt emails.
The OpenCA team introduced with version 0.9.2 support for SCEP. SCEP was developed by Cisco. The protocol is usually used by VPN products like routers, switches and software clients to submit requests, download certificates and CRLs. We will document here the configuration for known systems to work with OpenCA. The configuration of OpenCA's SCEP service is described in the administration guide Section 8, “SCEP”.
SSCEP means Simple SCEP client for Unix. It can be used to request certificates if a device doesn't support SCEP but you want to use SCEP. Usually SSCEP is used to test SCEP daemons to work properly.
Example 6.1. SSCEP configuration
# URL of the SCEP server. URL http://scep.pki.openca.org/cgi-bin/scep/scep # This is one is needed with all operations. CACertFile ./ca.crt-0 # Possible values: yes or no. Verbose yes Debug yes # Display fingerprint algorithm (md5/sha1) FingerPrint md5 # Private key created with mkrequest PrivateKeyFile ./local.key # Where to write successfully enrolled certificate LocalCertFile ./local.crt # Certificate request file created with mkrequest CertReqFile ./local.csr # Poll periodically for pending certificate (seconds) PollInterval 60 # Maximum polling time MaxPollTime 28800 # Maximum polling count MaxPollCount 256 # Certificate serial number (decimal) GetCertSerial 1 # Write certificate as GetCertFile ./cert.crt # Write CRL as GetCrlFile ./crl.crl
First you have to download the CA and SCEP certificate from the SCEP server. Please check that the CACertFile is correct. Sometimes the SCEP certificate is ca.crt-0-0. Now you have all what you need to request a certificate. local.crt must contain your request and local.key should contain your private key. To avoid that your CA admin think that your are an attacker please poll not faster then all ten minutes (600 seconds).
You can run now sscep enroll -f sscep.conf. The result is some debugging output and sscep starts polling until it reaches it's maximum poll time, receives an errormessage from the SCEP server or downloads the certificate successfully. That's all. No magic but a really simple and efficient client interface.
If you don't want polling e.g. if you use SCEP for web server requests then you can start the enrollment and kill the process when SSCEP starts polling. If you know that the certificate is available then you simply start the enrollment again. SSCEP tries to send the request again but OpenCA detects that the request is already present in the database. So OpenCA reports a successful submission of the request and the first polling of SSCEP ends with the submission of the new certificate. If you think now that this is a good program to implement a batchprocess to generate smartcards etc. then you are right (but OpenCA has batchprocessors too) :)
OpenCA's SCEP service is tested with NetScreen NS-208. NetScreen's SCEP implementation sends SCEP messages in base64 but without any newlines. Now OpenCA can handle this too.
First you have to install the complete CA chain. You have to go to objects and then to certificates. Here you must set the option Show to CA. Now you can upload the CA certificates via browse and load.
After you uploaded the complete chain please go to the end user CA and click on Server Settings. The interface is a little bit mistakable because it display the issuer and in this field you find the link to configure the CA. RA CGI and CA CGI must be set to OpenCA's SCEP interface. The address is something like http://scep.mypki.org/cgi-bin/scep/scep. If you want to be consequent then please check the advanced settings to be correct for your environment. It is recommended to set at minimum the field Certificate Renew to seven days. Finally click on OK to save the settings. This can take some time.
Now it's time to make the request. Change Show from CA to Local and click on New. Enter all required informations and choose at minimum a keylength of 1024 bit - smaller keylengths are a security risk. If you finished then click Generate to create the key and request. Due to the slow hardware it can take some time. If you see the request then select the checkboxes Automatically enroll to and Existing CA server settings. Select the appropriate CA which you configured for SCEP and click on OK. This will submit the request.
If the certificate was issued go to the web interface of your NetScreen box. Go to objects and then to certificates. Here you must set the option Show to Local. Click on Retrieve to check for the certificate.
The SCEP compliance with OpenCA was tested with F-Secure Management Agent 5.02 (FSMA) and F-Secure VPN+ 5.43 (Gateway and Client).
If you want to use SCEP with VPN+ then you must set the appropriate policy in FSMA. Go to /Settings/Certificate Handling/Enrollment/Active protocol. There you can choose which enrollment protocol you need. Simply click on SCEP to activate SCEP.
The value should look like http://scep.mypki.org/cgi-bin/scep/scep. This is the default SCEP gateway of OpenCA.
This parameter is not used by OpenCA. You can ignore it.
We don't use the challenge password today. So you can ignore it too.
The RA interface of OpenCA allows the editing of all parameters of the request except the public key. So it is not important to select the right option here. Nevertheless it is recommended to use Only in SubjectAltName extension because this avoid the duplication of data in the subject of the request (distinguished name). VPN+ adds the VPN+ identity via the common name to the subject and this usually duplicates the entries in the DN. The recommended option let VPN+ create a CSR which has the identity in the subject (DN) and the attributes like emailaddress, IP address and DNS name in the subject alternative name.
That's all of the SCEP specific stuff in VPN+. You can read this description with some more details in F-Secures documentation too. You can find some docs on your CD-ROMs and some old docs online at F-Secure.com.
Table of Contents
This guide has only one goal, it should explain all core technologies of OpenCA. This is not a guide which explains how you setup OpenCA or what you have to do if your OpenCA installation doesn't work but this guide is a good source to understand the software design of OpenCA.
So if you think there is a core part of OpenCA and you don't understand why it is implemented in this way then it is a good idea to read this guide or to write a new section if you think it should be documented.
Table of Contents
OpenCA includes a lot of ideas and we think it is impossible to give a 100 percent complete overview about all technologies and ideas. The development model of OpenCA is an evolutional model. The community develops new features if they need them. There is no strict release schedule or big corporation in the background.
This guide also follows the evolutional development model. It contains descriptions of new technologies and core concepts of OpenCA. It is impossible for us to document every detail but we want to give all developers a chance to now what OpenCA is. The developers of stylesheets doesn't develop necessarly the code for the encryption tools but sometimes they want to how they can use encryption. In this case they can take a first look into the Tech Guide to understand the general concepts.
Before we start with concrete technologies it is necessary to describe a general technology - slots. Perl's DBI is a good example howto integrate several database drivers without installing and using more modules then required. This is what we call slot technology.
If you have a module and it needs a module which provides a special interface then it calls a "supermodule" which loads the required module and return it or handle all requests for the user including the management of the loaded modules.
my $class = "OpenCA::Token::$name"; eval "require $token_class"; return $self->setError ($@, $@) if ($@); my $token = eval {$token_class->new (@_)}; return $self->setError ($@, $@) if ($@); return $self->setError ($token_class::errno, $token_class::errval) if (not $token);
The first step is to load the required class. This has the same effect like a statical "use" statement but "use" doesn't work with dynamic classnames.
The second step is the creation of a new instance. Perl's OO interface is really bad compared with python or others like ruby but it works and we have not the time to rewrite the complete code. After the second eval you have a normal object reference and a new "slot" is established.
Please remember these concept at every time you read from a slot based technology.
This is no real description of a technology. It is more a statement of the development team. All new configuration files will be in XML.
The idea of all the XML files is the possibility to edit the configuration with texteditors and XML editors. So it is possible to develop a graphical interface for the configuration of OpenCA. The real important statement is the DTD. Today there is DTD but every XML file must contain <openca> as root element. The element below the root element must describe the type of the configuration (e.g. <token_config>). This makes later integrations of different configfiles really easy.
Today we have no DTD but it MUST be written before version 1.0.
The idea for a cryptolayer was born when we started to introduce one new private key every two weeks during the design of the batchprocessor. OpenCA needs today up to four different private keys - CA, logging, batchprocessor, key backup. Additionally we need a cryptoengine for the generation of private keys in the script basic_csr.
If a script or function needs a special key then it calls getToken an receives a loaded object for the appropriate key. The key must be activated by useKey because some tokens can be used without an authentication if the private key is not used. Such a "key" is a software token which is handled by OpenCA::Token::OpenSSL.
The tokens can fallback to the defaulttoken if they don't implemenent a functionality. The token class OpenCA::Token::Empty is only a logical class which automatically falls back to the default token which must be specified in etc/token.xml.
Today there is one additional class beside the classes for empty and software keys - LunaCA3. This class can manage a Luna CA3. This module supports the daemon and session mode too. These modes allow the activation of the module for a complete session or forever (daemon mode). The session ends if the user logs out. This is of course critical but the user decides what he want. The daemon mode activates the HSM and runs it until there is an exlicit shutdown for the HSM via an interface.
During the implementation of some new PKIs several users have serious problems because OpenCA has no own powerful accesscontrol and the implemented accesscontrol uses a proprietary modified Base 64 encoding for filenames. The result of this difficult usage was that the developer itself (me ;-) ) don't use this RBAC implementation. So we take the ideas from the first try and start a second XML based try :-)
<openca> <access_control> The complete configuration should be here. </access_control> </openca>
channel verification
login
session management
ACLs
The exact configuration of the different passes is explained in the administration guide.
Logging is a feature which is required for all real security systems. So we see the missing logging as a real problem for OpenCA and so we added it during the 0.9 series. The logging itself based on a slotmechanism to support as many different logging technoligies as possible.
$hash->{user_data}->{emailaddress} = "testuser@abc.com";
The hashreference must include a key CLASS which you can freely choose. This class can beused to filter messages and to decide which slot should be used.
EMERG
ALERT
CRIT
ERR
WARNING
NOTICE
INFO
DEBUG
OpenCA::Log::Message->new (HASHREF => $hash)
my $log_token = $crypto_layer->getToken ('LOG'); $log_token = $cryptoShell if ( not $log_token ); $log = OpenCA::Log->new (CONFIG => getRequired ('LogConfiguration'), CRYPTO => $log_token); $log->addMessage (OpenCA::Log::Message->new (HASHREF => $hash));
The configuration of the logging will usually done in etc/log.xml. Today there are two different logger implementation Syslog and XML. You can specify accepted class and level for every configured logger. Class and level accept wildcards.
The Syslog logger needs the type of the used Perl module. You can choose between Sys, Net, and Unix. Today only Sys is really tested. Additionaly you can specify a prefix for every log message. This is useful if you filter your logs with logsurfer or other tools. Please specify a facility too. This allows you to specify the behaviour of the syslogd via syslog.conf. If you use Sys then please specify the used socket type too. I used unix and it works all other types don't work on my linux box but it is better to allow the full flexibility and let it to the user to decide what he needs and uses.
The XML logger only has one option - dir. It specifies which directory the logger should use to establish the needed structure.
Table of Contents
OpenCA was designed for very fast and radical interface customization. Costumization is understanded as changing the functionality of the interface not the design. The design should be changed via CSS. It was a design goal to allow the user to create an interface for his own special requirements. OpenCA comes with predefined interfaces like ca, ra, public, ldap and node management but the user can merge split or completey mix the functions. This chapter will describe the ideas behind an interface.
There are three mainparts of the customization - statical webpages which show the user all the available functions, the functions itself and links which are only available for some commands.
OpenCA includes also some support for hiding functionalities. The command viewCSR, viewCert and viewCRR can be configured to only show some seletected links. This is not a security issue because it only provides a functionality like linkhiding but it shows the user a consistent interface.
The first section will describe the design to give you chance to understand what is and why it is going on before we describe the possibilities of customization in detail.
Former versions of OpenCA like 0.9.0 and 0.9.1 use several sheets to support the different commands with templates for the displayed data. This was a nice effort for the first releases but it creates a lot of trouble in some important areas. If you have hundreds of templates then you must translate hundreds of templates. It is really difficult to extract all text informations from templates and you extract really many HTML tags what means that you have style informations in your language database. The next problem is the customization. If you have hundreds of pages and you want to change smething for better CSS stylesheets then you have to change hundreds of templates - really stupid work. So the CCC camp 2003 was the right place to overcome with this solution.
libSendReply
libSendMenu
libSendStatic
several logging functions
Let us start with the easiest thing - point four. Nothing changed in this interface except of some classes for the stylesheet. All output pages of OpenCA support stylsheets now. This results in some problems with old Netscape browsers. All actual browsers like Mozilla, Microsoft Internet Explorer, Konqueror etc. have no problems. The old Netscape ones cannot interpret stylesheets correctly. They only output the pure links and not the nice tabbing style like the other browsers but it was time to make a cut and to take up the cudgels for the future (who will use Netscape 4.7 in one or two years?).
libSendReply is more dynamic than libSendStatic. Please check the source code until I checked in the docs tomorrow. It supports command panels and lists, item lists, info lists and siginfo. If you need to build statical pages then please use getStaticPage (see listCSRtype in this file for an example).
OpenCA still includes some statical webpages which will be created the command getStaticPage. If you want to change the content of a static page then please change this file.
There are two possibilites for additional functions - you can write a new one or you can use and already existing one.
If you write a new command then there are two important things. First Every command include a function cmdsFilename. This is the function which is called by the main script if the function filename is requested. Second if you implement a script which has to handle different states then please write a function checkFilename which includes all the status checks to avoid that somebody can start statusinjections.
If you want to establish the new command in the sourcecode then you must add the filename in src/common/lib/cmds/Makefile which installs the file. Additionally you must add the filename to src/web-interfaces/interface/cmds/Makefile. This makefile installs a dynamical link to the file. If this link is not present then the file doesn't exist for this interface.
If you want to add the new command directly in an existing installation then install the file in lib/cmds and add a dynamical link to this file from lib/servers/interface/cmds/.
You can add the command to a preconfigured interface in the sourcecode if you add the filename to src/web-interfaces/interface/cmds/Makefile.
You have to add dynamical link from lib/servers/interface/cmds/ to lib/cmds/ if you want to add the command to an already installed system.
EDIT, APPROVE, APPROVE_WITHOUT_SIGNING, ISSUE_CERT, ISSUE_CERT_NEW, ISSUE_CERT_RENEW, ISSUE_CERT_PENDING, ISSUE_CERT_SIGNED, ISSUE_CERT_APPROVED, DELETE, DELETE_NEW, DELETE_RENEW, DELETE_PENDING, DELETE_SIGNED, DELETE_APPROVED, RENEW, RENEW_ARCHIVED, RENEW_DELETED, GENERATE_KEY
EDIT, APPROVE, APPROVE_WITHOUT_SIGNING, REVOKE_CERT, REVOKE_CERT_NEW, REVOKE_CERT_PENDING, REVOKE_CERT_SIGNED, REVOKE_CERT_APPROVED, DELETE, DELETE_NEW, DELETE_PENDING, DELETE_SIGNED, DELETE_APPROVED
INSTALL_CERT, LDAP, REVOCATION, SENDCERT, SEND_CERT_KEY, VIEW_CSR, TOKENHANDLING, MAIL, SET_PUBLIC_PASSWD, DELETE_PUBLIC_PASSWD
Perhaps a small hint - if you setup more than one public (or any other) interface then please check that configure_etc.sh only configures this interface. If you don't check this then configure_etc.sh will reconfigure the other public interfacers too and this will crash their paths.
The OpenCA project has the goal to develop a trustcenter software which can be used out of the box. We don't ship prepared policies but we want to support the user with simple installation and update routines. This requires that the user can install a RPM or DEB package and then configure the software.
Such a complex software like a trustcenter cannot be configured with one single configuration file but it is impossible to ask the user for the configuration of over 200 files. Therefore we develop a post-install method for a postconfiguration after "configure;make;make install". The result is a single file etc/config.xml and a script etc/configure_etc.sh.
The file contains all basic configuration options which must be changed by the user. You simply configure config.xml and then you run the script which configure all template files.
If a criticism asks now why it is not possible to have one configurationfile if config.xml manages the complete configuration then please remeber the word "basic". Several CA admins have to change the configuration of the extensions for example to support special softwarerequirements. So config.xml is a technology to create useful binary packages but it is necessary to have all the other configuration files to use the full flexibility of the standards.
Table of Contents
Table of Contents
Be warned - this is a developer documentation which only documents the possibilities and technical background of OpenCA ldap caode but this is not a howto or a user documentation.
If you set this option to "yes" then the LDAP code will be activated.
This is the hostname of your LDAP server.
This is the port where your LDAP server listens.
This is the suffix (OpenLDAP terminology) of your LDAP server. You can add here several suffixes if your LDAP server supports this feature (e.g. OpenLDAP v2). The suffixes must be seperated by whitespaces (e.g. "o=Humboldt-University of Berlin, c=DE" "o=Charite, c=DE").
The bind DN of the user which OpenCA uses to add data to the server.
The passphrase for OpenCA's ldap account.
OpenCA supports LDAP v2 and v3. The default is v2 because all servers can support v2. Several new distributions especially of Linux deactivates the LDAP v2 support. So if your OpenCA LDAP code completely fails check first the protocol versions of OpenCA and your LDAP server.
Some other options like ldaptls and ldapsasl require LDAP v3. So be really careful which protocol you use. If your LDAP server supports protocol version 3 then please use it. It avoids a lot of trouble.
Use no or yes to deactivate or activate TLS. Please remember that this option only works with LDAP v3.
Use no or yes to deactivate or activate SASL. Please remember that this option only works with LDAP v3. We use CRAM-MD5 for passphrase hashing.
This option will be used by the node interface. If the value is yes then the LDAP server will be updated automatically during imports of certificates, CRRs or CRLs.
Some users want to store the CRL in a special node of the LDAP server which is not identical with the issuer of the CRL. This can be happen if the user specifies a special CRL Distribution Point (CDP) which differs from the subject of the CA certificate. Here you can specify this special distinguished name. Please remember that OpenCA is today not able to add this node automatically if it is not present.
Some users want to store the CA certificate in a not standard conform node which means that there is perhaps an already existent directory which conflicts with the PKI structure. Here they can add the distinguished name of this special node. This node can be automatically added by OpenCA.
OpenCA supports the possibility to exclude roles from certificate publishing. This can be useful for security reason and be required by privacy laws. If you have such a special role simply add it to to this options (e.g. "Corporate Security" "Security Officer" "IDS").
STRUCTURAL
country
device
inetOrgPerson (inherits from organizationalPerson)
locality
person
organization
organizationalPerson (inherits from person)
organizationalRole
organizationalUnit
AUXILIARY
dcObject
pkiCA
pkiUser
opencaUniquelyIdentifiedUser
opencaEmailAddress
opencaSCEPDevice
dc
c
o
st
l
ou
unstructuredName
unstructuredAddress
cn
sn
emailAddress
serialNumber
Table 14.1. Schema usage
LSC of the DN | filled attributes | filled attributes if present | objectclass stack |
---|---|---|---|
dc | dc | top, dcObject | |
c | c | top, country | |
st | st | top, locality | |
l | l | top, locality | |
o | o | top, organization | |
ou | ou | top, organizationalUnit | |
unstructuredName | cn | unstructuredName, unstructuredAddress, serialNumber, st, l, ou | top, device, opencaSCEPDevice |
unstructuredAddress | cn | unstructuredName, unstructuredAddress, serialNumber, st, l, ou | top, device, opencaSCEPDevice |
cn | cn | cn, st, l, ou, mail | top, organizationalRole (opencaEmailAddress) |
sn | cn | cn, st, l, ou, mail | top, organizationalRole (opencaEmailAddress) |
emailAddress | cn | cn, st, l, ou, mail | top, organizationalRole (opencaEmailAddress) |
serialNumber | cn | serialNumber, o, ou, l | top, device |
If we add a node to the directory tree then we add at every time to the objectclass stack the classes pkiCA and pkiUser. This is perhaps not the cleanest solution but it is safe for every possible configuration. If we add a node with the class organizationalRole then we add the auxiliary class opencaEmailAddress if an emailaddress is present.
Table 14.2. Schema usage for user certificates
LSC of the DN | filled attributes | filled attributes if present | objectclass stack |
---|---|---|---|
cn | cn,sn | mail, o, st, l, ou | top, person, organizationalPerson, inetOrgPerson |
sn | cn,sn | mail, o, st, l, ou | top, person, organizationalPerson, inetOrgPerson |
emailAddress | cn,sn | mail, o, st, l, ou | top, person, organizationalPerson, inetOrgPerson |
serialNumber | cn,sn | mail, o, st, l, ou | top, person, organizationalPerson, inetOrgPerson, opencaUniquelyIdentifiedUser |
If the distinguished name doesn't contain an emailaddress but OpenCA detects an emailaddress in the subject alternative name then we use this emailaddress.
addCertsLDAP (puts all valid certs to LDAP)
addCrlLDAP (puts all CRLs to LDAP)
importAllFromCA (via export-import.lib)
importCRL (via export-import.lib)
importCerts (via export-import.lib)
importCertsLDAP (puts all certs from the last import to LDAP)
importConfig (puts CA-certs to LDAP)
updateCACertsLDAP (update the CA-certificates on the ldap server)
updateCRLonLDAP (writes the most actual CRL to LDAP)
updateCertsLDAP (writes/removes the user-certificates to/from LDAP)
updateLDAP (puts all certs from the last import to LDAP)
Table of Contents
Table of Contents
Here you can read some historical notes about OpenCA. Please don't believe they are complete or always rational. We only write such notes if we have no new ideas at the moment ;-D
When OpenCA was just a thought in our mind, the need for a complete PKI solution was already perceiving. The problem, in 1998, was that only few products were available in the scenario and the costs associated with this kind of software was indeed considerable. Most of the PKI software available presented non only payment for the software license, but often there were per-certificate costs which prevented many organization to deploy their PKI.
What were the available software then? Not many, indeed most of the implemented software was developed in USA and, because of rigid export regulations, there were problems associated with the adoption of "strong" cryptography outside United States.
Netscape Company was one of the most advanced provider for this kind of software while other providers were pointing their attention on the selling of certification services instead of software capable of managing a PKI. Some other solutions were available from different vendors in Europe too, but the costs problems remained.
Another example of software provider was Secude. The SecuDE, a german security related software company, was selling a crypto layer for generating certificates and maintaining a PKI without limitations on the key-length. Despite of the fact that this software was not imposing weak keys, the company sold licenses based on the number of issued certificates per year.
Let us make a practical example. Let us pretend a local Public Administration, i.e. a small municipality like Modena or one quite big organization, was about to deploy certification services for its citizens. In this scenario it was logical to be prepared for issuing 50,000 - 100,000 certificates (but it should be considered the worst case where every citizen asked for his/her certificate). The number of certificates and the costs related was so high that no one would ever even considered the chance to deploy the services.
Hence the costs problem was one of the most relevant.
All these problems were present not only in PKI managing software, but in crypto enabled applications too. One noticeable example was the popular Netscape browser (and its competitor Internet Explorer), which was available world-wide only with 56-bit capabilities for symmetric crypto and 512-bit for asymmetric crypto. As we underlined, the need of strong cryptography was very high and that is probably the main reason for the availability of products like Fortify that enabled strong cryptography into Netscape.
The Italian scenario presented some points of excellence, though. Two of these, the Modena's municipality and the Turin's Politecnico, were successfully experimenting and developing software based on semi-proprietary solutions (using crypto libraries like the SecuDE one together with ad-hoc developed software). In this highly experimental phases there were some special form of licensing available from different companies (SecuDE was one of the first but in the next few years other research project have been carried out without challenging the real costs because of specific marketing policies by the issuing companies like, for example, Italian Telecom, BNL Multiservizi and others) that were not tied to a per-certificate basis. But these solutions were only temporary and not viable in a real environment with hundreds of thousands of certificates issued and renewed per year.
The natural choice was, then, to look for some freely available software (better if open source so we could modify to fulfill our needs). The only library which was stable enough and available for free was the SSLeay, a collection of libraries and tools for implementing the SSL protocol with some certification capabilities. The SSLeay from Eric Young was already a widely adopted library (indeed nearly all SSL implementing software and SSH solutions on UNiX already were using it) and it was developed under a BSD like license: this was the solution we were looking for although there was much work to do.
The use of Public Key Infrastructure (PKI) deserves special attention, as the most common challenges for eGovernment to overcome were identified as verifying identity on-line and verifying the authenticity of a document. PKI can address both. The consensus seemed to be that the top level of PKI certificates could be provided like a passport or birth certificate: government defines the format and manages the registry and then provides it via public or private sector, whichever works (like physical passports are delivered).
Some special care, thus, should be taken when addressing PKI's issues as it seems PKI technology can find some very important application in the eGovernment sector. We find interesting that some excellent projects have been carried out using OpenCA in the eGovernment field.
Our project deals mainly with informations and informations need to be interoperable to be useful. Standards are needed in such an environment.
The IETF organization cover every aspect related to the Internet Standards. But what is the IETF? The Internet Engineering Task Force (IETF) is a large open international community of network designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet. It is open to any interested individual.
One part of the project was the development of a full PKI Open-Sourced software. The software is actually ever growing as new protocols and standards are being issued by the standardization bodies. The users' and developers' community has been enlarging and we can now count on many individuals and organizations directly or indirectly supporting the project.
Although the software development is one important aspect of OpenCA, our objectives were not only technological. We can say that among the project's objectives there were also the exchange of ideas between different realities and the setting up of a working group deploying code and solutions solving practical certification issues.
Five years have passed since we started to work at the project. OpenCA has been constantly growing and the number and quality of active installations are, today, too many to be mentioned here. We have to state, for clarity, that the project is still evolving and because of this we can only imagine what the future of the project will be. Today the project counts a quite high number of developers, mainly from universities, and contributing users.
adherence to the IETF standards - at every step we tried to stick to the RFCs covering the matter from the very beginning. Indeed the project basic structure is derived from one IETF specification.
feedback from users - the project have grown integrating help and keeping in mind objections by users and developers.
openness - we tried to keep our sources as readable as possible thus allowing almost everyone to contribute with code or comments.
interoperability - this is a consequence of being adherent to the standard but not only. Whenever possible we tried to support the majority of the systems today available. For example we introduced the usage of Java applets to support Microsoft Internet Explorer and we develop support for SCEP.
usage of simple programming language (whenever possible) - this follows from the consideration that security is not obscurity and we needed to be as readable as possible. Then we choose for PERL which guaranteed for portability and simplicity.
Thus most of the project's objectives have been either achieved and yet are still to be achieved. This could be quite a cryptic sentence but it is not. The project has achieved its goals because it helped in searching for solutions about certification problems and issues. For example OpenCA has made possible for some municipalities to deploy services to its citizens and other organizations to develop applications for their customers, we solved many practical problems together with users and developers and we helped in making this technology available for almost everyone. We also contributed to the discussion on the pkix working group about some specific issues like certificates' suspension. Still the project has not yet achieved its goals because much work is needed for this technology to be widely deployed and accepted by users. Many standards and protocols are engineered every day and thus the project still needs active development to be kept up-to-dated.
We started the OpenCA project in June 1998. The very original idea was developed by Massimiliano Pala. The first version of OpenCA has been developed in approximately one monthand the project first sources were composed of a single quite long script. When the first version of the software was developed the OpenSSL project was still named SSLeay and it was very different from what it is now: many functions were still buggy and many others were missing.
Installation of the project was based on a very simple Makefile and some scripts to initialize the CA. To quickly install the software you just needed to unpack the archive, cd to the newly created directory, use the 'make install' command: a script was then run to install the base CA software and generate (and eventually sign) the CA certificate.
A series of script was provided to help in installing and configuring most of the project's parts. Although very simple, this solution caused many problem with the users' community because of issues rising from the need of being able to better customize the full package. For example to be able to generate certificates through the full featured process you needed to install the CA web, RA server software and generate RAs' browser importable certificates. The first version of OpenCA was very basic, functions implemented were aimed primarily to issue certificates and CRLs only and the installation method was quite rude: no usage of any configuration utility (i.e. autoconf and automake) and scripts were compatible with bash only.
New releases were adding ever more features to the project and thus the 0.109a version was already including interfaces for either CA, RAServer and Public. From the very beginning of the project and since the release of the first version a great attention from the Internet community was turned on the project.
Our project has been based on the OpenSSL cryptographic tool. The OpenSSL project was named SSLeay and has been developed originally by Eric Young and then it has been taken in charge by Ralf S. Engelschall and recently by Steve Henson. Although still one of the most advanced (if not the only one in 1998) open source crypto library available, we needed many features not available in the toolkit at the time we started OpenCA. The availability of the sources has been proved essential for us because we have been able to add many new features no one have thought about before. This is not a minus for OpenSSL. This is a plus for open source and OpenSSL will be extended day by day by other developers who also need additional things.
All this work had permitted us to have the needed functions to correctly manage certificates and requests by building a web oriented interface acting as a front end to the crypto layer.
First versions of OpenCA were strictly tied to OpenSSL but we knew we had to abstract from the crypto library as much as possible. If we could be able to have a layered structure it could help external developers to support different cryptographic layers and thus incrementing the project's portability. This has been done since version 0.6.0 which had many new features and a much more complex structure then the former releases.
Because of the constant growth of the software developed and the asking for direct support by the community, we choose to move for advanced development tools. Many people have found themselves to work on different aspects of PKIs and in particular on the Project features and structure.
We used CVS because it helped to manage releases and to control the concurrent editing of source files among multiple authors as new developers were admitted to directly access the main source code.
Thus we needed to install it on our main server, which acted as either package download site and as community support site via the installed web server and different applications: a CVS server and a mailing list management tool. Some difficulties were found for the CVS setup and management because of many security issues we had to care about. Anyway these tools let us work in collaboration with many different developers and contributors from all around the world with little administration efforts.
Security is not obscurity. This is a principle we should all keep in mind when approaching the security issue.
We can therefore state that the Open Source choice, especially when dealing with security and issues tied to this subject, is important because it gives the chance to everyone to study and test our ideas and eventually help in designing a better solution. If we take for true that two eyes are better than one, then why not one hundred or one thousand?
Open Source Projects have indeed another one big advantage: contribution can come directly from users and/or developers who need features (or modifies) you simply have not had the time to think about or to implement. We found that Open Sourcing the Project have given a very big help in growing either in its practical implementation and in its visibility.
We found ourselves at the end of the 2000 with the need to have more administration power, to coordinate different developers, and Internet connectivity. We have been asked to move on different servers by the users and proposals were not missing. Anyway we decided to move to SourceForge. At the moment of this writing we have many mirrors around the world updated daily, mainly thanks to the Sunsite and SourceForge networks, giving us much visibility over the whole Internet. This helped especially Asian users that suffered many times from lousy connections and long download times.
The SourceForge was then the natural choice where to move the project core to. This has saved much administration work and thus has let us work much on the project than on the development tools used.
Table of Contents
Here you can find all authors and contributors of this guide.
Dejan Kulpinski - Microsoft Smartcard Logon
Gottfried Scheckenbach - Microsoft Outlook Express
Table of Contents
A certificate is a so called digital ID card. The correctness of a certificate will be guarnteed by a certificate from a higher level of the hierarchy. Such a certificate is called CA certificate.
Certificate Informations
serial number of the certificate
a subject (name)
the corresponding public key to the private key of the certificate owner
the name of the issuer
the version of the certificate
the used cryptoalgorithms to create the certificate
the validity period
some extensions
the digital signature of the certificate
There are two types of requests CSRs and CRRs. CSRs are used to ask a trustcenter for a certificate. CRR are used to ask a trustcenter to revoke a certificate if it is corrupted. There are two important standards for CSRs - PKCS#10 and SPKAC. OpenCA can handle both standards automatically.
CSR Informations
a subject (name)
the version of the request
the corresponding public key to the private key of the certificate owner
some attributes
It is fairly well known that there are two versions of Xenroll.dll used by versions of IE to create certificate requests and manage CSPs etc.. OpenCA since version 0.9.1 has managed them via the ieCSR.vbs scripts.
We have noticed that if a user has Win2K and IE6 SP1 then the version of xenroll.dll does not work and the users can see no CSPs to manage their certs with. A patch is required from Microsoft (323172) for Win2k, or it needs to go up to SP3. You can host a copy of the latest xenroll.dll on your web site under a CertControl directory and it will be downloaded and installed automatically.
As far as we can tell, the latest xenroll.dll is a different file, but shares the same identifiers as the pre-patched version. We have noticed that the isCSR.vbs (as of 0.9.1) is written in such a way as to not expect there to be a non working version of xenroll.dll, so there is a bit of a gap.
Initialize the SubCA (initialize database, generate secret key, generate request)
export request
untar the export (to get the careq.pem), the next steps are only correct if you use OpenCA for your Root CA
Point to the Root CA public interface -> request a certificate -> server request -> browse for the careq.pem and submit the request
Point to the Root CA RA interface and approuve the request, upload to the Root CA CA; point to CA interface, issue the certificate
Download the certificate for the sub CA via the RA or public interface of the Root CA
rename the file to cacert.pem and manually make a new tar
Point your browser to the SubCA CA interface and import CA certificate approuved by Root CA
Yes, it is possible. Go to a RA interface. Go to the certificate which you want to revoke. View the certificate. Click on revoke, fill out the form and now you have created the initial CRR to revoke the certificate.
This message appears if one of the configurationfiles of the new role already exist. Please check the files in the directories OPENCADIR/etc/openssl/extfiles and OPENCADIR/etc/openssl/openssl.
Check that the configuration option OPENSSL is set to the correct path. It mus be the binary of OpenSSL. You have to verify all files in OPENCADIR/etc/servers/.
You are using OpenSSL 0.9.6 but you must use 0.9.7. The use of 0.9.6 can cause inconsistent data. Normally OpenCA cannot installed if OpenSSL 0.9.7 is not present. So please check the path to the OpenSSL binary in the configuration files. The option is OPENSSL in all files in OPENCADIR/etc/servers/.
Please check the settings in etc/servers/DBI.conf because this happens if IBM's software cannot find the libraries and databases.
it is now possible to create usable packages
you can configure the PKI after the installation
docbook based documentation
integrated access control
secure export of private keys via the public interface
several LDAP improvements
keysizes are now choosable for IE users too
much better CSR editing
additional attributes for requests (e.g. telephonenumbers)
menugeneration via XML-configurationfile
SCEP support
warn expiring certificates
more (an explicit) download formats for certificates
subject verification for PKCS#10 requests
logging support
Mozilla doesn't implement crypto.signForm or anything else to sign HTML forms. There is a really good patch or better bugfix for Mozilla but they don't include it into the releases. You can find a patched Mozilla at WaMCom.org. The patch can be visited at Mozilla. The bug ID is 29152. We don't know why it takes so long to fix such a small security problem but until now we can only recommend to use the Mozilla version from WaMCom.org.
There is a second fix for this problem secclab. This is plugin which is available from mozdev.org but until now it is not stable enough to be supported from us. If it is stable and Mozilla still doesn't support crypto.signFrom then we will support secclab.
KDE doesn't include any functionality to sign HTML forms until know. So this feature is not supported for KDE.
It is a noncompressed tar file. The name of the file which contains the CA certificate is cacert.pem. The format of the file is PEM (sometimes called CRT or base64 encoded).
If you try to create a CRL, to issue a certificate or to revoke a certificate and it fails then you should get an errormessage from OpenSSL. If the errormessage include the string entry 1: invalid expiry date then the database file index.txt is damaged. The easiest solution is to go to the backup and recovery are of the node management interface. There you can use the link which starts the rebuilding of the OpenSSL files. After this operation the OpenSSL files are correct again.
If you imported the certificate of another user and try to send him an encrypted email then it can happen that this doesn't work with Outlook and Outlook Express. The reason is that the person must be present in your contacts. The best way to add the person to your contacts is to take a signed email and import the user from this email to your contacts.
There are several events why Outlook freezes but one events is a signed email in combination with an anti virus program. One user reports some time ago a frozen Outlook in combination with an anti virus program from Kapersky. Like often with Microsoft programs it is not clear why Outlook crashs and who makes the mistake and includes a bug in it's program.
Example C.1. General error 6751 during certificate issueing
Error 6751 General Error. Error while issuing Certificate to CA Services some.host.com (filename: /usr/local/openca/var/tmp/04.req). OpenCA::OpenSSL returns errocode 7731071 (OpenCA::OpenSSL->issueCert: OpenSSL fails (256).)..
Example C.2. Bad passphrase error log during certificate issueing
[Mon Dec 29 18:32:59 2003] [error] [client 192.168.1.38] unable to load CA private key, referer: http://ca.localhosts.com/cgi-bin/ca/ca?cmd=viewCSR;dataType=APPROVED_REQUEST;key=1312 [Mon Dec 29 18:32:59 2003] [error] [client 192.168.1.38] 18685:error:06065064:digital envelope routines: EVP_DecryptFinal:bad decrypt:evp_enc.c:438:, referer: http://ca.localhosts.com/cgi-bin/ca/ca?cmd=viewCSR;dataType=APPROVED_REQUEST;key=1312 [Mon Dec 29 18:32:59 2003] [error] [client 192.168.1.38] 18685:error:0906A065:PEM routines: PEM_do_header:bad decrypt:pem_lib.c:421:, referer: http://ca.localhosts.com/cgi-bin/ca/ca?cmd=viewCSR;dataType=APPROVED_REQUEST;key=1312
OpenCA includes some protection mechanism to avoid state injections during the dataexchange. Therefore you have to configure the level at which OpenCA performs the dataexchange, so that ./configure can make a good preconfiguration. This is only correct for 0.9.1. 0.9.2+ uses OPENCADIR/etc/config.xml to configure the dataexchange.
If you export from a public area to a server with the RA then must use pub.
If you export from a server with a RA to a server with a CA then you have to use ra.
If you export from a server with a RA to a server with a public interface then you have to use ra.
If you export from a server with a CA to a server with a RA interface then you have to use ca.
If you have another case then you have to chosse one of the above defined options and then you have to edit the options for the dataexchange manually like described in the administrator guide.
Example C.3. Full errormessage for missing functions
[Thu Oct 09 14:50:52 2003] [error] [client 127.0.0.1] Undefined subroutine &main::configError called at /var/www/cgi-bin/ca/ca line 86., referer: http://localhost/htdocs/ca/
The reason for such an error is a missing library - in this case misc-utils.lib. There is only one well-known error - you used --enable-package-build as configure option. This happens if somebody uses a configure example which is used for package builds. The disables the installation of all common software parts like modules, libraries and configuration files. If you configure again without --enable-package-build and then run make install-xyz again then all libraries should be present.
Example C.4. Already present symbolic link
make[8]: Entering directory `/home/linux/tar/openca-0.9.1.2/src/web-interfaces/ca/cmds' cd /usr/local/openca.0.9.2/openca/lib/servers/ca/cmds; \ ln -s ../../../cmds/add_module ln: `./add_module': File exists make[8]: *** [/usr/local/openca.0.9.2/openca/lib/cmds/add_module] Error 1 make[8]: Leaving directory ... make[1]: Leaving directory `/home/linux/tar/openca-0.9.1.2' make: *** [install-ca] Error 2
If the command make install-* doesn't report an error and after the installation all common parts like modules, configuration, libraries, openca-sv and commands are missing then please check your configure options. Sometimes the people simply copying our configuration examples without noticing that some of these examples are used for package creation. These examples include an option --enable-package-build. This option prevents all common stuff from installation to build better packages.
Example C.5. virtual host configuration
<VirtualHost _default_:443> ServerName 157.159.100.42:443 ServerAdmin pascal.verrecchia@int-evry.fr DocumentRoot /srv/ra/apache/htdocs ErrorLog /usr/local/apache/logs/error_log Options MultiViews Indexes Fol ................ ........... </VirtualHost>
BindAddress Your_address_IP:80 Listen 80
Example C.6. ./configure and virtual hosts
--with-ca-htdocs-url-prefix=http://ca.dskt6807.zhwin.ch \ --with-node-htdocs-url-prefix=http://node.dskt6807.zhwin.ch \ --with-ra-htdocs-url-prefix=http://ra.dskt6807.zhwin.ch \ --with-ldap-htdocs-url-prefix=http://ldap.dskt6807.zhwin.ch \ --with-pub-htdocs-url-prefix=http://pub.dskt6807.zhwin.ch \
Yes, it is possible. There is an option LDAPexcludedRoles in the configuration files of the node and the ldap interface. If you add a role there then all certificates which have this role will not be published via the LDAP server.
Example C.7. Client authentication with mod_ssl
<VirtualHost ra.mycompany.de:4443> ServerName ra.mycompany.de DocumentRoot /RA/apache/htdocs ServerAdmin nicolaie.szabadkai@mycompany.de SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 SSLEngine on SSLCertificateFile /RA/ssl.crt/server.pem SSLCertificateKeyFile /RA/ssl.key/key.pem SSLCertificateChainFile /RA/OpenCA/var/crypto/chain/cacert.crt SSLCACertificateFile /RA/OpenCA/var/crypto/cacerts/cacert.pem SSLCARevocationFile /RA/OpenCA/var/crypto/crls/cacrl.pem SSLVerifyClient require SSLVerifyDepth 10 SSLOptions +StdEnvVars +ExportCertData +StrictRequire ErrorLog /var/log/httpd/ra.srv.err.log CustomLog /var/log/httpd/ra.srv.req.log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" ScriptAlias "/cgi-bin/" "/RA/apache/cgi-bin/" <Directory "/RA/apache/cgi-bin"> AllowOverride None Options FollowSymLinks Order deny,allow Deny from all Allow from 10.1.114 10.100.1 10.1.102 SSLRequireSSL SSLRequire ( %{SSL_CLIENT_S_DN_O} eq "MyCompany" \ && %{SSL_CLIENT_S_DN_CN} =~ m/ramanager?/ ) </Directory> ... </VirtualHost>
It is necessary that you update your OpenCA installation from time to time. This can happen if there is a new security advisory or some normal bugs are fixed. Since OpenCA 0.9.1 there are bugfix releases. These releases only update the software. They never touch the configuration. If you have a 0.9.1.3 and you have to update to 0.9.1.4 then simply use the same configuration like for 0.9.1.3. The installation with make never overwrites the etc or var area of your already existing installation. Nevertheless it is strongly recommended to backup your complete installation before you start such critical operations like an update.
There are two general methods. You can use backup/restore or you add the columns by hand.
Create a backup from the database with the node interface.
Remove all tables and sequence generators.
Update OpenCA.
Go to the node interface.
Initialize the database.
Go to the recovery page of OpenCA.
Import the database.
Restore OpenSSL's files.
Login to the database.
alter table request add scep_tid TEXTTYPE; alter table log add scep_tid TEXTTYPE; alter table request add loa TEXTTYPE; alter table certificate add loa TEXTTYPE; alter table crr add loa TEXTTYPE; alter table log add loa TEXTTYPE;
Table C.1. Texttypes for different databases
Database | type |
---|---|
mysql | TEXT |
Pg | text |
DB2 | long varchar |
Oracle | varchar2 (1999) |
Go to the node interface.
Administration.
Databasehandling.
Update searchable attributes.
Example C.8. OCSP configuration for LDAP
[ OCSPD_default ] .... dbms = ocsp_crl [ ocsp_crl ] crl_url = ldap://my.ldap.server crl_entry_dn = cn=MyCA,ou=CA,o=MyOrg,c=MyCountry
Example C.9. OCSP configuration for http
[ ocsp_crl ] crl_url = http://my.ca-public.server crl_entry_dn = /crl/cacrl.crl
Before you run configure with the changed config.xml for the second public interface you have to reduce the scope of the files in configure_etc.sh to the new interface.
After such a crash you can configure config.xml to the old values, set the paths in configure_etc.sh to the first interface only (!!!) and then run configure_etc.sh again.
Please read the notices about SMTP servers in the OpenSSL section of the administration guide. If you only have one certificate for your mailserver then it must include the extensions for SSL servers and SSL clients. The extensions for SSL servers are not enough because SMTP servers act as clients too.
There are some situations where clients hang after they try to connect to a TLS or SSL secured server. Examples are Microsoft Outlook clients which connect to mail servers which use TLS or Microsoft Internet Explorers which try to connect to a https server.
Usually the certificate contains a CRL distribution point (CDP) which uses https or ldaps as protocol. The result is that the client tries to verify the server certificate and opens a connection to the server which stores the CDP. If this server presents a certificate which contains a CDP with TLS protection then you have a perfect loop. This can also happen if you try to verify a client certificate which includes a TLS or SSL secured CRL distribution point.
There are two solution for this problem. First you can use only http and ldap or other supported protocols for CRL distribution which don't use TLS and SSL. This is not a big security risc because CRLs are protected by the signature of the corresponding CA. Second you use https or ldaps for client certificates but http or ldap for server certificates. This will produce only one loop if the server certificate will be verified.
If you already enrolled an infrastructure and now you are running into problems with hunderds or thousands of client certificates then you should use the second option to solve your problems. If you enroll new certificates for the servers then you have no problems with your endusers - you have not to explain the problems, the installation of new certificates and the reasons why you don't expect such problems. You “only” install some new server certificates and all problems are fixed like a simple network problem.
The CDP of the certificate from the signature points to a SSL-secured website which was signed by the same CA than the mail certificate. Best solution: Change the CDP to non-https url or a https-url signed by another CA and reissue the mail certificates. If you dont want to reissue all your mail certs it's ok to just change the webservers CDP URL and reissue the webserver certificate.
Old versions of OpenCA include a hardwired minimum length for HTML-textfields. The minimum length was three. You can change this limit in basic_csr. New versions of OpenCA can be configured. Please read the “installation and configuration guide” Section 4, “CSRs”.
Yes, please check etc/config.xml. There are two options menu_logo_left and menu_logo_right which can be used to place logos in the menuframe. Please be careful with this feature because it can reduce the usability of the software.
The original mail was from Dejan Kulpinski which exactly describes for the first time how to establish a Smartcard Logon to Windows 2000 domain using OpenCA certification authority. The mail is present in the mail archives of OpenCA-Users@lists.sf.net.
Well the story is pretty long, so I start from the beginning.
If you enroll a certificate and a private key to a user via file in PKCS#12 format then you usually want to include the complete certificate chain. This is necessary because many software products doesn't work if the chain is incomplete. This can be normal mail programs or VPN clients. The price is no argument in this case.
Otherwise there can be problems if you try to install certificates which are already present at the target system. The worst case is the destruction of already exeisting certificate chains by overwriting an old CA certificate. Therefore OpenCA only includes the CA certificate which issued the enrolled certificate. Nevertheless it is possible to include as many certificate as you want.
Go to OPENCADIR/lib/cmds
my $cacert = getRequired ('....
my $cacert = "/my/openca/dir/var/crypto/cacerts/blaine.pem";
The next step is to create an individual file for the chain. Now you have to create the file blaine.pem. This file has to include all needed CA certs in PEM format. Please remember to include a begin and end line before and after every CA certificate like for every normal PEM-formatted CA certificate.
You try to login with correct login and password. The result are one or two frames with the login screen again.
If your credentials are really correct then there is in the most cases a problem with the Perl module CGI::Session. Old versions of this module have problems with the flushing of data- especially the automatic flushing of data. OpenCA tries to handle this bug but the best solution is to remove the original module from your computer and to install a new one. You can install a new version from CPAN or you install OpenCA again. If OpenCA cannot find this module then it installs an actual version by itself.
This error message happens if you are using an apache without mod_ssl but you specified mod_ssl in your access control configuration.
This happens if the configuration requires ssl but you are using http to access the interface.
The access to the interface is only allowed for some computers with special IP addresses and you have not a computer with one of these special addresses.
There is a problem with the algorithms which mod_ssl and your browser are using. The configuration tries to enforce some special algorithms for security reasons. Please contact your administrators for more informations.
The keylength of your certificate is too short if you are using a certificate. If you don't use a certificate then the Apache itself or your browser only support some too short asymmetric keys. Please contact your local administrators to find out more details.
There is a problem with the algorithms which mod_ssl and your browser are using. The configuration tries to enforce some special algorithms for security reasons. Please contact your administrators for more informations.
If your browser startis a connection to webserver via https then the two software components try to negotiate about the cryptoalgorithms which they support. Usually they choose the strongest algorithm and longest keylength. Some export restricted browsers only support too short keylength. This is not allowed in security sensitive areas. Please ask your administrators for the exact specifications of your installation.
chmod a+w /dev/fd0
chown wwwuser:wwwowner /dev/fd0 chmod u+w /dev/fd0
If you run OpenCA on a production system and you run an xdm on this system then you should use this way of changing the permissions but be prepared this is not very easy and you must test the changes very carefully.
First you have to edit /etc/logindevperm. Please comment out the line which defines the settings for /dev/fd0. This will avoid the PAM module devperm from changing the owner (UID) and group (GID) of the device. Usually the PAM module is used by xdm (see /etc/pam.d/xdm) and other console based services.
chown wwwuser:wwwowner /dev/fd0 chmod u+w /dev/fd0 or chmod a+w /dev/fd0
Now the change of the permissions is durable. The changes in the first and second choice are not durable if you use the PAM module devperm. Please don't wonder if a normal user cannot mount a floppy after these operations.
Test the archive ... /bin/tar -tvf /dev/fd0 Importing archive ... Load required variables ... Changing to directory /usr/local/openca.0.9.1/openca/var/tmp/tmp_418 ... Running the import command(s) ... /bin/tar -xvf /dev/fd0 -C /usr/local/openca.0.9.1/openca/var/tmp/tmp_418 Importing the RBAC-configuration ... Ok. LDAP-support is activated Automatic LDAP-update is activated Importing _CA_CERTIFICATE ... No objects are present. Importing CA-Certificates into ldap ... Cannot load CA-certificate Make CA-Certificate available on the server ...OK. Re-Building CA Chain ... Ok. Clean up ...Ok.
Importing _CA_CERTIFICATE ...
Go to OPENCADIR/var/log/enroll and OPENCADIR/var/log/download. There you have to remove all data from files which contain the module ID of the node interface on the online server which crashed. If you run the import/export commands next time then all objects will be exported again. It is the same technology like for the creation of a new node interface.
Example C.10. Failed request upload
Exporting _REQUEST ... FAILURE: 288 (spkac). FILE: /srv/ra//OpenCA/var/tmp/tmp_1517/_REQUEST//288.spkac FAILURE: 544 (spkac). FILE: /srv/ra//OpenCA/var/tmp/tmp_1517/_REQUEST//544.spkac Exporting archive ...
You can manually change the status of the requests which should be uploaded or you install again. In the most cases there was a wrong paramter for configure. Please check the value of --with-hierarchy-level very carefully. If you install a RA and you want to export approved requests to the CA then the hierarchy level must be ra.
This occurs if OpenCA cannot make a connection to the LDAP directory. Make sure that the ldap server is running and is listening on the correct port. Make sure that the settings in ldap.conf and node.conf match your ldap server settings.
A connection has been made to the ldap server, but the credentials to log into the server as admin are wrong. The bindi operation is performed after the connection. Check the ldaproot (the LDAP administrator's DN) and ldappwd (the password of the ldap administrator).
This sometimes means that the RA could not insert the appropriate entry for a certifciate (the exact definition is LDAP_OBJECT_CLASS_VIOLATION). Check that you have the directory started with the appropriate schemas (core, cosine and inetorperson) this is usually found in the slapd.conf file.
You can get more debugging informations by turning on debugging in OPENCADIR/lib/functions/ldap-utils.lib (i.e. DEBUG=1;). The most functions have such a parameter.
The logging messages of OpenLDAP are sent to syslogd. OpenLDAP uses the facility local4. You can find the files which contain the logs in /etc/syslog.conf. Simply search for the files which will be used by local4.
If you need more informations than be in the log files from syslogd then you have to tune the configuration of OpenLDAP. Usually there is a file /etc/openldap/slapd.conf which contain the configuration. The logging information will be configured with the option loglevel. This is a bitmap with eleven bits today. A loglevel of 63 mean that the bits one to five are set. A good choice is 63 for a first debugging session. You can read the details in man slapd.conf.
OpenSSL's webpage. OpenSSL project.
OpenCA's webpage. OpenCA project.
PKIX. IETF.
RFC 2246 The TLS Protocol Version 1.0. IETF. January 1999.
RFC 2253 LDAP - UTF-8 String Representation of Distinguished Names. IETF. December 1997.
RFC 2311 S/MIME: Version 2 Message Specification. IETF. March 1998.
RFC 2312 S/MIME: S/MIME Version 2 Certificate Handling. IETF. March 1998.
RFC 2315 PKCS #7: Cryptographic Message Syntax Version 1.5. IETF. March 1998.
RFC 2595 Using TLS with IMAP, POP3 and ACAP. IETF. Jun 1999.
RFC 2828 Internet Security Glossary. IETF. May 2000.
RFC 2818 HTTP Over TLS. IETF. May 2000.
RFC 2898 PKCS #5: Password-Based Cryptography Specification Version 2.0. IETF. September 2000.
RFC 2985 PKCS #9: Selected Object Classes and Attribute Types Version 2.0. IETF. November 2000.
RFC 2986 PKCS #10: Certification Request Syntax Specification Version 1.7. IETF. November 2000.
RFC 3207 SMTP Service Extension for Secure SMTP over Transport Layer Security. IETF. February 2002.
RFC 3279 Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. IETF. April 2002.
[RFC3280] RFC 3280 Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. IETF. April 2002.
RFC 3447 Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1. IETF. February 2003.
OpenLDAP's webpage. OpenLDAP.
PKI - Implementing and Managing E-Security. Coriolis Group. 2001.
LDAP, Programming Directory-Enabled Applications with Lightweight Directory Access Protocol. Macmillan Technology Series, Macmillan Technical Publishing. 1997.
Understanding and Deploying LDAP Directory Services. Macmillan Network Architecture and Development Series, Macmillan Technical Publishing. 1999.
Public Key Infrastructure for KMU's (Project report, German only). Zuericher Hochschule Winterthur. Jule 2003.
Aufbau und Betrieb einer Zertifizierungsinstanz, DFN-PCA Handbuch (German only). Deutsches Forschungsnetz - DFN (Germany`s National Research and Education Network). May 2000.
Homepage of the SET standard. SET Secure Electronic Transaction LLC.
DocBook XSL: The Complete Guide. Sagehill Enterprises. September 2003.
DocBook: The Definitive Guide. O'Reilly & Associates. 31st December 2003.
The DocBook Wiki. DocBook.
Certification Authority
Certificate Revocation List
Certificate Revocation Request
Certificate Signing Request
DeMilitarized Zone is an area which is isolated from the inner and outer network of a firewall system. It is used to place servers in a protected area which has no direct access to the inner and outer network but can offer this service to people or systems in both areas. This is a very short description. Please consult specialized books or even better humans if you have absolute no idea how firewall systems work. This is really security relevant.
Distinguished Name
is nothing else than HTTP trough a SSL or TLS tunnel. It protects the communication between a http server and a browser. It was the first application for SSL and should be today the world's most widely used SSL application.
is nothing else than IMAP trough a SSL or TLS tunnel. It protects the communication between a mail server and a mail user agent if the user reads and manage it's mail.
Lightweight Directory Access Protocol
Level Of Assurance defines the quality of the identification of the certificate owner. Sometimes it is usefule to know how the owner of certificate was identified or would you send money because of signed mail if the owner was identified via email?
Mail Transfer Agent - a tool to send mail to other users or mail servers, e.g. Mozilla, Outlook (Express). Sendmail can be a MTA too if it acts as client.
Mail User Agent - e.g. Mozilla, Outlook (Express). This is the tool which a user uses to read and handle it's mail.
This is the management interface for an OpenCA installation on one machine.
Public Key Cryptography Standards are developed by RSA Security. They are widely accepted in the PKI area.
defines the ASN.1 structure of certificate signing request
is nothing else than POP trough a SSL or TLS tunnel. It protects the communication between a mail server and a mail user agent if the user reads and manage it's mail.
Registration Authority
Simple Certificate Enrollment Protocol was developed by Cisco and is used to handle the communication between a PKI and networkcomponents like router, switches and other (perhaps software) VPN components.
Secure MIME is a standard which defines how secured emails must be formatted. Please check the listed RFCs to find references to more detailed descriptions.
Simple Mail Transfer Protocol is used by mailservers like sendmail to exchange the mails. The protocol is used for mailtransfer from simple MTAs like Mozilla to servers like sendmail and for transfers from server to server.
is nothing else than SMTP trough a TLS tunnel. It protects the communication between a mail server and a mail user agent if the user reads and manage it's mail.
Signed Public Key And Challenge is a standard for CSRs from Netscape.
Secure Socket Layer is a tranport layer security protocol. It was one of the first certificate based security protocols for tunneling. Netscape developed this protocol for it's webbrowser Navigator. TLS is the standardized follower of this protocol. Today the versions 2 and 3 are still widely used and supported.
The subject of a certificate or of a request is the name of the certificate or request. The subject is a distinguished name and looks like “cn=Jon Doe, ou=Sales, o=startup, c=us”.
A symlink is nothing else than a symbolic link. Such links will be created by OpenCA usually with ln -s. We always try to avoid the shortcut but sometimes we are simply to fast ;-)
Transport Layer Security is a tranport layer security protocol. It is the standardized successor of SSL. All modern browsers use this protocol but it can be used to tunnel every other TCP based service.