OpenCA Guide for Versions 0.9.2+

$Id $


Table of Contents

Introduction
I. Design Guide
Preface
1. General Design
1. Basic Hierarchy
2. Interfaces
2.1. Node
2.2. CA
2.3. RA
2.4. LDAP
2.5. Pub
3. Configuration
4. Database
5. Interface
6. Life cycle of the objects
7. Sub-Ca
7.1. Example 1
7.2. Example 2
2. Recommendations
1. Hardware Issues
1.1. Time
1.2. Failing disks
1.3. Hardware monitoring
2. Physical Security
2.1. Safes and Data organization
2.2. Buildings
3. Network Issues
4. Certificate Issues
4.1. CDPs
4.2. Application specific problems
4.2.1. Mail servers
4.2.2. Netscape clients
4.2.3. OpenLDAP
5. Organizational Aspects
5.1. Dual Access Control
5.2. Privacy vs. Security
5.3. Enforcement of Access Control
5.4. Privacy Officer Integration
5.5. Enterprise Integration
5.6. Parallel use of several end user PKIs
II. Installation and Configuration Guide
Preface
3. Installation
1. Preparations
1.1. Software
1.2. Hardware
2. Configure
2.1. Host System Configuration
2.2. Host System Configuration (of the upcoming OpenCA 1.0)
2.2.1. OpenCA user and group
2.2.2. Daemon user and group
2.3. Filesystem paths
2.3.1. Common Prefixes
2.3.2. Component Prefixes
2.3.3. OpenSSL prefixes (OpenCA 1.0 only)
2.4. Webserver specific stuff
2.4.1. Common server informations
2.4.2. Filesystem Paths
2.4.3. URL Paths
2.5. Email
2.6. Compiling features
3. Installation
4. config.xml (for RPMs and DEBs too)
4.1. Configuration sections of config.xml
4.1.1. General options
4.1.2. web server configuration
4.1.3. ldap server configuration
4.1.4. database configuration
4.1.5. module configuration
4.1.6. configuration of relative paths
4.1.7. configuration of SCEP
4.1.8. Dataexchange
4.2. How to setup two management interfaces on one server?
4.2.1. Online Components
4.2.2. Offline Components
4.2.3. OPENCADIR/etc/menu.xml
4. Configuration
1. Access Control
1.1. Channel verification
1.2. Login
1.2.1. none
1.2.2. passwd
1.2.2.1. internal database
1.2.2.2. external authentication
1.2.3. x509
1.3. Session management
1.4. ACLs
2. Token and keyconfiguration
2.1. OpenSSL
2.2. Empty
2.3. LunaCA3
2.4. nCipher
2.4.1. Introduction
2.4.2. Implementation
2.4.3. Usage
2.4.4. HSM login shell
2.4.5. OpenCA Configuration
2.4.6. Example for the setup
2.5. OpenSC
3. OpenSSL
3.1. Certificate Extensions
3.1.1. Standard Extensions
3.1.1.1. Authority Key Identifier
3.1.1.2. Subject Key Identifier
3.1.1.3. Key Usage
3.1.1.4. Private Key Usage Period
3.1.1.5. Certificate Policies
3.1.1.6. Policy Mappings
3.1.1.7. Subject Alternative Name
3.1.1.8. Issuer Alternative Name
3.1.1.9. Subject Directory Attributes
3.1.1.10. Basic Constraints
3.1.1.11. Name Constraints
3.1.1.12. Policy Constraints
3.1.1.13. Extended Key Usage
3.1.1.14. CRL Distribution Points
3.1.1.15. Inhibit Any-Policy
3.1.1.16. Freshest CRL
3.1.2. Internet Certificate Extensions
3.1.2.1. Authority Information Access
3.1.2.2. Subject Information Access
3.1.3. Vendor Specific Extensions
3.1.3.1. Microsoft
3.1.3.2. Netscape
3.2. Profiles
3.2.1. HTTPS server
3.2.2. SMTP server
3.2.3. F-Secure VPN+
4. CSRs
4.1. Additional Attributes
4.2. PKCS#10 Requests
4.3. Basic CSR
4.4. SCEP
5. Subject
5.1. Common stuff
5.2. dc style
5.2.1. etc/servers/*.conf
5.2.2. main.html
5.2.3. certsMail.txt and expiringMail.txt
5.2.4. OpenSSL configuration
5.2.5. CA CSR
6. Subject Alternative Name
7. LDAP
7.1. Configuration of the Directory
7.2. Configuration of the online components
7.3. Writing Certificates to the Directory
7.4. Adding an attribute to the LDAP schema
8. SCEP
8.1. OPENCADIR/etc/servers/scep.conf
8.2. OPENCADIR/etc/config.xml
9. Dataexchange
9.1. Configuration
9.1.1. Configuration with simple files
9.1.2. Configuration via scp
9.2. Adding a new node
10. Databases
10.1. PostgreSQL
10.1.1. Basic Setup
10.1.2. Backup
10.1.3. Recovery
10.2. MySQL
10.3. Oracle
10.3.1. Perl database driver and Oracle OCI client libraries
10.3.2. OpenCA Oracle database configuration
10.3.3. Internal Authentication
10.3.4. External Authentication
10.3.5. Database privilege separation for the OpenCA application
10.3.6. Sample Oracle setup
10.4. DBM Files
10.4.1. Backup and Recovery
10.5. SQLite
11. Email
11.1. Sendmail with basic SMTP authentication
12. i18n
12.1. Debian 3.1 Sarge
III. User Guide
Preface
5. Features
1. 0.10
2. 0.9.2
6. Interface Descriptions
1. Public PKI Server
1.1. General
1.1.1. Logout
1.2. CA Infos
1.2.1. Policy
1.2.2. Get CA Certificate
1.2.3. Certificate Revocation Lists
1.3. User
1.3.1. Request a certificate
1.3.1.1. Request a certificate with automatic browser detection
1.3.1.2. Basic Request
1.3.1.3. Netscape's Request
1.3.1.4. IE Request
1.3.1.5. Server Request
1.3.1.6. Token Request
1.3.2. Get Requested Certificate
1.3.3. Test Certificate
1.3.4. Revoke Certificate
1.4. Certificates
1.4.1. Valid
1.4.2. Expired
1.4.3. Revoked
1.4.4. Suspended
1.4.5. Search
1.5. Requests
1.5.1. Certificate Requests List
1.5.2. Certificate Revocation Requests List
1.6. Language
2. Registration Authority
2.1. General
2.1.1. Server Management
2.1.2. LDAP Admin
2.1.3. Logout
2.2. Active CSRs
2.2.1. New
2.2.1.1. Edit Request
2.2.1.2. Approve and Sign Request
2.2.1.3. Approve Request without Signing
2.2.1.4. Delete Request
2.2.2. Renewed
2.2.3. Pending (be processed already)
2.2.4. Waiting for additional signature
2.3. Active CRRs
2.3.1. New
2.3.1.1. Approve and Sign Request
2.3.1.2. Approve Request without Signing
2.3.1.3. Delete Request
2.3.2. Pending (be processed already>
2.3.3. Waiting for additional signature
2.4. Information
2.4.1. Certificate Requests
2.4.2. Revocation Requests
2.4.3. Certificates
2.4.4. CA Certificates
2.4.5. CRLs
2.5. Utilities
2.5.1. Search Certificate
2.5.2. Search CSR
2.5.3. Warn Expiring Certificates
3. Registration Authority Node
3.1. General
3.1.1. Certificate Authority
3.1.2. Registration Authority
3.1.3. LDAP Admin
3.1.4. Public
3.1.5. Logout
3.2. Administration
3.2.1. Stop Daemons of Cryto Tokens
3.2.2. Server Init
3.2.2.1. Initialise DataBase
3.2.2.2. Import Configuration
3.2.3. Dataexchange
3.2.3.1. Enroll data to a lower level of the hierarchy
3.2.3.2. Receive data from a lower level of the hierarchy
3.2.3.3. Download data from a higher level of the hierarchy
3.2.3.3.1. All
3.2.3.3.2. Certificates
3.2.3.3.3. CRLs
3.2.3.3.4. Configuration
3.2.3.3.5. Batchprocessors
3.2.3.4. Upload data to a higher level of the hierarchy
3.2.3.4.1. All
3.2.3.4.2. Requests
3.2.3.4.3. CRRs
3.2.4. Backup and Recovery
3.2.4.1. Backup Database
3.2.4.2. Recovery Initialize Database
3.2.4.3. Restore Database
3.2.4.4. Rebuild OpenSSL's database and next serial number
3.2.5. Database
3.3. Utilites
3.3.1. E-Mail new users
3.3.2. Send a CRIN-mail
3.3.3. Cleanup sessions
3.3.4. Delete Temp Files
3.3.5. Rebuild CA Chain
3.4. Logs
3.4.1. Search
3.4.2. Recovery index database
4. LDAP Interface
4.1. Update LDAP
4.1.1. CA-Certificate
4.1.2. Certificates
4.1.3. CRL
4.2. View CA-Certificates
4.2.1. Valid
4.2.1.1. Add to LDAP
4.2.1.2. Add to LDAP with modified DN
4.2.1.3. Delete from LDAP
4.2.1.4. Delete from LDAP with modified DN
4.2.2. Certificates Expired
4.3. View Certificates
4.3.1. Valid
4.3.1.1. Add to LDAP
4.3.1.2. Add to LDAP with modified DN
4.3.1.3. Delete from LDAP
4.3.1.4. Delete from LDAP with modified DN
4.3.2. Expired
4.3.2.1. Add to LDAP
4.3.2.2. Add to LDAP with modified DN
4.3.2.3. Delete from LDAP
4.3.2.4. Delete from LDAP with modified DN
4.3.3. Suspended
4.3.3.1. Add to LDAP
4.3.3.2. Add to LDAP with modified DN
4.3.3.3. Delete from LDAP
4.3.3.4. Delete from LDAP with modified DN
4.3.4. Revoked
4.3.4.1. Add to LDAP
4.3.4.2. Add to LDAP with modified DN
4.3.4.3. Delete from LDAP
4.3.4.4. Delete from LDAP with modified DN
4.4. View CRLs
4.4.1. CRLs
4.4.1.1. Add to LDAP
4.4.1.2. Add to LDAP with modified DN
7. Functionality Descriptions
1. CA Initialization
1.1. Phase I: Initialize the Certification Authority
1.1.1. Database Setup
1.1.2. Key pair setup
1.1.3. Request setup
1.1.4. Certificate setup
1.1.5. Final setup
1.2. Phase II and III: Create the initial administrator and RA certificate
2. Node Initialization
3. CSR Handling - a request HOWTO
3.1. Ways to request a certificate
3.1.1. Microsoft client request
3.1.2. SPKAC request
3.1.3. Pregenerated PKCS#10 request handling
3.1.4. Request a centrally generated smartcard
3.1.5. Serverside key and request generation
3.1.6. Automatic browserdetection
3.1.7. Input field explanations
3.2. Edit a certificate signing requests
3.3. Approve certificate signing requests
3.4. Issue a certificate from a certificate signing request
3.5. Certificate enrollment
3.6. Delete certificate signing requests
4. Certificate Handling
4.1. Find a certificate
4.2. Download
4.2.1. Direct Download
4.2.2. Downloads from certificate page
4.2.2.1. Normal Downloads
4.2.2.2. Private Key Downloads
4.2.2.3. Certificate Installation
4.3. Start revocation
4.4. Write an email to the owner
4.5. Informational messages and their meaning
5. SCEP
5.1. SSCEP
5.2. NetScreen ScreenOS
5.3. F-Secure VPN+
5.4. Cisco PIX
8. Client Support
1. Introduction
2. Mozilla
2.1. General
2.1.1. Requesting a certificate
2.1.2. Installing a certificate
2.2. Mozilla
2.2.1. Backup a certificate
2.2.2. Signing Data
2.2.2.1. Mozilla 1.7+ and Firefox 0.9.3+
2.2.2.2. Mozilla 1.0 to 1.6, Firefox up to 0.9.2 and Netscape 6 and 7
2.2.2.3. SecClab
2.2.2.4. WaMCom
2.3. Netscape 4
2.3.1. Backup a certificate
2.3.2. Signing Data
2.4. Opera
3. Microsoft
3.1. Domaincontroller
3.1.1. OpenSSL 0.9.7
3.1.2. OpenSSL 0.9.8
3.2. Smartcard Logon
3.2.1. OpenSSL 0.9.7 (patched)
3.2.2. OpenSSL 0.9.8
3.3. Keystore
3.4. Internet Explorer
3.5. Outlook
3.6. Outlook Express
IV. Technology Guide
Preface
9. Introduction
1. Slotechnology
10. XML
11. Cryptolayer
12. Accesscontrol
13. Logging
14. Webinterfaces
1. Interfacebuilding
1.1. Technology overview
1.2. Customization capabilities
1.2.1. Statical Pages
1.2.2. cmds
1.2.2.1. New command
1.2.3. configuration files
1.2.4. configure_etc.sh
2. CSS
3. Configuration after installation
15. Hierarchy
1. Nodemanagement
2. Dataexchange
16. LDAP
1. LDAP schema specification
1.1. Used objectclasses
1.2. Supported attributes
1.3. Common definitions for distinguished names
1.4. Special definitions for user certificates
2. Sourcecodeorganization
2.1. Structure of the code
2.2. The relevant commands
2.3. export-import.lib
2.4. ldap-utils.lib
2.5. OpenCA::LDAP
17. Database
1. Tables
2. Sequences
3. Indexes
18. Batch System
1. Requirements
2. Design
3. Data Import
4. Database background
5. Change the workflow
6. Default workflow
7. What about the different crypto tokens?
8. Performance
8.1. PIII 850MHz, 256 MB RAM
19. Packaging
1. Common Notices
1.1. Required Perl modules
2. RPM-based system
2.1. RedHat/Feodora
2.2. SuSE
2.2.1. HOWTO
2.2.2. Dependency checking
3. Debian
4. BSD
20. Software Design (legacy from design guide)
1. Database(s)
2. Interface construction
3. openca.cgi
4. libraries
5. modules
6. commands
7. Dataexchange and Node management
A. History
1. PKI Scenario before OpenCA
2. PKI and eGovernment
3. Internet Standards
4. The Project's Purposes
5. The Project's Achievements
6. The OpenCA Project
6.1. The project start
6.2. Offering Help to Other Projects: OpenSSL
6.3. CVS and Mailing Lists
6.4. The Open Source Choice
6.5. Migrating to SourceForge
B. References
1. Universities
C. Internationalization - i18n
1. de_DE
2. it_IT
3. ja_JP
4. pl_PL
5. sl_SI
D. Authors and Contributors
1. Martin Bartosch
2. Michael Bell
3. Chris Covell
4. Massimiliano Pala
5. Ulrich Bathels
6. Ashutosh Jaiswal
7. FAQ
E. FAQ
1. General PKI Issues
1.1. What is a certificate?
1.2. Which informations does a certificate contain?
1.3. What is a request?
1.4. Which information does a CSR contain?
1.5. What is a CA?
1.6. Why should I not place the CA on the same machine like the RA?
1.7. What is an extensions?
1.8. I use Windows 2000 and Internet Explorer 6 SP1 and it don't show any CSPs.
1.9. How can I setup a sub CA?
2. General OpenCA Issues
2.1. Does it be possible to revoke a certificate without any user interaction?
2.2. I try to add a role and get the message “The role XYZ exists already!
2.3. All cryptographic operations fail.
2.4. Apache's error_log reports a nonexistent option -subj of openssl req
2.5. Apache's error_log contains a message from IBM DB2 that the environment is not setted
2.6. What do the new features of 0.9.2 be?
2.7. I try to approve and sign a request with Mozilla and it fails.
2.8. I try to approve and sign a request with Konqueror (KDE) and it fails.
2.9. How is the format of the disc to import the CA certificate from the root CA?
2.10. OpenSSL reports entry 1: invalid expiry date
2.11. Outlook cannot encrypt mail with imported certificate
2.12. My Outlook freezes after I received a signed email
2.13. General Error 6751 during certificate issuing
2.14. What does I have to do if I create a new release?
2.15. How can I configure Mozilla for OCSP?
2.16. Error 7211021: Cannot create request!
3. Installation Issues
3.1. FreeBSD, OpenBSD and OpenCA
3.1.1. make
3.1.2. install
3.2. Solaris and OpenCA
3.2.1. make
3.3. What is a hierarchy level?
3.4. Undefined subroutine &main::xyz
3.5. Symbolic link installaton failed
3.6. After the installation all common parts are missing
3.7. Conflicting Modules
3.8. The xml path to the access control is missing
3.9. Unknown Login Type
3.10. Type Mismatch during request generation with Internet Explorer
3.11. openca(_rc) start failed
3.12. Missing modules
3.12.1. XML::Parser
3.13. Trouble with databases, database drivers and Perl DBI
4. Configuration Issues
4.1. How can I configure my httpd.conf for virtual hosts?
4.2. How can I configure virtual hosts with ./configure?
4.3. I have some users which should not be published in LDAP. Does it be possible with OpenCA?
4.4. Does it be possible to authenticate users by their certificates at the apache before they will be authenticated by OpenCA itself?
4.5. I want to update my 0.9.2 installation. Is this dangerous?
4.6. I want update to 0.9.2. How can I update my sql database?
4.7. If I run openca-ocspd then I obtain a segmentation fault.
4.8. I installed a second public interface, run configure_etc.sh and now are all the paths in the other public interface wrong.
4.9. I issue a certificate for a mailserver but sendmail doesn't work and reports an errormessage which includes “reason=unsupported certificate purpose
4.10. My (Microsoft) client hangs after it tries to start a secured connection
4.11. Outlook freezes when receiving a signed Mail but worked already fine for some days
4.12. During the request generation OpenCA fails and reports a too short textfield
4.13. Can I place my organization's logo on the web interface?
4.14. Cannot create new OpenCA tokenobject
4.15. How can I use a Luna token with OpenCA 0.9.1
4.16. How can I include a complete certificate chain into a PKCS#12 file?
4.17. Unknown login type
4.18. Cannot initialize cryptoshell but OpenSSL path is correct
4.19. Emailaddress in subjectAltName but not in CA subject
4.20. Missing environment variables from SSL
4.21. Problems with the country name during PKCS#10 requests
5. Access Control problems
5.1. Always get a login screen - again and again
5.2. Error 6251023: Aborting connection - you are using a wrong channel
5.3. Error 6251026: Aborting connection - you are using a wrong security protocol
5.4. Error 6251029: Aborting connection - you are using the wrong computer
5.5. Error 6251033: Aborting connection - you are using a wrong asymmetric cipher
5.6. Error 6251036: Aborting connection - you are using a too short asymmetric keylength
5.7. Error 6251039: Aborting connection - you are using a wrong symmetric cipher
5.8. Error 6251043: Aborting connection - you are using a too short symmetric keylength
6. Dataexchange
6.1. I try to export something but I get error 512 “permission denied” for /dev/fd0
6.2. I try to import the CA certificate but it doesn't work.
6.3. I crashed the database of the online server and now I want to import all data again. How can I do it?
6.4. I try to export the requests to the CA but it doesn't work
7. LDAP
7.1. Errormessage: Connection refused.
7.2. Errormessage: Bind failed. Errorcode 49.
7.3. The resultcode of the nodeinsertion was 65.
7.4. How can I get more debugging messages from OpenCA's LDAP code?
7.5. How can I get more debugging messages from OpenLDAP?
8. Internationalization
8.1. How can I fix a misspelling for a language?
8.2. How can I add a new language?
8.3. The compilation/make fails on the Perl module gettext
8.4. MySQL and SET NAMES errormessages
Bibliography
Glossary
F. Strategy
1. The Strategy Behind OpenCA Development
1.1. Scalability
1.2. Command Line API to CA and RA Functions
1.3. Automation functions
1.4. On-line CA model option
1.5. High Risk Environment Mode
1.6. Audit logging
1.7. Script/environment validation
1.8. Automated CA rollover
1.8.1. External and Internal CAs
1.8.2. Request processing
1.8.3. Dispatching requests to Internal CAs
1.8.3.1. Rollover requirement 1: automatic consideration of CA validity
1.8.3.2. Rollover requirement 2: request dispatch decision
1.8.3.2.1. CRL issuance
1.8.3.2.2. Certificate issuance
1.8.3.2.3. Certificate revocation
1.8.3.2.4. Certificate renewal
1.9. Function to process signing and encryption keys in one go
1.10. Secure storage and recovery of encryption keys
1.11. Web based OpenCA configuration and management
1.12. Improved key lifecycle management
1.13. Authentication via a third party
1.14. Improved debugging support
1.15. Improved error handling
1.16. Accreditation

List of Figures

1.1. Database oriented view
1.2. Logical data view
1.3. Complete technical overview
1.4. Life cycle of objects
4.1. Passes of the accesscontrol
4.2. Passphrase based login
4.3. Tokenconcept
7.1. Phases of the CA initialization
7.2. Phase I of the CA initialization
7.3. Phase II of the CA initialization
7.4. Phase III of the CA initialization
8.1. Request a certificate
11.1. Example cryptolayer with tokens
12.1. Passes of the accesscontrol
12.2. Channel verification
12.3. Identification of the user
12.4. Access control list
16.1. LDAP source schema

List of Tables

3.1. External Perl modules
3.2. Supported parameters for host configuration
4.1. Additional attributes configuration
4.2. Generic basic CSR configuration
4.3. Common stuff configuration
16.1. Schema usage
16.2. Schema usage for user certificates
18.1. Default OpenCA workflow
18.2. 1000 User test
E.1. Texttypes for different databases

List of Examples

3.1. Module ID calculation
4.1. channel configuration
4.2. Login and Passphrase configuration
4.3. External program authentication configuration
4.4. Authentication with certificates
4.5. Session configuration
4.6. Basic ACL configuration
4.7. Permission for serverInfo
4.8. Allow all
4.9. Configuration of HSM Login/logout in menu.xml
4.10. Configuration of token.xml for nCipher
4.11. OpenSSL configuration - Authority Key Identifier
4.12. Minimal SSL client extensions
4.13. Minimal SSL server extensions
4.14. Minimal SMTP extensions for a single certificate
4.15. Additional attributes configuration
4.16. PKCS#10 configuration
4.17. Basic CSR configuration
4.18. Configuration example for a XML file based HTML-select
4.19. suffix in ldap.xml
4.20. excluded roles in ldap.xml
4.21. Schema extension for RDN uid_special
4.22. Download configuration
4.23. Export configuration
4.24. Local export configuration
4.25. OpenCA rc script that sources Oracle environment
4.26.
4.27. /etc/mail/sendmail.mc
7.1. SSCEP configuration
8.1. OpenSSL 0.9.7 key usage and extended key usage for DCs
8.2. OpenSSL 0.9.7 subjectAltName for DCs
8.3. OpenSSL 0.9.7 certificate template name for DCs
8.4. OpenSSL 0.9.8 subject alternative name section for DCs
8.5. extendedKeyUsage for clients
18.1. batch_new_user.txt
18.2. batch_new_process.txt
18.3. batch_process_data.txt
19.1. SuSE packaging
E.1. General error 6751 during certificate issueing
E.2. Bad passphrase error log during certificate issueing
E.3. Error 7211021: Cannot create request!
E.4. Full errormessage for missing functions
E.5. Already present symbolic link
E.6. Search for XML::Twig modules
E.7. Type Mismatch on Internet Explorer
E.8. Failed startup with wrong Net::Server version
E.9. failing XML parsing during configuration
E.10. failing XML parsing during configuration
E.11. empty Twig.pm files because of missing XML::Parser
E.12. Too old DBD::Pg or DBI trouble
E.13. virtual host configuration
E.14. ./configure and virtual hosts
E.15. Client authentication with mod_ssl
E.16. OCSP configuration for LDAP
E.17. OCSP configuration for http
E.18. emailaddress for subjectAltName in CA certs
E.19. Missing mod_ssl standard environment variables
E.20. SSL environment variable configuration for Apache
E.21.
E.22. Failed request upload

Introduction

Public Key Infrastructures (PKIs) are one of the most widely accepted musts of the future. The problem is that most applications can be secured with certificates and keys but it is really difficult and expensive to setup PKIs, the reason being that flexible trustcenter software (especially for Unix) is expensive. This was the starting point of OpenCA. Our goal is production of an open source trustcenter system to support the community with a good, inexpensive and future-proof solution for their base infrastructure.

OpenCA started in 1999. The first idea consisted of three major parts - a Perl web interface, an OpenSSL backend for the cryptographic operation and a database. This simple concept is still our motto today. Nearly all operations can be performed via some web interface. We have six pre-configured interfaces and many more can be created from them, depending on the need. The cryptographic backend is still OpenSSL, which is in no way a disadvantage. We want to build the organizational infrastructure for a PKI. This is our major goal and the guys from OpenSSL have much more experience with cryptography than we have. Our databases store all the needed information about the users' cryptographic objects like Certificate Signing Requests (CSRs), Certificates, Certificate Revocation Requests (CRRs) and Certificate Revocation Lists (CRLs).

If you imagine that the development of OpenCA will be finished in some weeks or months then you are probably on the wrong way. There are many items which still need to be implemented. Today we support the following elements (this is an incomplete list just to give you an impression of how complex the subject matter is):

  • Public interface

  • LDAP interface

  • RA interface

  • CA interface

  • SCEP

  • OCSP

  • IP-filters for interfaces

  • Passphrase based login

  • Certificate based login (including smartcards)

  • Role Based Access Control

  • Flexible Certificate Subjects

  • Flexible Certificate Extensions

  • PIN based revocation

  • Digital signature based revocation

  • CRL issuing

  • Warnings for soon to expire certificates

  • support for nearly every (graphical) browser

OpenCA is designed for a distributed infrastructure. It can, not only handle an offline CA and an online RA, but using it you can build a whole hierarchy with three or more levels. OpenCA is not just a small solution for small and medium research facilities. The goal is to support maximum flexibility for big organizations like universities, grids and global companies.

The OpenCA guides consist of four parts: The first part is a design guide which should help you to setup a good infrastructure. The second part describes all the activities which must be performed offline by some administrator. 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 part is meant only for developers and hardcore administrators to understand what's going on.

Finally we wish to thank everybody who helped us program, test and document OpenCA. This also includes of all the universities and companies which finance the work of our developers.

Design Guide

Preface

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 be changed at every time the software changes. So please be lenient toward us :)

Chapter 1. General Design

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 OpenCA novices must also have a chance to understand the software.

1. Basic Hierarchy

The basic idea of every X.509 PKI (Public Key Infrastructure) is a strong hierarchical organization. This results in a tree of databases if we try to create a distributed PKI architecture.

This is a storage oriented view of a PKI.

Figure 1.1. Database oriented view

The data exchange between such isolated databases can be handled automatically if you use a distributed database system but in the sense of OpenCA such a distributed database system is only one database in our tree. If you really have an isolated database (e.g. for an Offline CA) then you must have the technology for the data exchange and the management of the complete node in the hierarchy. This management functionality is bundled in an interface called node or node management. Hence the design of OpenCA looks like follows

This is a storage oriented view of the information flow in a PKI.

Figure 1.2. Logical data view

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.

2. Interfaces

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 web-gateway? OpenCA supports all these software components via special web interfaces.

If you want to design a powerful trustcenter then you must have a concept about how you want to organize your work flow. You can see an example in the following figure.

This is a technical overview of a PKI.

Figure 1.3. Complete technical overview

OpenCA actually supports the following interfaces:

  1. Node (for node management)

  2. CA

  3. RA

  4. LDAP

  5. Pub

  6. SCEP

2.1. Node

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 access rights 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 separate 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.

2.2. CA

The CA interface has all the functions which you need to create certificates and Certificate Revocation Lists (CRLs). The CA also includes all the functions which you can use to change the configuration via a web interface. It is not possible to change the configuration via another web interface.

The CA is the home of the batch processors too. OpenCA includes some powerful batch processors for creating certificates. These batch processors can be used for automatic certificate creation from various Enterprise Resource Planning (ERP) systems (e.g. SAP, HIS, NIS or /etc/passwd).

2.3. RA

OpenCA's RA is able to handle all kinds of requests. This include things like editing requests, approving requests, creating private keys with smart cards, delete wrong requests and email users.

2.4. LDAP

The LDAP interface was implemented to separate the LDAP management completely from the rest of the software. This is necessary because there are many functions which are really specific for LDAP admins, with only a few users needing these features.

2.5. Pub

The Public interface includes all the small things which the users need. This is only a small list and perhaps it is incomplete

  • generates CSRs (certificate signing request) for Microsoft Internet Explorer

  • generates CSRs for Mozilla 1.1+ and Netscape Communicator and Navigator

  • generates client independent requests and private keys (e.g. for KDE's konqueror or server administrators who 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 user certificates in browsers (Microsoft Internet Explorer and Netscape Communicator and Navigator 4.7x)

3. Configuration

4. Database

5. Interface

6. Life cycle of the objects

OpenCA has a very private key centric workflow idea. This means that all objects which deal with the same public/private key should be connected to each other. The reason is that the most dangerous event is a key compromise. If only a single certificate is wrong then we have no problem but if a key is compromised then all requests and certificates which are connected to this key are affected.

Sometimes there is a confusion about the status of OpenCA objects. In the following figure you can check here the complete life cycle of all OpenCA objects. If this figure is not complete, or if you find a mistake or you don't understand something then please contact openca-users@lists.sf.net

Life cycle of all objects in a PKI.

Figure 1.4. Life cycle of objects

7. Sub-Ca

7.1. Example 1

Direct chaining of the Root CA and Sub CA including an image.

7.2. Example 2

Chaining of a Root CA and a Sub CA via a normal public interface.

Chapter 2. Recommendations

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.

1. Hardware Issues

This section lists hardware issues which were a problem for some PKIs during their production use. This list does not discuss performance issues.

1.1. Time

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 time source. The most timeservers finally use a radio clock which receives a unsigned time signal from a radio station. This signal can be easily faked because it is very weak. So network time sources are really insecure.

After discussing the disadvantages of using online computers we can discuss offline technologies. Radio clocks are problematic and hence we need not discuss them twice. Also many buildings made from good ferroconcrete do not have problems with radio signals because they act as really nice Faraday cages! So what are the alternatives? First we need a trustworthy time source. Simply take a digital watch and compare it's time with several other clocks on the Internet, the video text of your TV, a radio clock, 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. So as you can see time is not trivial.

1.2. Failing disks

The most common hardware crashes involve cooler and disk failures. You should backup all your important data - especially 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 disk crashes. RAIDs are sometimes expensive but they helps a lot (ask your SAN admins :) ).

1.3. Hardware monitoring

Usually you can make a visual observation if your laptop crashes. A crashed offline computer can be detected by visual monitoring too. However a crashed online component of a PKI is problem because important information is not available,such as newly issued certificates and CRLs. Such a situation also brings down your services like SCEP. If a public interface of the security infrastructure is down then you are bound to have a trust problem with your users in the future. It is also noteworthy that a simple ping is not enough to detect hardware failure. 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 :)

2. Physical Security

2.1. Safes and Data organization

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 the following method as an example: use one IT module safe and two data safes. An IT module safe is a safe with its own climatization 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. The setup is really simple and really efficient too.

The organization of the safes is really easy. You split the CA passphrase into two parts - front and back. The organization of the data and computers is like follows:

  1. The IT module safe includes the notebook (with the CA private key) and the front part of the passphrase.

  2. The first data safe includes the backups (including the private key backups) and the back part of the passphrase.

  3. The second data safe includes the front and back parts of the passphrase.

This organization ensures that one broken safe doesn't corrupt the infrastructure. It is important to immediately start a roll out of a new infrastructure but there is no reason for panic. This arrangement also ensures that a loss of one safe doesn't stop your operation. You need two safes to survive and the loss of one safe is acceptable at minimum for a short period of time.

Please remember that this is a really simple idea for medium risk CAs. High risk CAs should use more complex schemes to tolerate more than one broken safe. They should be able to tolerate at least two broken safes to have a longer schedule for the roll-out of a new CA.

2.2. Buildings

This is more an area for a facility manager. The rooms with the PKI safes inside should have solid walls and a door with two locks. The room including the climatization system should be fire proof 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 should also have an alarm system and must be safe against electro magnetic pulse (EMP) and water flooding. This is only a short summary of ideas. Please ask some assurance specialists or architects for more details.

3. Network Issues

A PKI is only fully functional if all the services provided by it are fully operational. This include not only things like OCSP and SCEP but the public gateway as well. Many people think it is enough if the OCSP and one CDP keeps working but this is not sufficient. The first reason being that most applications don't understand OCSP. The second problem is that the last running CDP might only support LDAP, regardless of the fact that there are applications which only support HTTP. Even more problematic is a single running HTTPS CDP. The core mistake in the assumption is the meaning of fully operational. A PKI is not fully operational if only the CDPs still work. Nobody can download a new certificate or the certificate of an existing user in such a state. The PKI would still be secure but it would not be 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 fiber only helps if it is not in same pipe like the other one. Digging crews don't differentiate between the fibers if they accidentally cut a pipe! I know this situation really well :( If you have big distributed unit then it is recommended that at the minimum two of these units run the public interface. In this case you should also have independent interconnects.

4. Certificate Issues

This section consists of two big groups of problems - CDPs and application specific problems. Applications are also discussed in other sections of the OpenCA guide in case we have developed special configurations to solve the problem.

4.1. CDPs

CRL Distribution Points are a critical area. There were several PKIs in the earlier years which had 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 should not be a source for a CRL. It can be an OCSP responder. A CDP is today more of a Certificate Status Point.

The first question is which protocols must be supported. The common protocols LDAP and HTTP should be supported always. HTTP is supported by nearly all devices but some devices prefer LDAP over HTTP - especially some network solutions. Additionally there are OCSP and HTTPS. 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 not but sometimes yes. CRLs are signed by the CA and they have period of validity. There is only one working attack for CRLs. If a certificate was revoked, but the old CRL is still valid and if 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 most applications don't accept CRLs if the timestamp for the next update is over. The cool thing is that a CRL is never invalid! There can only be a newer CRL but as mentioned earlier 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 components like cables, routers, switches and servers. It is a really good idea to always have a local CDP if you only have a single interconnect to your central network. However not every branch office needs its own CDP, since if their computers (including their file and mail systems) are offline then it is not necessary to have a CDP online.

The third question is tricky. 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 servers one and two are not available because of a more or less big digger then your applications waits for four timeouts 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. Do you think a user would wait two minutes per recipient of an email, for verification if he wants to send a commit for a meeting?

The last question often, does not have a complete solution today. Can some supported and necessary protocols crash other applications? If you use HTTPS then you should invest some time on this problem because it is a typical chicken 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 would contact the HTTPS CDP again to verify the certificate and the verification problem would start 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.

4.2. Application specific problems

4.2.1. Mail servers

If you start thinking about email security then the starting point is S/MIME or PGP. However at times ethereal admins just use IMAPS and POPS. So far so good. Later they think about server based security and try to implement SMTP over TLS. Certificates issued by OpenCA can be used for SMTP over TLS because the certificates can act both as a client and a server certificate. If you use some other software than OpenCA, or you create a new role for such servers then you should read the documentation of your SMTP server really carefully.

A SMTP server can use two methods for SMTP over TLS. It can use a single 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 for the certificates 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”.

4.2.2. Netscape clients

Old Netscape clients do not conform with RFC standards. They use the common name as a regexp to match the server name and ignore the subject alternative name completely. A workaround is described in the configuration area of OpenSSL (see Section 3.2.1, “HTTPS server”).

4.2.3. OpenLDAP

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, instead it checks the common name of the subject to match the DNS name or IP address. This fails if the certificate subject includes a regexp for old Netscape clients. Two non-standard compliant software packages collide here. Netscape needs regular expressions, OpenLDAP does not support regular expressions and both software packages do not check the subject alternative name first. So it's your job to make a trade-off, or to use Mozilla!

5. Organizational Aspects

5.1. Dual Access Control

dual access control (physical and technical but first organizational aspects)

5.2. Privacy vs. Security

privacy vs. security (e.g. camera recorders)

5.3. Enforcement of Access Control

access control but who controls the access control regulations (no self control)

5.4. Privacy Officer Integration

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 conventional areas?

5.5. Enterprise Integration

already existing ERP DBs meta directories

5.6. Parallel use of several end user PKIs

There are numerous situations where it is a good idea to operate more than one PKI for end users. Perhaps you need a server CA and a separate user CA. Sometimes an old CA is still active in issuing CRLs because there are still valid certificates but the new CA issues the newer certificates. Other people use different CAs to establish an easy access control by certificate chains (so called trust paths). As you can see there are really many situations where you have to operate more than one PKI.

Most PKI programmers like me have no problem in distinguishing between different PKIs, because we always ask ourselves as to who issued the certificate. Normal users instead look at the certificate, call the hotline and ask why their certificate for Jon Doe with serial 12345 does not work. At the other end the guy from the hotline looks into his computer and answers that the certificate is correct and valid. So what's going on?

A certificate has two significant elements to identify a certificate, which are different from the common name in the subject of the certificate, and which are easy to handle. The keyID and issuer from the authority key identifier are however not easy to interpret for an end user. 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 is by using organization wide unique serial numbers. If you start a second CA or you have to replace an old CA, never reuse serial numbers if possible. You will have to search for hours if somebody calls you and reports a broken certificate chain for a certificate 12345 when you have two of those certificates. If you ever issued certificates with identical serials then always ask the issuer if you receive an error report. Never ever create a replacement for an old CA with the same name. It only causes trouble.

To sum it up in a simple manner: If you avoid duplicate identifiers then you automatically avoid many problems.

Installation and Configuration Guide

Table of Contents

Preface
3. Installation
1. Preparations
1.1. Software
1.2. Hardware
2. Configure
2.1. Host System Configuration
2.2. Host System Configuration (of the upcoming OpenCA 1.0)
2.2.1. OpenCA user and group
2.2.2. Daemon user and group
2.3. Filesystem paths
2.3.1. Common Prefixes
2.3.2. Component Prefixes
2.3.3. OpenSSL prefixes (OpenCA 1.0 only)
2.4. Webserver specific stuff
2.4.1. Common server informations
2.4.2. Filesystem Paths
2.4.3. URL Paths
2.5. Email
2.6. Compiling features
3. Installation
4. config.xml (for RPMs and DEBs too)
4.1. Configuration sections of config.xml
4.1.1. General options
4.1.2. web server configuration
4.1.3. ldap server configuration
4.1.4. database configuration
4.1.5. module configuration
4.1.6. configuration of relative paths
4.1.7. configuration of SCEP
4.1.8. Dataexchange
4.2. How to setup two management interfaces on one server?
4.2.1. Online Components
4.2.2. Offline Components
4.2.3. OPENCADIR/etc/menu.xml
4. Configuration
1. Access Control
1.1. Channel verification
1.2. Login
1.2.1. none
1.2.2. passwd
1.2.2.1. internal database
1.2.2.2. external authentication
1.2.3. x509
1.3. Session management
1.4. ACLs
2. Token and keyconfiguration
2.1. OpenSSL
2.2. Empty
2.3. LunaCA3
2.4. nCipher
2.4.1. Introduction
2.4.2. Implementation
2.4.3. Usage
2.4.4. HSM login shell
2.4.5. OpenCA Configuration
2.4.6. Example for the setup
2.5. OpenSC
3. OpenSSL
3.1. Certificate Extensions
3.1.1. Standard Extensions
3.1.1.1. Authority Key Identifier
3.1.1.2. Subject Key Identifier
3.1.1.3. Key Usage
3.1.1.4. Private Key Usage Period
3.1.1.5. Certificate Policies
3.1.1.6. Policy Mappings
3.1.1.7. Subject Alternative Name
3.1.1.8. Issuer Alternative Name
3.1.1.9. Subject Directory Attributes
3.1.1.10. Basic Constraints
3.1.1.11. Name Constraints
3.1.1.12. Policy Constraints
3.1.1.13. Extended Key Usage
3.1.1.14. CRL Distribution Points
3.1.1.15. Inhibit Any-Policy
3.1.1.16. Freshest CRL
3.1.2. Internet Certificate Extensions
3.1.2.1. Authority Information Access
3.1.2.2. Subject Information Access
3.1.3. Vendor Specific Extensions
3.1.3.1. Microsoft
3.1.3.2. Netscape
3.2. Profiles
3.2.1. HTTPS server
3.2.2. SMTP server
3.2.3. F-Secure VPN+
4. CSRs
4.1. Additional Attributes
4.2. PKCS#10 Requests
4.3. Basic CSR
4.4. SCEP
5. Subject
5.1. Common stuff
5.2. dc style
5.2.1. etc/servers/*.conf
5.2.2. main.html
5.2.3. certsMail.txt and expiringMail.txt
5.2.4. OpenSSL configuration
5.2.5. CA CSR
6. Subject Alternative Name
7. LDAP
7.1. Configuration of the Directory
7.2. Configuration of the online components
7.3. Writing Certificates to the Directory
7.4. Adding an attribute to the LDAP schema
8. SCEP
8.1. OPENCADIR/etc/servers/scep.conf
8.2. OPENCADIR/etc/config.xml
9. Dataexchange
9.1. Configuration
9.1.1. Configuration with simple files
9.1.2. Configuration via scp
9.2. Adding a new node
10. Databases
10.1. PostgreSQL
10.1.1. Basic Setup
10.1.2. Backup
10.1.3. Recovery
10.2. MySQL
10.3. Oracle
10.3.1. Perl database driver and Oracle OCI client libraries
10.3.2. OpenCA Oracle database configuration
10.3.3. Internal Authentication
10.3.4. External Authentication
10.3.5. Database privilege separation for the OpenCA application
10.3.6. Sample Oracle setup
10.4. DBM Files
10.4.1. Backup and Recovery
10.5. SQLite
11. Email
11.1. Sendmail with basic SMTP authentication
12. i18n
12.1. Debian 3.1 Sarge

Preface

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.

Chapter 3. Installation

1. Preparations

1.1. Software

OpenCA is not a complete monolithic system. It uses several software products from other developers of the Open Source community. The following things are used:

  • Apache

  • mod_ssl

  • OpenSSL

  • OpenLDAP

  • Perl

We use a lot of different Perl modules. Beginning with OpenCA 0.9.2 we no longer install all foreign modules. This is the normal behaviour of every Open Source project. The following should give you an overview about the required modules. Please note that you must install at minimum the listed version because some earlier versions like for example Net::Server include serious bugs.

ModuleVersionComment
Authen::SASL2.04 required by Net::LDAP for SASL authentication - if you do not use SASL then you do not need it
CGI::Session3.95required for our own session handling
Convert::ASN10.18???
Digest::HMAC1.01required by Authen::SASL
Digest::MD52.24this is usually part of Perl itself
Digest::SHA12.02required by OpenCA itself
Encode::Unicode???required by OpenCA for the internationalization stuff
IO::Socket::SSL0.92???
IO::stringy2.108???
MIME::Base642.20required for Base64 encoding and decoding
MIME::Lite3.01required for OpenCA mail handling
MIME-tools5.411required for OpenCA mail handling
MailTools1.58required for OpenCA mail handling
Net-Server0.86required for OpenCA daemon - the version is important
URI1.23???
XML::Twig3.09used for XML parsing

Warning

Please read the file README in the distribution of XML::Twig which you use really carefully. There are several incompatibilities with some versions of XML::Parser and expat. The used version of Perl is heavily important too.

libintl-perl1.10this is our interface for the i18n stuff
perl-ldap0.28Perl's LDAP interface

Table 3.1. External Perl modules

1.2. Hardware

OpenCA was tested on several softwarearchitectures but not on so many hardware architectures. Therefore we publish a list of used hardware. Please remember that OpenCA can be used on any system which support Apache, mod_ssl, OpenSSL and Perl. So if you have Unix box then it is usually possible to run an OpenCA on it.

  • i386 with Linux, FreeBSD, OpenBSD and NetBSD

  • UltraSparc with Solaris 8 and Linux

  • PowerPC with AIX

2. Configure

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 . 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.

2.1. Host System Configuration

You should define the used system before you start configureing OpenCA itself. OpenCA must know several parameters about your system to work properly.

ParameterDescription
--with-openssl-prefix=DIR

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.

--with-openca-user=ARG 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.
--with-openca-group=ARG 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.

Table 3.2. Supported parameters for host configuration

2.2. Host System Configuration (of the upcoming OpenCA 1.0)

OpenCA needs two sets of user and group. One set is used for stuff which must not be changed by the OpenCA daemon and the other set is used for dynamic stuff.

2.2.1. OpenCA user and group

This is the user which owns all the directories and files which contain statis stuff which must not be changed by the daemon. This user and group is a protection against software bugs and intruders.

The options are --with-openca-user=USERNAME and --with-openca-group=GROUPNAME. The most people use root:nogroup for this. If you have more than one PKI on one system then you should use different users and groups fro different PKIs.

2.2.2. Daemon user and group

The OpenCA daemon should have an own user and group like every daemon but there is a special thing which you must take into account - OpenCA communicates via a Unix file socket. This socket has the permissions 0770. This means that every process which is in the daemon group can write to this socket.

If you use the web interface from OpenCA then you have usually an Apache which sends data to the OpenCA socket. It is not recommended to use the same user for the Apache and the OpenCA daemon. It is recommended to put the Apache into the daemon group. This gives the Apache write access to the socket without having write access to other stuff.

2.3. Filesystem paths

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.

2.3.1. Common Prefixes

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.

2.3.2. Component Prefixes

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.

2.3.3. OpenSSL prefixes (OpenCA 1.0 only)

OpenCA 1.0 requires OpenSSL 0.9.8. There are three ways of installing OpenCA with the correct OpenSSL version. First if you have installed OpenSSL in the default paths of your system then you have nothing to do. Second if you used RPM or DEB then you have nothing to do too because they use pkg-config. Third if you installed OpenSSL manually (e.g. in /usr/local/ssl) the you have to specify the path to this OpenSSL installation. The parameter is --with-openssl-prefix=DIR. The DIR is usually /usr/local/ssl.

2.4. Webserver specific stuff

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 ;-)

2.4.1. Common server informations

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.

2.4.2. Filesystem Paths

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.

2.4.3. URL Paths

OpenCA 0.9.1 supports a lot of options to configure the URLs like the filesystem paths. This is possible with OpenCA 0.9.2 too but it is deprecated to do this with configure. Please read the post-install section. It can happen that these options will be removed from configure.

2.5. Email

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.

2.6. Compiling features

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.

3. Installation

First run make, second run make test and then run the different install commands. make ca and make ext are the same like make You have the following install options for make.

  • 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.

4. config.xml (for RPMs and DEBs too)

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.

4.1. Configuration sections of config.xml

4.1.1. General options

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 . You can replace > by > to but this is not required by the XML specification.

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 ...

4.1.2. web server configuration

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.

4.1.3. ldap server configuration

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.

The following list is identical with the listof the list in the tech guide where you can find more informations about OpenCA's LDAP code and how to configure the details in the configuration files.

useLDAP

If you set this option to "yes" then the LDAP code will be activated.

update_ldap_automatic

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.

ldap_host

This is the hostname of your LDAP server.

ldap_port

This is the port where your LDAP server listens.

ldaproot

The bind DN of the user which OpenCA uses to add data to the server.

ldaprootpwd

The passphrase for OpenCA's ldap account.

4.1.4. database configuration

If you use an OpenCA version before 0.9.3 then you have to decide which database module you want to use. OpenCA 0.9.3+ only supports SQL databases. Earlier versions support DBM files too. OpenCA versions before 0.9.3 supports two modules - one for DBM files and one for SQL databases. DB activates support for DBM files and DBI activates the SQL support.

If you want to use SQL databases then you have to setup some additional parameters:

db_type

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.

db_name

name of the database which OpenCA should use

db_host

host of the database but sometimes the drivers don't need the host.

db_port

same as for host

db_user

the database user for OpenCA

db_passwd

has not to be explained :)

4.1.5. module configuration

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.

4.1.6. configuration of relative paths

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.

4.1.7. configuration of SCEP

SCEP is really simple to configure but please don't forget the access control configuration. It is strongly recommended to restrict the source addresses which can access the SCEP server.

SCEP_RA_KEY

This is the PEM encoded private key of the SCEP interface. It has the same format like for mod_ssl.

SCEP_RA_CERT

This is the PEM encoded certificate of the SCEP interface. It has the same format like for mod_ssl.

SCEP_RA_PASSWD

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.

4.1.8. Dataexchange

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.

4.2. How to setup two management interfaces on one server?

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 online components.

Additonally please remember to set the configure option --with-node-prefix to different names during the configuration of the online and offline installation. This is important because otherwise you have only one management interface.

4.2.1. Online Components

The first installation uses only the normal steps - ./configure --with-node-prefix=online_node --with-your-options, make, make test, 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.

4.2.2. Offline Components

The first step is the protection of the already installed configuration files. Please set no permissions to the later needed configuration files in OPENCADIR/etc/servers.

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-node-prefix=offline_node --with-your-options, make, make test, make install-offline and edit OPENCADIR/etc/config.xml.

The next step is really important you have to edit the file etc/configure_etc.sh. The directory with the serverconfigurations is protected because of the first step but all the other directories should only contain configuration files of the ca. Usually there should be the following directories:

/Test/OpenCA/etc/
/Test/OpenCA/lib/servers/offline_node
/Test/OpenCA/lib/servers/ca
/Test/htdocs/ca
/Test/htdocs/offline_node 

After you fixed the script please run it. Now the offline components are installed and configured.

4.2.3. OPENCADIR/etc/menu.xml

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 offline_node to online_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.

Chapter 4. Configuration

Table of Contents

1. Access Control
1.1. Channel verification
1.2. Login
1.2.1. none
1.2.2. passwd
1.2.2.1. internal database
1.2.2.2. external authentication
1.2.3. x509
1.3. Session management
1.4. ACLs
2. Token and keyconfiguration
2.1. OpenSSL
2.2. Empty
2.3. LunaCA3
2.4. nCipher
2.4.1. Introduction
2.4.2. Implementation
2.4.3. Usage
2.4.4. HSM login shell
2.4.5. OpenCA Configuration
2.4.6. Example for the setup
2.5. OpenSC
3. OpenSSL
3.1. Certificate Extensions
3.1.1. Standard Extensions
3.1.1.1. Authority Key Identifier
3.1.1.2. Subject Key Identifier
3.1.1.3. Key Usage
3.1.1.4. Private Key Usage Period
3.1.1.5. Certificate Policies
3.1.1.6. Policy Mappings
3.1.1.7. Subject Alternative Name
3.1.1.8. Issuer Alternative Name
3.1.1.9. Subject Directory Attributes
3.1.1.10. Basic Constraints
3.1.1.11. Name Constraints
3.1.1.12. Policy Constraints
3.1.1.13. Extended Key Usage
3.1.1.14. CRL Distribution Points
3.1.1.15. Inhibit Any-Policy
3.1.1.16. Freshest CRL
3.1.2. Internet Certificate Extensions
3.1.2.1. Authority Information Access
3.1.2.2. Subject Information Access
3.1.3. Vendor Specific Extensions
3.1.3.1. Microsoft
3.1.3.2. Netscape
3.2. Profiles
3.2.1. HTTPS server
3.2.2. SMTP server
3.2.3. F-Secure VPN+
4. CSRs
4.1. Additional Attributes
4.2. PKCS#10 Requests
4.3. Basic CSR
4.4. SCEP
5. Subject
5.1. Common stuff
5.2. dc style
5.2.1. etc/servers/*.conf
5.2.2. main.html
5.2.3. certsMail.txt and expiringMail.txt
5.2.4. OpenSSL configuration
5.2.5. CA CSR
6. Subject Alternative Name
7. LDAP
7.1. Configuration of the Directory
7.2. Configuration of the online components
7.3. Writing Certificates to the Directory
7.4. Adding an attribute to the LDAP schema
8. SCEP
8.1. OPENCADIR/etc/servers/scep.conf
8.2. OPENCADIR/etc/config.xml
9. Dataexchange
9.1. Configuration
9.1.1. Configuration with simple files
9.1.2. Configuration via scp
9.2. Adding a new node
10. Databases
10.1. PostgreSQL
10.1.1. Basic Setup
10.1.2. Backup
10.1.3. Recovery
10.2. MySQL
10.3. Oracle
10.3.1. Perl database driver and Oracle OCI client libraries
10.3.2. OpenCA Oracle database configuration
10.3.3. Internal Authentication
10.3.4. External Authentication
10.3.5. Database privilege separation for the OpenCA application
10.3.6. Sample Oracle setup
10.4. DBM Files
10.4.1. Backup and Recovery
10.5. SQLite
11. Email
11.1. Sendmail with basic SMTP authentication
12. i18n
12.1. Debian 3.1 Sarge

1. Access Control

Before we begin 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 includes since version 0.9.2 a very powerful access control. The configuration of this access control is completely XML based. The configuration files are placed in OPENCADIR/etc/access_control.The document root element is openca and the complete configuration is placed in the area of the access_control element.

            <openca>
                <access_control>
                    The complete configuration should be here.
                </access_control>
            </openca>
        

The complete system consists of four parts:

  1. channel verification

  2. login

  3. session management

  4. ACLs

Every step is a completely isolated pass except of the second and the third step which are unified in the second pass.

This is an overview about the passes of OpenCA's
                        accesscontrol.

Figure 4.1. Passes of the accesscontrol

If you are looking for a more detailed description then please read the tech guide.

1.1. Channel verification

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.

If you use encrypted connection then you must use ssl as protocol. If you need an unencrypted connection like on the CA for the interfaces ca and ca_node then you must use http as protocol if you use mod_ssl. If you use an Apache without mod_ssl then you must use .* to match all incoming protocols. Please remember to set all the keylengths to 0 because otherwise the access control rejects all incoming connections.

<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> 

Example 4.1. channel configuration

1.2. Login

We implemented three different ways to login to OpenCA:

  • none

  • passwd

  • x509

1.2.1. none

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>
                

1.2.2. passwd

This method can be used to login via login and passphrase. OpenCA supports authentication based on an internal database and based on calling an external program to perform the actual user authentication.

This is login screen of OpenCA if login method
                                is passwd.

Figure 4.2. Passphrase based login

1.2.2.1. internal database

For the 'internal database' method you can specify one or more users. Every user has a name, a role, an algorithm and a digest. The algorithm specify which kind of digest should be used to hash the passphrase. OpenCA supports three algorithms SHA1, MD5 and crypt.

<login>
    <type>passwd</type>
    <database>internal</database>
    <passwd>
        <user>
            <name>root</name>
            <algorithm>sha1</algorithm>
            <digest>3Hbp8MAAbo+RngxRXGbbujmC94U</digest>
            <role>CA Operator</role>
        </user>
        <user>...</user>
        ...
    </passwd>
</login> 

Example 4.2. Login and Passphrase configuration

Before somebody tries to crack this hash the passphrase is root and this is the default passphrase of OpenCA :)

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".

1.2.2.2. external authentication

External authentication can be used to integrate authentication methods that are not natively supported by OpenCA. Essentially this method is a variant of the username/passwort authentiation.

External authentication requires an external program that receives the login credentials that were passed on the login screen via the environment. The external program then must verify if the username/password combination represents a valid login and return an appropriate exit code (0 for success).

The external program should take care of handling the username/password information properly, i. e. it should NOT write this information to files or pass these values to other programs on the command line. The latter is particularly important, as this might open security problems when processing untrusted user input (i. e. the login name or the password). If you must call external programs with this information, please take extra care to tidy the login information of illegal characters (such as quoting special characters). Specification of username or password as command arguments is not directory supported for exactly this reason. Use shell script wrappers that read environment variables instead.

Configuration is straightforward:

In this example configuration two environment variables USERNAME and PASSWORD are set for the external program /usr/local/bin/authdummy. The special strings '__USER__' and '__PASSWORD__' are replaced with the actual user login information within environment value definitions. An arbitrary number of environment variables may be defined in the configuration file.
<login>
    <type>passwd</type>
    <database>externalcommand</database>
        <setenv>
            <option>
                <name>USERNAME</name>
                <value>__USER__</value>
            </option>
            <option>
                <name>PASSWORD</name>
                <value>__PASSWD__</value>
            </option>
        </setenv>
        <command>/usr/local/bin/authdummy</command>
</login> 

Example 4.3. External program authentication configuration

As an example a very simple external authentication program /usr/local/bin/authdummy could (but should not) look like this:

#!/bin/bash
if [ "$USERNAME" = "openca" -a "$PASSWORD" = "rocks" ] ; then
        exit 0
fi
exit 1
		

Again, ALWAYS be sure to check the user input when processing the login data as arguments to external programs, it is easy to open gaping security holes here!

1.2.3. x509

This is perhaps the most advanced method to login. The user must sign it's assigned session ID and the access control verifies the signature. The login name is the serial of the certificate because it is the only unique item in a certificate. The configuration is really simple. You have to set the position of the CA chain and that's all.

<login
    <type>x509</type>
    <chain>OPENCADIR/var/crypto/chain</chain>
</login> 

Example 4.4. Authentication with certificates

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.

1.3. Session management

The session management is today really simple to configure because we only support one method to manage a session and the only real variable is the lifetime of a cookie after the last action. The lifetime must be value which will be accepted by CGI::Session. The directory contains the management informations for the cookies (like the name of the user).

<session>
    <type>cookie</type>
    <directory>@var_prefix@/session/cookie</directory>
    <lifetime>1000</lifetime>
<session> 

Example 4.5. Session configuration

1.4. ACLs

The basic configuration of OpenCA's access control list is placed in OPENCADIR/etc/access_control/*.xml. The relevant datastructure is like follows:

<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> 

Example 4.6. Basic ACL configuration

Following you can find the meanings of the elements:

acl

enable (yes) or disable (no) the access control list - please notice that a deactivated ACL means that every user has full access to ALL OpenCA functions

list

defines the place of the ACL

command_dir

specify the directory which contains the configuration files of the scripts

module_id

This is the id of the interface. This id is unique for every interface.

ca_cert

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.

map_role

enable (yes) or disable (no) the mapping from certificates to roles if the certificate of the user is known. If the role is defined during passphrase based login then this option causes the use of the specified role and not the login name.

map_operation

enable (yes) or disable (no) the mapping from the names of the scripts to the supplied operation

You should check the access control list itself very carefully after you initialized the basic configuration of the interface. The real access control list is embedded into the access control area and has the following format:

<acl>
    <permission>
        <module>0<</module>
        <role>root<</root>
        <operation>serverInfo</operation>
        <owner></owner>
    </permission>
    <permission>...</permission>
    ...
</acl> 

Example 4.7. Permission for serverInfo

The meanings of the elements are the following ones:

permission

every access right is defined in a permission element

module

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.

role

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.

operation

is the name of the script if map_operation is no and the operation of the script if map_role is yes.

owner

is the role of the object which will be automatically detected by the configuration of the script

All options can be used with regular expressions but of course the parameters are case sensitive. An ACL which allows anything and only requires a valid login looks like this:

<acl>
    <permission>
        <module>.*</module>
        <role>.*</role>
        <operation>.*</operation>
        <owner>.*</owner>
    </permission>
</acl> 

Example 4.8. Allow all

Every command or script has it's own configuration file which contains the name of the command (this is actually a protection against the renaming of files), the name of the operation for which it is used, the way how to find the affected object and the name of the variable which contains the data which is necessary to determine the object by the specified way. Today there are six OWNER_METHODs:

CERTIFICATE_SERIAL

This method is used if an operation affects a certificate and the role should be detected by the serial of the certificate.

REQUEST_SERIAL

This method is used if an operation affects a CSR and the role should be detected by the serial of the CSR.

CRR_SERIAL

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.

CGI

The use of this method is not recommended because the role is not protected by any cryptographic mechanisms.

ANY

The operator must have the right to perform this operation for every role.

<empty>

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”.

2. Token and keyconfiguration

OpenCA has a concept which abstracts every key. Every key is a token and be putted into a slot. This mean that the software can ask the cryptolayer for a token ca and the cryptolayer checks it's configuration for a token called ca.

Here you can see a schemtaic overview about the concept
                        of the tokens.

Figure 4.3. Tokenconcept

Now we will explain the token configuration because this is the most interesting thing for an administrator. The basic schema is the following one:

<openca>
    <token_config>
        <default_token>CA</default_token>
        <token>...</token>
        ...
    </token_config>
</openca>
        

Every token configuration includes some common parts which will be described here. The names of the options are tag names!

name

which will be used by the software for the token. There are four names today - CA, BP (batch processors), KEYBACKUP and LOG.

type

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.

mode

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.

login_sheet

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.

We will describe now the configuration of different token types.

2.1. OpenSSL

OpenSSL only support the operational mode standby. Additionaly it support several other dynamic options which are required to work properly.

SHELL

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.

KEY

filename of the file with the private key

PASSWD_PARTS

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.

PEM_CERT

path to the PEM formatted certificate

DER_CERT

path to the DER formatted certificate

TXT_CERT

path to the TXT formatted certificate - this is only important for the CA token.

CHAIN

directory which includes the certification path - this is not only important for the CA because the chain is sometimes included into signatures.

2.2. Empty

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.

2.3. LunaCA3

This token accepts all the options like OpenSSL tokens except of PASSWD_PARTS because Chrysalis-ITS Luna CA3 uses hardware (PIN pad) for login to prevent electronic reconnaisance actions. Luna CA3 supports all operational modes (standby, session and daemon. This module requires some additional options:

UTILITY

Luna CA3 comes with a utility to manage things like login and keygeneration. You have to enter the complete path here.

SLOT

This is an ID for the slot of the token.

APPID

This is the application ID to avoid conflicts with other application. Please remeber that the APPID must be lesser than the SLOT.

LOCK_FILE

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.

2.4. nCipher

2.4.1. Introduction

This module provides basic support for nCipher HSM tokens and was tested with the following configuration:

  • SuSE Linux 8.1 and SLES 8

  • nCipher software

    • hwsp: 0.0.24cam37, 0.0.34cam7

    • hwcrhk: 1.9.0cam27, 1.9.7cam24

    • ctls: 0.0.24cam12, 0.0.32cam27

  • nCipher Modules verified (others may work)

    • nShield F3 SCSI module (nC3031S)

    • nShield F2 PCI module (nC1002P/nC3022P)

    • nShield F2 SCSI module (nC4022W)

The current status is considered to be stable.

Features:

  • Uses nCipher hwcrhk application and 'with-nfast' wrapper to perform nShield private key operations. Works with OpenSSL static and dynamic engine support (automatic detection from configuration).

  • Detects a number of problems and error conditions:

    • Middleware not running/operational (HSM online test)

    • Private key not available (key online test)

Current limitations:

  • Key generation is not supported (and will probably never be)

  • PIN entry is not supported

2.4.2. Implementation

The module was derived from OpenCA::Token::OpenSSL and other existing token implementations.

All external program calls are subject to a hard timeout that is initially set to 15 seconds. This value can be configured by setting CHECKCMDTIMEOUT to the desired value in the token configuration file.

If an external program does not terminate within a certain timeout, it is killed by SIGALRM and the method fails with a timeout error (7151015). This was introduced in order to handle hanging nCipher utility processes after e. g. switching of an external SCSI HSM.

genKey() - This method is administratively disabled and always returns the error code 7154001.

online() - The online test performs the following tests:

  • Run 'enquiry' and check return code and program output

    • verify that the nCipher server daemon is operational

    • verify that at least one nCipher module is operational

The method returns true without calling external checks if the module accessibility was checked within the last 60 seconds. This value can be configured by setting the variable ONLINECHECKGRACEPERIOD to the desired value in the token config file.

keyOnline() - The following tests are performed in order to determine the key online status:
  • Run 'nfkminfo' with the WRAPPER command (usually 'with-nfast -M') and check return code and output.

    • verify Security World status (must be initialized and usable)

    • verify that at least one object is preloaded

    • get object hash for private key to be used and verify it against the list of preloaded objects

2.4.3. Usage

The module requires a properly set up nCipher "Security World" including a private key to operate. Key generation is not supported by the module (as it really does not make much sense for a HSM based CA).

See Section 2.4.6, “Example for the setup” for an example.

In order to use the HSM protected key, log in into the CA computer and run /opt/nfast/bin/with-nfast pause in a shell.

You will be prompted to insert as many Operator Cards and input their corresponding PINs as required by the Operator Card Set Quorum.

As long as 'with-nfast' is not interrupted and the last Operator Card is not removed, any application with the proper Unix permissions may use the keys protected by the Operator Card Set.

To log out from the module it is recommended to terminate the with-nfast program (pulling the SmartCard works, too, but is not recommended, because it leaves the program waiting).

2.4.4. HSM login shell

A simple login mechanism can be implemented using a special HSM login user. The user must have write access to the file /opt/nfast/kmdata/preload/default. For example create a user 'hsmlogin' with primary group 'kmdata'.

Change ownership and permissions of directory /opt/nfast/kmdata/preload so that 'hsmlogin' can enter ("execute") this directory.

Change ownership and permissions of the file /opt/nfast/kmdata/preload/default so that 'hsmlogin' can write to this file and that the www user running the ca CGI script can read it.

Create a login wrapper shell script /usr/local/bin/hsmlogin and assign this as login shell to the 'hsmlogin' user:

#!bin/sh
exec /opt/nfast/bin/with-nfast pause
	

Login as hsmlogin in order to login into the HSM, use Ctrl-C to logout.

2.4.5. OpenCA Configuration

The key name should be the same as reported by /opt/nfast/bin/nfkminfo -k. This configuration reflects the use of OpenSSL static engine support. In order to use dynamic engine (e. g. when using OpenSSL 0.9.8), it is necessary to specify the location of the dynamic engine nCipher shared library in the token configuration:

            <option>
                <name>PRE_ENGINE</name>
                <value>SO_PATH:/usr/local/openssl-snap/lib/engines/libncipher.so</value>
            </option>
	  

Be sure to specify the correct location of the dynamic engine lib for the OpenSSL binary specified with the SHELL setting.

If at least one PRE_ENGINE setting is specified, the nCipher token module will automatically switch to dynamic engine semantics when talking to the OpenSSL backend. Definition of SO_PATH is the only mandatory setting in this case, and the following default PRE_ENGINE settings are automatically added (unless explicitly specified in the token configuration file):

  • ID:chil

  • LIST_ADD:1

  • LOAD

  • THREAD_LOCKING:1

2.4.6. Example for the setup

Example for creation of a Security World, Operator Cards and CA key.

Assumptions:

  • example uses a 2 of 3 quorum ("2/3") for Adminstrator Cards and Operator Cards

  • the Operator Card set protecting the CA key will be named "RootCA"

  • the CA key will be named "rootkey" in this process

Sample Root Key ceremony:

  1. initialize security world

    • switch HSM to 'initialize' mode

    • reset the module: /opt/nfast/bin/nopclearfail -c -m 1

    • /opt/nfast/bin/newworld --initialize --acs-quorum 2/3

    • switch HSM to 'operational' mode

    • reset the module: /opt/nfast/bin/nopclearfail -c -m 1

  2. verify that the security world has been created

    • /opt/nfast/bin/nfkminfo

  3. optionally: erase cards

    • /opt/nfast/bin/bulkerase -m 1 -s 0

  4. initialize Root CA operator card set

    • /opt/nfast/bin/createocs --name=RootCA --ocs-quorum=2/3 -m 1 -s 0

  5. verify that the operator card set has been created

    • /opt/nfast/bin/nfkminfo -c

  6. create Root CA key

    • /opt/nfast/bin/generatekey2 --cardset=RootCA hwcrhk (example values: token, 0, RootCA, yes, RSA, 2048, 0, "", rootkey, no)

  7. verify that the root key has been created

    • /opt/nfast/bin/nfkminfo -k

2.5. OpenSC

This token accepts all the options like OpenSSL tokens but soem options has another meaning. The token only operates in mode standby. Other modes are not supported by OpenSC today. The available options have the following meanings (please notice that we only report OpenSSL options if there meaning differ from the original OpenSSL module):

KEY

The KEY is a combination of the slot and the ID of the key on the card. This can differ for other PKCS#11 modules than OpenSC. If you use this class with another PKCS#11 than the one from OpenSC then please read the docs of the vendor. The syntax is slot_[0-9]+-id_[0-9]+. A typical example is slot_0-id_45.

ENGINE

The value should be always pkcs11 here. This defines that the OpenSSL dynamic engine pkcs11 should be used. The module is only tested with this module.

PRE_ENGINE

These options are used to configure the PKCS#11 engine which is loaded to OpenSSL. SO_PATH is the path of the used OpenSSL engine. ID is the used OpenSSL engine ID. MODULE_PATH is the path to the used PKCS#11 driver. Please notice that we put the complete and partially internal configuration into this parameter. The reason is that we don't want to reduce the flexibility because we don't know the future direction of the OpenSSL engine interface and the OpenSC PKCS#11 engine for OpenSSL.

CARDDRIVER

This is the name of the OpenSC carddriver. This option is only necessary if you want to create the key with OpenCA.

CARDREADER

This is the number of the OpenSC carddriver. This option is only necessary if you want to create the key with OpenCA. (It is identical with the slotnumber.)

PKCS15_INIT

The path to the command pkcs15-init.

PKCS15_TOOL

The path to the command pkcs15-tool.

OPENSC_TOOL

The path to the command opensc-tool.

Note

If you get performance problems with an OpenSC engine what is normal because smartcards are not fast then please configure another default token than the CA token. You can create a new token in token.xml with a freely choosable name.

3. OpenSSL

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.

3.1. Certificate Extensions

3.1.1. Standard Extensions

3.1.1.1. Authority Key Identifier

[[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.

The value should look like this:

authorityKeyIdentifier=keyid,issuer:always

Example 4.11. OpenSSL configuration - Authority Key Identifier

Never mark this extension as critical.

3.1.1.2. Subject Key Identifier

3.1.1.3. Key Usage

3.1.1.4. Private Key Usage Period

3.1.1.5. Certificate Policies

3.1.1.6. Policy Mappings

3.1.1.7. Subject Alternative Name

3.1.1.8. Issuer Alternative Name

3.1.1.9. Subject Directory Attributes

3.1.1.10. Basic Constraints

3.1.1.11. Name Constraints

3.1.1.12. Policy Constraints

3.1.1.13. Extended Key Usage

3.1.1.14. CRL Distribution Points

3.1.1.15. Inhibit Any-Policy

3.1.1.16. Freshest CRL

3.1.2. Internet Certificate Extensions

3.1.2.1. Authority Information Access

3.1.2.2. Subject Information Access

3.1.3. Vendor Specific Extensions

3.1.3.1. Microsoft

3.1.3.2. Netscape

3.2. Profiles

3.2.1. HTTPS server

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.

3.2.2. SMTP server

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.

SSL Client requires the following extensions:

keyUsage = digitalSignature
extendedKeyUsage = clientAuth
nsCertType = client

Example 4.12. Minimal SSL client extensions

SSL Server requires the following extensions:

keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth, msSGC, nsSGC
nsCertType = server

Example 4.13. Minimal SSL server extensions

msSGC and nsSGC mean Server Gated Crypto from Microsoft and Netscape.

If you want to configure only one certificate per SMTP server then you have to issue certificates which looks like a christmas tree. They have to include all extensions for clients and servers. A configuration can look like this:

keyUsage = digitalSignature, keyEncipherment
extendedKeyUsage = clientAuth, serverAuth, msSGC, nsSGC
nsCertType = client, server

Example 4.14. Minimal SMTP extensions for a single certificate

3.2.3. F-Secure VPN+

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.

4. CSRs

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.

4.1. Additional Attributes

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.

After you know what a nice feature these attributes are you want to customize them? No problem. A simple example should help:

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" 

Example 4.15. Additional attributes configuration

The three options have the following meanings:

ParameterDescription
ADDITIONAL_REQUEST_ATTRIBUTES These are the internal names for the attributes.
ADDITIONAL_ATTRIBUTES_DISPLAY_VALUE 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.
ADDITIONAL_REQUEST_ATTRIBUTES_STRING_TYPE This helps the software with the errordetection. You can use the following values:
  • LETTERS

  • TEXT

  • NUMERIC

  • MIXED

  • DATE

  • TEL

  • EMAIL

  • LATIN1_LETTERS

  • LATIN1

Table 4.1. Additional attributes configuration

4.2. PKCS#10 Requests

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.

If the administrator has the PKCS#10 request then he must bring the request to the trustcenter and this is the job of command which's configuration we describe here. The option DN_TYPE_PKCS10_REQUIRED_ELEMENTS define the structure of the subject of the PKCS#10 request. The option DN_TYPE_PKCS10_BASE and the values of DN_TYPE_PKCS10_BASE_* define the suffix for the certificates which will be accepted by this interface. The restrictions were implemented to get some kind of useful subjects.

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.16. PKCS#10 configuration

4.3. Basic CSR

If you have no prepared PKCS#10 request then there is a second method in OpenCA. This method is used if the key and request generation happen during the interaction with the client. OpenCA support clientside keygeneration for Microsoft Internet Explorer, Netscape Communicator, Mozilla and Opera. If you have another browser then OpenCA uses it's serverside key and requestgeneration. So let's start with an example:

    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" 

Example 4.17. Basic CSR configuration

The first line defines the available keysize. The next variable DN_TYPES defines the available configurations of basic_csr. The command basic_csr is called via a link and the link must contain an option CSR_TYPE which defines the configuration which is used for this CSR. If you don't set this option then basic_csr starts it's browserdetection.

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.

The ELEMENTS are the part of subject which can be defined by the user. The defined attributes of the subject can be configured more precisely by the options named *_ELEMENT_number*. They have the following meaning:

ParameterDescription
*_ELEMENT_number 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.
*_ELEMENT_number_MINIMUM_LENGTH This field defines what the minimum length of the value is. If you don't know it then simply use 0.
*_ELEMENT_number_REQUIRED 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.
*_ELEMENT_number_SELECT 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.
*_ELEMENT_number_XML_FILE 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.
*_ELEMENT_number_XML_PATH If you specified an XML file then you have to specify the XPath to this list too. The XPath for the following example is “basic_csr/basic/element_3/option”:

<openca>
    <basic_csr>
       <basic>
           <element_3>
               <option>Computer staff</option>
               <option>Management</option>
               ...
           </element_3>
       </basic>
    </basic_csr>
</openca> 

Example 4.18. Configuration example for a XML file based HTML-select

Table 4.2. Generic basic CSR configuration

4.4. SCEP

OpenCA supports SCEP for sending requests but we define no rules for such requests because the clients are not able to interact with an interface and so we accept every request which arrives.

5. Subject

5.1. Common stuff

OpenCA displays at every time DNs like defined by RFC 2253. There are five options which influence the subject during the issuing itself:

ParameterDescription
SET_REQUEST_SERIAL_IN_DN 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.
REQUEST_SERIAL_NAME If the serial of the request will be included then this option defines which attribute is used for the serial.
SET_CERTIFICATE_SERIAL_IN_DN 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.
CERTIFICATE_SERIAL_NAME If the serial of the certificate will be included then this option defines which attribute is used for the serial.
DN_WITHOUT_EMAIL 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.

Table 4.3. Common stuff configuration

5.2. dc style

OpenCA uses by default the old “o=University,c=de” style. Several users like international companies, universities or other big organizations need the new dc style. Therefore we support the dc style too. It is necessary to change several files because the configuration of the subjects is highly integrated into the software. We will explain it with an example.

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 five things which you have to check for the change to the dc style. The steps will be now described:

5.2.1. etc/servers/*.conf

There are two things which must be changed in the configuration files of the servers.

The LDAP configuration must be adapted to the new dc-style. The variables - which you must modify - are basedn and ldaproot. The basedn is the suffix of the LDAP server. The ldaproot is the dn of the user root to bind to the LDAP server. The ldaproot has not to be changed because it is freely configurable by the administrator of the LDAP server.

basedn "dc=university,dc=edu"
ldaproot "dc=manager,dc=univesity,dc=edu"
               

The configuration of the requests must be changed too because they are prepared for the old style. Please read the following example to get an overview of a dc-styled configuration. Please read the section about the CSR configuration to understand how the normal requests can be configured.

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"
                

5.2.2. main.html

Please check the installed or prepared files with the name main.html because several HTML files display the suffix of all the DNs.

5.2.3. certsMail.txt and expiringMail.txt

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.

5.2.4. OpenSSL configuration

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.

5.2.5. CA CSR

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.

6. Subject Alternative Name

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.

7. LDAP

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 Online components can write certificates and CRLs to the directory you must have an LDAP compliant directory installed and available to the online components (this can be on the same or different machine). One example of an appropriate directory is the OpenLDAP project.

7.1. Configuration of the Directory

A full description of the configuration of your LDAP directory is outside the scope of this document. Important points to note are:

  • Ensure that the following schemas are included (probably in the slapd.conf file):

    • core.schema

    • cosine.schema

    • inetorgperson.schema

    • openca.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.

7.2. Configuration of the online components

Three configuration files must be configured for the online components to make use of the LDAP directory to store certificates; OPENCADIR/etc/servers/node.conf, OPENCADIR/etc/servers/ldap.conf and OPENCADIR/etc/ldap.xml. Usually it is enough to set the correct options in ldap.xml or in config.xml.

The configuration is splitted into two parts - a OpenCA related part and a LDAP related part. The OpenCA related part consists only of four options - the LDAP activation, automatic LDAP updates during imports and distinguished name manipulations for CA objects like CA certificates and CRLs. These options can be configured in the interface configurations in OPENCADIR/etc/servers/.

Supported options in interface configurations

LDAP

If you set this option to "yes" then the LDAP code will be activated.

updateLDAPautomatic

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.

LDAP_CRL_Issuer

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.

LDAP_CA_DN

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.

The LDAP related part of the configuration can be found in OPENCADIR/etc/ldap.xml. This central configuration file avoids double configurations which can produce many errors and confusion because you are sure that you changed it but you only did it for one interface. The isolated configration allows better names for the configuration options too.

host

This is the hostname of your LDAP server.

port

This is the port where your LDAP server listens.

suffix/dn

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). Every suffix must be placed in a seperate dn tag. The suffix tag is the bracket for all those suffixes.

login

The bind DN of the user which OpenCA uses to add data to the server.

passwd

The passphrase for OpenCA's ldap account.

protocol_version

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.

tls

Use no or yes to deactivate or activate TLS. Please remember that this option only works with LDAP v3.

sasl

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.

excluded_roles/role

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.

7.3. Writing Certificates to the Directory

As long as the option updateLDAPautomatic is set to yes the online components 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.

7.4. Adding an attribute to the LDAP schema

The common situation in large directory projects is a big schema and at the end a small request for certificate integration. This is usually no problem if OpenCA has to create and add certificates to an existent and filled LDAP server. OpenCA gets a problem if you want that OpenCA initialize this LDAP server and should create all missing nodes in the directory tree. If this is the case then you must integrate your schema specification into OpenCA's ldap configuration. You can find this schema specification in ldpa.xml. The path to the schema specification is openca/ldap/schema.

First you have to understand the general design of OpenCA's LDAP schema support. We have a very pragmatical idea of directory trees because it is not possible to handle all full featured ideas. We simply use the least significant attribute to select an appropriate schema definition for a distinguished name. Do you want to know what this mean? If you have a RFC 2253 conform distinguished name then you take the RDN on the left side. The used attribute type is used to detect the appropriate schema.

Before you can select a schema with the atribute type you must know what you want to create for a node in the directory tree. If the used distinguished name is the complete subject of a certificate then you must select the schema specification from the XML path openca/ldap/schema/certificate. Otherwise you you have to use openca/ldap/schema/default. If you need to store a CA certificate then you must specify the schema in openca/ldap/schema/ca.

Every RDN entry in the described sections specifies the characteristics for one attributetype. This include things like required (must) or optional (may) attributes and used objectclasses (structural and auxiliary). If you have for example a new attributetype uid_special and a new class MY_CLASS then your RDN section for certificates with this attributetype as last one should looks like this.

OpenCA's schema definition is perhaps not so flexible as you need but we are open for new ideas. Be free to mail us your ideas. If they are not too proprietary then perhaps we can integrate them :)

8. SCEP

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.

Note

Cisco only supports CA and end entity certificates with a keysize lower or equal 2048 bits. This means that the keysize of your CA certificate cannot exceed 2048 bits if you want to use Cisco equipment.

8.1. OPENCADIR/etc/servers/scep.conf

This file contains the followin parameters:

ScepRAKey

This is the PEM encoded private key of the SCEP interface. It has the same format like for mod_ssl.

ScepRACert

This is the PEM encoded certificate of the SCEP interface. It has the same format like for mod_ssl.

ScepRAPasswd

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.

ScepAllowEnrollment

Policy definition, if set to "NO" the SCEP server will not accept requests for certificate DNs that do not exist yet. Set this value to "YES" to allow initial enrollment of new systems.

ScepAllowRenewal

Policy definition, if set to "YES" the SCEP server will allow renewal requests for existing certificates. A renewal request will not be accepted if two or more valid certificate with the same DN already exist. If set to "NO" the server will reject SCEP requests for DNs that already exist in at least one valid certificate.

ScepRenewalRDNMatch

String containing a comma separated concatenation of all RDNs to consider for matching the incoming request DN against existing valid certificate DNs. The reason for this setting is that some SCEP clients have problems generating request DNs that conform to the CA conventions. By specifying which RDNs to consider from the incoming request, it is possible to address these problems by ignoring unwanted RDNs. At least the CN should be included here. If your CNs are not unique across your name space, you should add other RDNs to create a unique reference, in most cases this would be "O", "OU" or "DC".

ScepDefaultRole

When initially enrolling a new system, this option specifies the initial certificate role to use for the new request. For renewals (at least one certificate with the same request DN already exists) the certificate role from the youngest existing predecessor is used for the new request.

ScepDefaultRA

When initially enrolling a new system, this option specifies the Registration Authority to use for the new request. For renewals (at least one certificate with the same request DN already exists) the RA setting from the youngest existing predecessor is used for the new request.

ScepAutoApprove

Newer SCEP drafts allow signing the SCEP request with a previously existing key. If a renewal request is received (this means that a valid certificate with the request DN must already exist in the database) the digital signature of this request is verified against the local CA. If the signature is valid and if the request DN is identical to the signer DN then the new request is automatically set to the 'APPROVED' status in the database. The client must explicitly support this feature by using the old certicate and private key. As the feature was introduced in later SCEP drafts, not many SCEP clients allow for automatic approval. Newer versions of sscep will support this feature, however. (Please note that the client system certificate may not have the correct key usage for digitally signing a request. The SCEP draft specifically allows the violation of the key usage, and hence OpenCA's SCEP server ignores errors about incorrect key usage when verifying the signature.)

8.2. OPENCADIR/etc/config.xml

This file contains the followin parameters:

SCEP_RA_KEY

This is the PEM encoded private key of the SCEP interface. It has the same format like for mod_ssl.

SCEP_RA_CERT

This is the PEM encoded certificate of the SCEP interface. It has the same format like for mod_ssl.

SCEP_RA_PASSWD

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.

9. Dataexchange

9.1. Configuration

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.

The following example is for the import from a higher level of the hierarchy:

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.22. Download configuration

The export/import technology itself is another important aspect. You can configure OpenCA to use different methods for the dataexchange with higher and lower levels of the hierarchy. Therefore we implemented options to prepare and cleanup IO operations. This is necessary if you have to start special networkinterfaces or to mount devices. There are also options to configure the EXPORT and IMPORT of the directory with the data and there is an option to TEST the result. EXPORT, IMPORT, START and STOP accept more then one argument. Every argument will be seperately executed. The parameters @__SRC__@ and @__DEST__@ include the directories with the data. The parameter @__DEVICE__@ will be replaced with the value of DEVICE.

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.23. Export configuration

The hierarchylevel LOCAL is used for backups, batchprocessors and such things. It is also possible to configure OpenCA for the use with temporary private networks. Here is another example for a CA:

    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 ""

Example 4.24. Local export configuration

9.1.1. Configuration with simple files

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.

9.1.2. Configuration via scp

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.

The RA exports resp. imports from a file located on the system it is installed on (same as local datatransfer). Thus the RA configuration is the same as for the local dataexchange:

  • 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).

To use scp you must have a working openssh environment with an ssh client on the CA side and an ssh server on the RA side. On the CA side determine the apache home directory by looking at the etc/passwd file (in redhat 8 and 9 this is /var/ww). Do the following:

Now go back to the CA side to edit the files ca.conf and ca_node.conf. The ca_node.conf file already contains a sample scp datexchange section. Comment out the dataexchange section used for local datexchange. Uncomment the scp part and edit it:

  • 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).

9.2. Adding a new node

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.

10. Databases

10.1. PostgreSQL

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. 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.

10.1.1. Basic Setup

After the installation of PostgreSQL there is usually a use postgres. Please use su - postgres to use this identity. After this step you should login into the database with psql. This is possible because the database template1 is always present on new databaseservers. The first real step is the creation of the user openca with create user. After this you logout and login again as the newly created user. Now you create the database openca. After this the database itself is ready for use but you should make the database a little bit more secure. Sometimes the database is already secure then you have problems to issue the psql commands. Please edit the pg_hba.conf first to get the access permissions for the openca user.

You can restrict the database via PosgrSQL's own configuration. The directory /etc/postgres contains usually a file pg_hba.conf which controls the access to the database. There should only be one entry which looks like follows:

This configuration restricts the access to the PostgreSQL database to the database openca via users from localhost. Nobodyelse can access the database now. Please remove all the other access rights - especially the lines which use IP-based trust settings. After the configuration you must restart PostgreSQL. The tables can be created with OpenCA's web interfaces.

Please ensure that the PostgreSQL server is connected to the network. Usually the TCP/IP socket is deactivated.

Sometimes the command of PostgreSQL changes. So please try to run the command \h in psql to see a list of the actual available commands.

10.1.2. Backup

PostgreSQL maintains three programs to dump a database - pg_dump, pg_dumpall and pg_dumplo. We describe pg_dump here because we don't like to backup all other databases and we don't like ot backup large objects only. The following options are used:

  • 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

10.1.3. Recovery

If we have different backup methods then we have different recovery procedures too. The main difference is that we can use the plain text export directly with psql to import the database. This is possible because this file only includes pure SQL statement. The PostgreSQL specific exports must be processed with pg_restore because they include support for BLOBs too. There is only one command for both PostgreSQL formats because pg_restore detects the used format automatically.

10.2. MySQL

Until now nobody created a howto for MySQL.

Note

If you use a version of MySQL prior 4.1 then you can see perhaps an error message which reports a syntax error because of an unkown internal variable NAMES. You can ignore this error message or better you should use a newer version of MySQL.

The background is the internationalization of OpenCA. We support several different character encodings. MySQL can only handle by default the character encoding which is specified for the table during configuration. The solution is the internal variable NAMES which was introduced in the SQL92 standard. This variable can be used to set the actual character encoding. MySQL supports this variable beginning with MySQL 4.1. It is recommended to use at minimum 4.1.1 because of a rewrite of this stuff in MySQL.

10.3. Oracle

Oracle is supported by OpenCA via the standard Perl DBD Driver. However, there are some special considerations concerning system setup, configuration and security.

10.3.1. Perl database driver and Oracle OCI client libraries

Oracle databases are accessed via the Perl DBD::Oracle module which uses Oracle OCI client libraries to access database services. Both must be installed on the system.

If the location of the Oracle OCI client shared library is incorrectly configured the OpenCA daemon will not start up properly.

As a consequence, the OpenCA application must be able to locate the Oracle shared library libclntsh.so. Because the client library is usually not installed in a standard library path but rather below the Oracle home directory, the explicit location of this library must usually be configured on the system:

  • Explicitly set the directory location of libclntsh.so in environment variable LD_LIBRARY_PATH for the OpenCA daemon. To do so you could for example write a wrapper script that calls etc/openca_start or include the environment setting in the openca_start script itself.

  • Change the dynamic linker configuration by adding the required directory location to the config file (/etc/ld.so.conf on a Linux system). You will have to ensure that the dynamic linker configuration is updated (Linux: run the ldconfig command).

10.3.2. OpenCA Oracle database configuration

Note

The parameters db_host and db_port are completely ignored for Oracle databases, make sure to leave them empty in order to avoid confusion.

In config.xml set the db_type to 'Oracle'. The db_name, db_user, db_passwd and db_namespace variables may or may not be set according to your configuration (see below).

The Oracle client library requires some environment variables that must be set. As a minimum, the ORACLE_HOME variable must be set. This can be done via the etc/database/DBI.conf configuration file or by sourcing the oraenv file that should have been set up for your Oracle instance by your Oracle DBA.

Depending on your setup it may be useful to source the ora_env file in the OpenCA rc start script like in the following example. In this case, usually no environment variables need to be set up in the DBI.conf file.

10.3.3. Internal Authentication

Internal authentication is the classic authentication method and is also the easiest to configure. It is similiar to the methods used for the other database types and requires the explicit configuration of a database user, a password and a database name. The disadvantage, however, is the need to configure the database password in the configuration file which is not always desired. If this is an issue, consider the external authentication method discussed below.

The db_user and db_passwd parameters must be set to the correct username and password values for the OpenCA database. These are identical to the parameters specified in the CREATE USER user IDENTIFIED BY "password"; command that is used to create the user in the Oracle database.

The db_name parameter must be set to the database name configured in the TNSNAMES.ORA configuration file. As it is possible to specify aliases in this file, this may also point to an alias name of the database. In order to verify if your db_name is set correctly run the command tnsping with the db_name parameter as its only argument. The command must be run with the same environment variables that are set for the OpenCA daemon.

If the tnsping command above fails then the database setup is incorrect and must be fixed. Debugging this error is beyond the scope of this document, as there are lots of possible error causes.

If privilege separation should be used (see below) then the db_namespace parameter must be set to the name of the database user owning the OpenCA schema.

10.3.4. External Authentication

Internal authentication is easy to configure but has the significant drawback of requiring a cleartext password for the database user in the configuration file.

External authentiation grants a Unix user access to the database without the need of a password.

This authentication type usually only works for databases running on the local machine. Although it is possible to configure external authentication for remote machines this is not recommended due to security reasons.

In order to set up an Oracle user for external authentication for the Unix user 'wwwdata' use the following Oracle command (the string 'OPS$' must be prefixed to the Unix user name): CREATE USER OPS$WWWDATA IDENTIFIED EXTERNALLY; After the required permissions (e. g. CREATE SESSION) are granted to the user you can test this by trying to access the database using sqlplus / as the user wwwdata. Make sure that the environment (in particular the ORACLE_SID environment variable) is set up properly for this user. The database monitor should now start without a password prompt.

To make this work with your OpenCA setup you must use the Unix user name that is configured as daemon_user (or httpd_user for OpenCA 0.9.2.x and earlier) in your etc/openca_start startup file.

Assuming the 'OPS$...' user has been created and the database schema is already set up properly, the database configuration for OpenCA must be completed.

Note

For external authentication the following configuration settings are required: db_user MUST be set to / (a single slash), db_passwd MUST be empty and db_name MUST be empty. In addition, the environment variable ORACLE_SID MUST be set properly.

10.3.5. Database privilege separation for the OpenCA application

The db_namespace parameter allows to specify tables that are owned by another database user. This makes it possible to create the OpenCA database scheme with one user (let's call it the schema owner) and let the OpenCA application access the tables owned by this user as another user (called the schema user). In this case the db_user parameter must be set to the unprivileged schema user and the db_namespace parameter must contain the schema owner name.

10.3.6. Sample Oracle setup

This example describes an example setup using Oracle external authentication, privilege separation and script based database setup. When used this way, the database is prepared by the setup script and NOT via the web frontend (CA/Initialization...).

10.4. DBM Files

Warning

DBM files are only supported in OpenCA version prior to version 0.9.3.

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.

10.4.1. Backup and Recovery

The advantage of DBM files is the use of plain files. You can simply use tar to backup and recover this database.

10.5. SQLite

Warning

SQLite is only supported in OpenCA versions after 0.9.2. The 0.9.2.x series does not support SQLite.

We replaced DBM files with SQLite. the background is simple. Both databases work out of the box without user configuration but SQLite has full SQL support. Please note that SQLite only allows one open transaction which write on the database. So SQLite is a database for a single user system. This means that you should only use it for offline machines (e.g. CA) or in test environments. Please never use it for online user interfaces.

The installation is quite simple. You have only to install DBD::SQLite. The Perl database driver includes the complete database software.

11. Email

11.1. Sendmail with basic SMTP authentication

The following example shows how to configure sendmail to send mails via a mailserver which requires a login. This basic authentication is today very common to protect the mailservices especially of big providers against spammers. The example was developed and tested with Microsoft Exchange but it should work with any other mailserver (e.g. sendmail or postfix).

12. i18n

Warning

Please note that this section applies only to OpenCA 1.0+.

If you want to use all of OpenCA locales which you can see in the submenu language then your server must support all of these locales. Nearly every OS has a different way of installing the locales. We list here only the OS where we know from some problems.

Before you start please ensure that there is no language environment if you start the server. We erase LANGUAGE from the environemnt but if your libc finds a language environment then the library ignores our setlocale commands and use the specified locale from the environment. This is a nice feature for client applications but a small horror for servers.

12.1. Debian 3.1 Sarge

Debian set the variable LANGUAGE by default. Sometimes this variable has some funny content (e.g. en_DE). OpenCA erases this variable automatically but it is a good idea to do it by yourself before you start the daemon.

If your OpenCA does not show some translated languages and fall back to other languages then you must activate the language on your machine. This is quite simple. You must run dpkg-reconfigure locales and select all necessary languages with UTF-8 encoding. OpenCA enforces the usage of UTF-8. We do not support other proprietary encodings.

User Guide

Table of Contents

Preface
5. Features
1. 0.10
2. 0.9.2
6. Interface Descriptions
1. Public PKI Server
1.1. General
1.1.1. Logout
1.2. CA Infos
1.2.1. Policy
1.2.2. Get CA Certificate
1.2.3. Certificate Revocation Lists
1.3. User
1.3.1. Request a certificate
1.3.1.1. Request a certificate with automatic browser detection
1.3.1.2. Basic Request
1.3.1.3. Netscape's Request
1.3.1.4. IE Request
1.3.1.5. Server Request
1.3.1.6. Token Request
1.3.2. Get Requested Certificate
1.3.3. Test Certificate
1.3.4. Revoke Certificate
1.4. Certificates
1.4.1. Valid
1.4.2. Expired
1.4.3. Revoked
1.4.4. Suspended
1.4.5. Search
1.5. Requests
1.5.1. Certificate Requests List
1.5.2. Certificate Revocation Requests List
1.6. Language
2. Registration Authority
2.1. General
2.1.1. Server Management
2.1.2. LDAP Admin
2.1.3. Logout
2.2. Active CSRs
2.2.1. New
2.2.1.1. Edit Request
2.2.1.2. Approve and Sign Request
2.2.1.3. Approve Request without Signing
2.2.1.4. Delete Request
2.2.2. Renewed
2.2.3. Pending (be processed already)
2.2.4. Waiting for additional signature
2.3. Active CRRs
2.3.1. New
2.3.1.1. Approve and Sign Request
2.3.1.2. Approve Request without Signing
2.3.1.3. Delete Request
2.3.2. Pending (be processed already>
2.3.3. Waiting for additional signature
2.4. Information
2.4.1. Certificate Requests
2.4.2. Revocation Requests
2.4.3. Certificates
2.4.4. CA Certificates
2.4.5. CRLs
2.5. Utilities
2.5.1. Search Certificate
2.5.2. Search CSR
2.5.3. Warn Expiring Certificates
3. Registration Authority Node
3.1. General
3.1.1. Certificate Authority
3.1.2. Registration Authority
3.1.3. LDAP Admin
3.1.4. Public
3.1.5. Logout
3.2. Administration
3.2.1. Stop Daemons of Cryto Tokens
3.2.2. Server Init
3.2.2.1. Initialise DataBase
3.2.2.2. Import Configuration
3.2.3. Dataexchange
3.2.3.1. Enroll data to a lower level of the hierarchy
3.2.3.2. Receive data from a lower level of the hierarchy
3.2.3.3. Download data from a higher level of the hierarchy
3.2.3.3.1. All
3.2.3.3.2. Certificates
3.2.3.3.3. CRLs
3.2.3.3.4. Configuration
3.2.3.3.5. Batchprocessors
3.2.3.4. Upload data to a higher level of the hierarchy
3.2.3.4.1. All
3.2.3.4.2. Requests
3.2.3.4.3. CRRs
3.2.4. Backup and Recovery
3.2.4.1. Backup Database
3.2.4.2. Recovery Initialize Database
3.2.4.3. Restore Database
3.2.4.4. Rebuild OpenSSL's database and next serial number
3.2.5. Database
3.3. Utilites
3.3.1. E-Mail new users
3.3.2. Send a CRIN-mail
3.3.3. Cleanup sessions
3.3.4. Delete Temp Files
3.3.5. Rebuild CA Chain
3.4. Logs
3.4.1. Search
3.4.2. Recovery index database
4. LDAP Interface
4.1. Update LDAP
4.1.1. CA-Certificate
4.1.2. Certificates
4.1.3. CRL
4.2. View CA-Certificates
4.2.1. Valid
4.2.1.1. Add to LDAP
4.2.1.2. Add to LDAP with modified DN
4.2.1.3. Delete from LDAP
4.2.1.4. Delete from LDAP with modified DN
4.2.2. Certificates Expired
4.3. View Certificates
4.3.1. Valid
4.3.1.1. Add to LDAP
4.3.1.2. Add to LDAP with modified DN
4.3.1.3. Delete from LDAP
4.3.1.4. Delete from LDAP with modified DN
4.3.2. Expired
4.3.2.1. Add to LDAP
4.3.2.2. Add to LDAP with modified DN
4.3.2.3. Delete from LDAP
4.3.2.4. Delete from LDAP with modified DN
4.3.3. Suspended
4.3.3.1. Add to LDAP
4.3.3.2. Add to LDAP with modified DN
4.3.3.3. Delete from LDAP
4.3.3.4. Delete from LDAP with modified DN
4.3.4. Revoked
4.3.4.1. Add to LDAP
4.3.4.2. Add to LDAP with modified DN
4.3.4.3. Delete from LDAP
4.3.4.4. Delete from LDAP with modified DN
4.4. View CRLs
4.4.1. CRLs
4.4.1.1. Add to LDAP
4.4.1.2. Add to LDAP with modified DN
7. Functionality Descriptions
1. CA Initialization
1.1. Phase I: Initialize the Certification Authority
1.1.1. Database Setup
1.1.2. Key pair setup
1.1.3. Request setup
1.1.4. Certificate setup
1.1.5. Final setup
1.2. Phase II and III: Create the initial administrator and RA certificate
2. Node Initialization
3. CSR Handling - a request HOWTO
3.1. Ways to request a certificate
3.1.1. Microsoft client request
3.1.2. SPKAC request
3.1.3. Pregenerated PKCS#10 request handling
3.1.4. Request a centrally generated smartcard
3.1.5. Serverside key and request generation
3.1.6. Automatic browserdetection
3.1.7. Input field explanations
3.2. Edit a certificate signing requests
3.3. Approve certificate signing requests
3.4. Issue a certificate from a certificate signing request
3.5. Certificate enrollment
3.6. Delete certificate signing requests
4. Certificate Handling
4.1. Find a certificate
4.2. Download
4.2.1. Direct Download
4.2.2. Downloads from certificate page
4.2.2.1. Normal Downloads
4.2.2.2. Private Key Downloads
4.2.2.3. Certificate Installation
4.3. Start revocation
4.4. Write an email to the owner
4.5. Informational messages and their meaning
5. SCEP
5.1. SSCEP
5.2. NetScreen ScreenOS
5.3. F-Secure VPN+
5.4. Cisco PIX
8. Client Support
1. Introduction
2. Mozilla
2.1. General
2.1.1. Requesting a certificate
2.1.2. Installing a certificate
2.2. Mozilla
2.2.1. Backup a certificate
2.2.2. Signing Data
2.2.2.1. Mozilla 1.7+ and Firefox 0.9.3+
2.2.2.2. Mozilla 1.0 to 1.6, Firefox up to 0.9.2 and Netscape 6 and 7
2.2.2.3. SecClab
2.2.2.4. WaMCom
2.3. Netscape 4
2.3.1. Backup a certificate
2.3.2. Signing Data
2.4. Opera
3. Microsoft
3.1. Domaincontroller
3.1.1. OpenSSL 0.9.7
3.1.2. OpenSSL 0.9.8
3.2. Smartcard Logon
3.2.1. OpenSSL 0.9.7 (patched)
3.2.2. OpenSSL 0.9.8
3.3. Keystore
3.4. Internet Explorer
3.5. Outlook
3.6. Outlook Express

Preface

This is the ultimate user guide for OpenCA. Here we want to answer all the questions which user can have if they use OpenCA.

Chapter 5. Features

Table of Contents

1. 0.10
2. 0.9.2

This chapter is only a short list of the features which were introduced to or removed from a version. You can use this for example to look for a special feature which you need.

1. 0.10

  • DBM support was removed. Only SQL databases are supported

  • You can hide certificates of a special role.

  • Serial generation via sequence generators of databases.

  • No memory leaks during batch operation.

2. 0.9.2

  • Full stylesheet support.

  • nCipher support.

  • OpenCA daemon was introduced.

  • XML cache was introduced.

Chapter 6. Interface Descriptions

Table of Contents

1. Public PKI Server
1.1. General
1.1.1. Logout
1.2. CA Infos
1.2.1. Policy
1.2.2. Get CA Certificate
1.2.3. Certificate Revocation Lists
1.3. User
1.3.1. Request a certificate
1.3.1.1. Request a certificate with automatic browser detection
1.3.1.2. Basic Request
1.3.1.3. Netscape's Request
1.3.1.4. IE Request
1.3.1.5. Server Request
1.3.1.6. Token Request
1.3.2. Get Requested Certificate
1.3.3. Test Certificate
1.3.4. Revoke Certificate
1.4. Certificates
1.4.1. Valid
1.4.2. Expired
1.4.3. Revoked
1.4.4. Suspended
1.4.5. Search
1.5. Requests
1.5.1. Certificate Requests List
1.5.2. Certificate Revocation Requests List
1.6. Language
2. Registration Authority
2.1. General
2.1.1. Server Management
2.1.2. LDAP Admin
2.1.3. Logout
2.2. Active CSRs
2.2.1. New
2.2.1.1. Edit Request
2.2.1.2. Approve and Sign Request
2.2.1.3. Approve Request without Signing
2.2.1.4. Delete Request
2.2.2. Renewed
2.2.3. Pending (be processed already)
2.2.4. Waiting for additional signature
2.3. Active CRRs
2.3.1. New
2.3.1.1. Approve and Sign Request
2.3.1.2. Approve Request without Signing
2.3.1.3. Delete Request
2.3.2. Pending (be processed already>
2.3.3. Waiting for additional signature
2.4. Information
2.4.1. Certificate Requests
2.4.2. Revocation Requests
2.4.3. Certificates
2.4.4. CA Certificates
2.4.5. CRLs
2.5. Utilities
2.5.1. Search Certificate
2.5.2. Search CSR
2.5.3. Warn Expiring Certificates
3. Registration Authority Node
3.1. General
3.1.1. Certificate Authority
3.1.2. Registration Authority
3.1.3. LDAP Admin
3.1.4. Public
3.1.5. Logout
3.2. Administration
3.2.1. Stop Daemons of Cryto Tokens
3.2.2. Server Init
3.2.2.1. Initialise DataBase
3.2.2.2. Import Configuration
3.2.3. Dataexchange
3.2.3.1. Enroll data to a lower level of the hierarchy
3.2.3.2. Receive data from a lower level of the hierarchy
3.2.3.3. Download data from a higher level of the hierarchy
3.2.3.3.1. All
3.2.3.3.2. Certificates
3.2.3.3.3. CRLs
3.2.3.3.4. Configuration
3.2.3.3.5. Batchprocessors
3.2.3.4. Upload data to a higher level of the hierarchy
3.2.3.4.1. All
3.2.3.4.2. Requests
3.2.3.4.3. CRRs
3.2.4. Backup and Recovery
3.2.4.1. Backup Database
3.2.4.2. Recovery Initialize Database
3.2.4.3. Restore Database
3.2.4.4. Rebuild OpenSSL's database and next serial number
3.2.5. Database
3.3. Utilites
3.3.1. E-Mail new users
3.3.2. Send a CRIN-mail
3.3.3. Cleanup sessions
3.3.4. Delete Temp Files
3.3.5. Rebuild CA Chain
3.4. Logs
3.4.1. Search
3.4.2. Recovery index database
4. LDAP Interface
4.1. Update LDAP
4.1.1. CA-Certificate
4.1.2. Certificates
4.1.3. CRL
4.2. View CA-Certificates
4.2.1. Valid
4.2.1.1. Add to LDAP
4.2.1.2. Add to LDAP with modified DN
4.2.1.3. Delete from LDAP
4.2.1.4. Delete from LDAP with modified DN
4.2.2. Certificates Expired
4.3. View Certificates
4.3.1. Valid
4.3.1.1. Add to LDAP
4.3.1.2. Add to LDAP with modified DN
4.3.1.3. Delete from LDAP
4.3.1.4. Delete from LDAP with modified DN
4.3.2. Expired
4.3.2.1. Add to LDAP
4.3.2.2. Add to LDAP with modified DN
4.3.2.3. Delete from LDAP
4.3.2.4. Delete from LDAP with modified DN
4.3.3. Suspended
4.3.3.1. Add to LDAP
4.3.3.2. Add to LDAP with modified DN
4.3.3.3. Delete from LDAP
4.3.3.4. Delete from LDAP with modified DN
4.3.4. Revoked
4.3.4.1. Add to LDAP
4.3.4.2. Add to LDAP with modified DN
4.3.4.3. Delete from LDAP
4.3.4.4. Delete from LDAP with modified DN
4.4. View CRLs
4.4.1. CRLs
4.4.1.1. Add to LDAP
4.4.1.2. Add to LDAP with modified DN

1. Public PKI Server

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.

There are a set of "tabs" along the top of the screen, each is described below.

1.1. General

This section describes the current versions of the OpenCA modules. There is only one sub menu item, Logout.

1.1.1. Logout

This link has no function as the user has not logged onto the Public Interface.

1.2. CA Infos

This section describes the CA related utilities a user can access. Each heading below relates to a link under the CA Infos tab.

1.2.1. Policy

This link displays the CA poliy as a web page.

1.2.2. Get CA Certificate

By hitting this link the user is presented with a page titled "Download and Install CA Certificates". 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 in format PEM" to download the certificate in the appropriate format for inclusion in the Apache configuration files.

1.2.3. Certificate Revocation Lists

By hitting this link the user is presented with a screen entitled "Download and Install CRLs". 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.

1.3. User

This section allows the user to manage their certificates. It allows certificate request, retrieval, testing and revocation.

1.3.1. Request a certificate

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.

The form data has the following fields:

  • 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

  • Alternative email: Another email to appear in the certificate

  • DNS name: The DNS name if the certificate is a web server cert

  • Name: The real name of the user

  • Email: The users email address

  • Department: The user's department

  • Telephone: The users telephone number

  • Level of Assurance: This is the type of physical authentication the user is to receive

  • 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.

1.3.1.1. Request a certificate with automatic browser detection

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.

1.3.1.2. Basic Request

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).

1.3.1.3. Netscape's Request

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.

1.3.1.4. IE Request

This link should be used if the client is an Internet Explorer type browser. The CSR will be generated by the client.

1.3.1.5. Server Request

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.

1.3.1.6. Token Request

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".

1.3.2. Get Requested Certificate

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 user should enter their "Serial Number" in the space provided. The serial number can be:

Certificate's Serial

The serial number of the certificate signed by the Certificate Authority

Request's Serial

The serial number of the submitted request issued to the user at CSR submission time

Your ID:

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.

1.3.3. Test Certificate

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.

1.3.4. Revoke Certificate

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.

1.4. Certificates

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.

1.4.1. Valid

Following this link the user 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.

For each certificate the screen shows:

Serial

The serial number of the certificate

Common Name

The common name associated with the certificate

Issued On

The date and time the certificate was issued

Email:

The email address in the certificate (the user can click this link to mail the certificate holder)

Role

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).

1.4.2. Expired

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.

1.4.3. Revoked

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.

1.4.4. Suspended

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.

1.4.5. Search

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.

1.5. Requests

This section displays outstanding requests. New certificate requests and revocation requests can be displayed.

1.5.1. Certificate Requests List

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.

1.5.2. Certificate Revocation Requests List

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.

1.6. Language

This heading lists the languages that OpenCA has available, by clicking on one of the language links, the screens change to the selected language.

2. Registration Authority

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.

The user is first asked to authenticate themselves to the RA, depending on the configuration, this authentication may be nothing, username and password or by certificate.

Each one of the headings below coresponds to tab accross the top of the default RA screens.

2.1. General

2.1.1. Server Management

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.

2.1.2. LDAP Admin

Pressing this link takes the user to the LDAP Administration interface. From here the RA user can control the import and deletion of data from the LDAP Directory (if it is configured).

2.1.3. Logout

Pressing this link logs the user out of the interface.

2.2. Active CSRs

This tab list functions that can be performed on Active Certificate Signing Requests, i.e. requests from users for a certificate.

2.2.1. New

This link shows new CSRs at a specific Registration Authority with a certain Level of Assurance (as specified by the user at certificate request time). The RA Operator chooses the RA and LoA.

The screen shows all the new CSRs.

Each one of the requests must be processed in turn. By clicking the serial number of the request the operator is presented with the details of the request. Four options are then available to the RA Operator:

2.2.1.1.  Edit Request

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).

2.2.1.2.  Approve and Sign Request

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).

2.2.1.3.  Approve Request without Signing

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.

2.2.1.4.  Delete Request

Pressing this button deletes the request from the system.

2.2.2. Renewed

This screen displays any re-newed certificate siging requests. The list of options is the same as the "New" function.

2.2.3. Pending (be processed already)

This screen displays any already processed CSR's

2.2.4. Waiting for additional signature

In some circumstances CSR's require two signatures, those requests are displayed here. The functionality is the same as "New" requests.

2.3. Active CRRs

A user can initiate their own certificate revocation or it can be initiated by an RA Operator. This screen shows Certificate Revocation Eequests in various states.

2.3.1. New

This section shows new certificate revocation requests. The RA Operator can process them by clicking on the CRR serial number.

2.3.1.1.  Approve and Sign Request

Pressing this button allows the RA User to approve the revocation 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).

2.3.1.2.  Approve Request without Signing

Pressing this button approves the revocation 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.

2.3.1.3.  Delete Request

Pressing this button deletes the revocation request from the system.

2.3.2. Pending (be processed already>

This section shows CRRs that have been approved and exported to the CA.

2.3.3. Waiting for additional signature

Some CRRs require two signatures before they can be processed, these are displayed here. The RA Operator proccess them like "New" requests.

2.4. Information

This tab allows the RA Operator a different view of CSRs, CRR, User certificates, CA certificates and CRLs.

2.4.1. Certificate Requests

This link displays the user submitted requests and enables the RA Administrator to presses them.

The following lists of certificate requests can be displayed.

  • New

  • Renewed

  • Pending

  • Signed (waiting for additional signature)

  • Approved

  • Archived

  • Deleted

2.4.2. Revocation Requests

This link displays the user submitted revocation requests and enables the RA Administrator to presses them.

The following lists of certificate revocation requests can be displayed.

  • New

  • Pending

  • Signed (waiting for additional signature)

  • Approved

  • Archived

  • Deleted

2.4.3. Certificates

This link displays information about certificates in the PKI.

The following lists of certificates can be displayed.

  • Valid

  • Expired

  • Suspended

  • Revoked

2.4.4. CA Certificates

This link displays information about CA certificates in the PKI.

The following lists of CA certificates can be displayed.

  • Valid

  • Expired

2.4.5. CRLs

This link displays information about CRLs in the PKI.

The following lists of CRLs can be displayed.

  • All

2.5. Utilities

This section contains RA Operator utilities.

2.5.1. Search Certificate

This allows the RA Operator to search for a specific certificate based on Name, Email, DN or Role.

2.5.2. Search CSR

This allows the RA Operator to search for a specific certificate signing request based on Name, Email, DN or Role.

2.5.3. Warn Expiring Certificates

This allows the RA Operator to search for certificates expiring in the next "N" days (default 31).

3. Registration Authority Node

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.

3.1. General

This section lists the OpenCA components.

3.1.1. Certificate Authority

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.

3.1.2. Registration Authority

This link takes the user to the top Registration Authority page.

3.1.3. LDAP Admin

This section takes the user to a screen to manage the LDAP server, if one has been configured.

3.1.4. Public

Pressing this link takes the user to the OpenCA public interface. This interface is described elsewhere in this document.

3.1.5. Logout

Logs the user out of OpenCA.

3.2. Administration

This section lists the options available to configure and maintain the RA Node.

3.2.1. Stop Daemons of Cryto Tokens

If the PKI has been configured with Crypto Tokens holding the CA provate key in an online mode, then this link will stop the token deamon.

3.2.2. Server Init

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:

3.2.2.1. Initialise DataBase

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 !

3.2.2.2. Import Configuration

This link runs the import process. It requires that a CA export file exists at the appropriate device (or directory). The script will open this file and import the configuration data to the RA.

3.2.3. Dataexchange

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.

3.2.3.1. Enroll data to a lower level of the hierarchy

It is unlikely that there will be a lower level of the hierachy at the RA.

3.2.3.2. Receive data from a lower level of the hierarchy

It is unlikely that there will be a lower level of the hierachy at the RA.

3.2.3.3. Download data from a higher level of the hierarchy

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).

3.2.3.3.1. All

Pressing this link imports all the data that has been exported from the CA into the RA.

3.2.3.3.2. Certificates

Pressing this link imports only the certificate data from the CA into the RA.

3.2.3.3.3. CRLs

Pressing this link imports only the CRL data from the CA into the RA.

3.2.3.3.4. Configuration

Pressing this link imports only the configuration data from the CA to the RA. This is data like user roles (certificate types).

3.2.3.3.5. Batchprocessors

Pressing this link imports only the batch processor data from the CA. (**** I don't understand why this is necessary).

3.2.3.4. Upload data to a higher level of the hierarchy

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.

3.2.3.4.1. All

Pressing this link exports all new or modified RA data to the export device.

3.2.3.4.2. Requests

Pressing this link exports all new or modified requests to the export device.

3.2.3.4.3. CRRs

Pressing this link exports all new or modified revocation requests to the export device.

3.2.4. Backup and Recovery

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.

3.2.4.1. Backup Database

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).

3.2.4.2. Recovery Initialize Database

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.

3.2.4.3. Restore Database

Use this link to recover the backup data.

3.2.4.4. Rebuild OpenSSL's database and next serial number

In order to issue certificate request numbers to users this link must be pressed so that the OpenCA RA resets it's static configuration data based on the imported data base data.

3.2.5. Database

Use this link to update the searchable attributes in the database after a software update. *** does anyone have a better explanation of this function ?

3.3. Utilites

General utilities for the RA Operator

3.3.1. E-Mail new users

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.

3.3.2. Send a CRIN-mail

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.

3.3.3. Cleanup sessions

I don't know what this does !!!???

3.3.4. Delete Temp Files

This is a link to a housekeeping utility to delete temporary files.

3.3.5. Rebuild CA Chain

This link runs a function that rebuilds the CA Chain, this is useful if your have a CA hierachy and need to tell the environment about the chain of CA certificates.

3.4. Logs

Utilities to handle log files.

3.4.1. Search

This function lets the RA Operator search the log files for log entries of a specific class and level.

3.4.2. Recovery index database

I do not know what this does !!!

4. LDAP Interface

This set of screens controls the uploading of data to the LDAP Directory (if there is one configured).

4.1. Update LDAP

4.1.1. CA-Certificate

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.

4.1.2. Certificates

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.

4.1.3. CRL

Pressing this link uploads the current certificate revocation list (CRL) to the LDAP directory. The main screen shows status and indicates success or failure.

4.2. View CA-Certificates

4.2.1. Valid

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:

4.2.1.1. Add to LDAP

Wrties the CA certificate to the LDAP directory.

4.2.1.2. Add to LDAP with modified DN

Allows the user to enter a modified DN for the certificate and then publish it to the LDAP directory with the modified DN.

4.2.1.3. Delete from LDAP

Deletes the CA certificate from the LDAP directory.

4.2.1.4. Delete from LDAP with modified DN

Allows the user to enter the modified DN name before deleting the certificate with the modified DN from the LDAP directory.

4.2.2. Certificates Expired

This link displays a list of expired CA certificates.

4.3. View Certificates

4.3.1. Valid

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:

4.3.1.1. Add to LDAP

Pressing this button uploads the certificate to the LDAP directory.

4.3.1.2. Add to LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.

4.3.1.3. Delete from LDAP

Pressing this button deletes the certificate from the LDAP directory.

4.3.1.4. Delete from LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then delete the certificate from the LDAP directory with the modified DN.

4.3.2. Expired

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:

4.3.2.1. Add to LDAP

Pressing this button uploads the certificate to the LDAP directory.

4.3.2.2. Add to LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.

4.3.2.3. Delete from LDAP

Pressing this button deletes the certificate from the LDAP directory.

4.3.2.4. Delete from LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then delete the certificate from the LDAP directory with the modified DN.

4.3.3. Suspended

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:

4.3.3.1. Add to LDAP

Pressing this button uploads the certificate to the LDAP directory.

4.3.3.2. Add to LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.

4.3.3.3. Delete from LDAP

Pressing this button deletes the certificate from the LDAP directory.

4.3.3.4. Delete from LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then delete the certificate from the LDAP directory with the modified DN.

4.3.4. Revoked

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:

4.3.4.1. Add to LDAP

Pressing this button uploads the certificate to the LDAP directory.

4.3.4.2. Add to LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then upload the certificate to the LDAP directory with the modified DN.

4.3.4.3. Delete from LDAP

Pressing this button deletes the certificate from the LDAP directory.

4.3.4.4. Delete from LDAP with modified DN

Pressing this button allows the user to enter a modified DN and then delete the certificate from the LDAP directory with the modified DN.

4.4. View CRLs

4.4.1. CRLs

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:

4.4.1.1. Add to LDAP

Pressing this button adds the CRL to the LDAP directory.

4.4.1.2. Add to LDAP with modified DN

Pressing this button allows the user to change the issuer details before uploading to the LDAP directory.

Chapter 7. Functionality Descriptions

1. CA Initialization

The initialization of the CA consists of three phases and can only be executed once. The first phase is mandatory. It initializes the CA itself. The second and third phase are optional. They create the first two certificates. Phase two creates the first certificate for an operator and phase three creates the certificate for the online web server. First we describe phase one and then we describe phase two and three in one section because they are nearly identical.

This is OpenCA's screen of the different phases of the CA
                        initialization.

Figure 7.1. Phases of the CA initialization

1.1. Phase I: Initialize the Certification Authority

The first phase of the initialization of OpenCA is used to setup all the cryptographic mechanism which are necessary to run a CA. This include things like a private key, a certificate signing request (CSR), a CA certificate and the certificate chain of the CA. If you completed this phase successfully then your CA is ready for operational usage. The other phases only do some optional tasks.

This is OpenCA's screen of the first phase of the CA
                            initialization.

Figure 7.2. Phase I of the CA initialization

1.1.1. Database Setup

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. Please note that OpenCA 0.9.3+ only supports SQL databases.

1.1.2. Key pair setup

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.

1.1.3. Request setup

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).

1.1.4. Certificate setup

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.

1.1.4.1. Selfsigned CA certificate

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.

1.1.4.2. Signed by another CA

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.

1.1.5. Final setup

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.

1.2. Phase II and III: Create the initial administrator and RA certificate

These two phase are used to create the first certificates of the infrastructure. You can create these certificates via a seperate RA and public interface too but usually the people want only to setup one online RA and this RA should run with https. So they need at minimum a certificate for the RA's web server. If they use an online RA and it should be a secure solution then the operators must sign a request if they approve a request. So they need an initial user certificate. If the operators have to login via a digital signature and not with login and passphrase then the first user certificate is mandatory. If you compare the two screenshots then you will see that only the names of the forms differ.

This is OpenCA's screen of the second phase of the CA
                            initialization.

Figure 7.3. Phase II of the CA initialization

This is OpenCA's screen of the third phase of the CA
                            initialization.

Figure 7.4. Phase III of the CA initialization

Both phases use the same process like for every normal certificate signing request. Sou can simply read the user guide section where the different requests and their handling will be described. The phases consists of four steps:

Create a new request

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.

Edit the request

Like editing on the RA. See Section 3, “CSR Handling - a request HOWTO” for more details.

Issue the certificate

Like the issue link if you view a certificate on the CA. See the request handling in the user guide.

Handle the certificate

See Section 4, “Certificate Handling” for an explanation of the options.

2. Node Initialization

After you setup an offline CA you usually wants to setup one or more online servers to publish certificates and CRL, receive requests and offers a lot of other services to your customers. To do so you have to install the necessary components plus a so called node interface. This node interface is used to manage the communication in the PKI hierarchy between the different servers and to manage the server itself. If you initialize such an online component then you have to use this node interface.

After you logged in you have to go to and then to . First you should initialize the database and then you have to import the configuration from the CA or any other server which is at a higher position of the PKI's hierarchy. The last step also creates things like a working certificate chain.

3. CSR Handling - a request HOWTO

Usually an administrator or an user suddenly needs more security or is shocked how high does it's risk be if he wants to request a certificate. Then the customers try panically to request a certifcate and don't know how. This is the moment when you should be ready to present them a small explanation how the certification works. We want to give you here an overview how the complete process of OpenCA works. You can simply use this as a base for your user information. The explanations are divided into five plus two parts:

  1. how to submit the new request

  2. how to edit a request

  3. how to approve a request

  4. how to issue a certificate

  5. how to enroll a certificate

  6. how to delete a request

  7. explanations of the input fields

Please remember that a request is more correctly a certificate signing request. There is a second request type too - the certificate revocation request (CSR).

3.1. Ways to request a certificate

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.

3.1.1. Microsoft client request

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.

3.1.2. SPKAC request

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.

3.1.3. Pregenerated PKCS#10 request handling

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.

3.1.4. Request a centrally generated smartcard

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.

3.1.5. Serverside key and request generation

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.

3.1.6. Automatic browserdetection

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.

3.1.7. Input field explanations

There are several fields which you have to fill in. Here is an overview how they will used:

Certificate data

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.

There are a number of restrictions to the content of the subject fields, do not use characters "#", "," and ";".

Additional user data

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.

Role

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.

Registration Authority

Deprecated. Will be replaced by LOA.

PIN

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!

Keylength

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.

3.2. Edit a certificate signing requests

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.

It is possible to change four things in the edit form.

Subject alternative name

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.

Subject or distinguished name

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).

Role

This is the requested role. The RA operator must set the correct one.

Additional data

These are informations which will assembled only for internal usage. Here you can store such things like contact addresses and special phonenumbers.

3.3. Approve certificate signing requests

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.

3.4. Issue a certificate from a certificate signing request

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.

3.5. Certificate enrollment

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.

3.6. Delete certificate signing requests

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.

4. Certificate Handling

This section describes all the things which you can do with a displayed certificate.

4.1. Find a certificate

You can find a certificate with two methods. The first method is search. Go to Utilities --> Search certificate. You can enter some parameters in the displayed search form. The form only accepts wild cards if you use a SQL database. If the search succeeds then you can choose the certificate which will be displayed.

The second method is a little bit more “stupid”. Go to Certificates --> Valid

and try to find the appropriate certificate in the lists. You can navigate by using the links in line Extra References.

4.2. Download

4.2.1. Direct Download

You can directly download a certificate into your browser by entering an appropriate serial number. You must know the serial number of the certificate, of the request or you ID in the batch processors. The browser will be automatically detected by the software. Please remember that this method only works if you generated the private key with the browser and the private key is still in your keystore on computer.

4.2.2. Downloads from certificate page

There are three different ways to download a certificate. You can download passive data, or you can download the private key and the certificate or 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.

4.2.2.1. Normal Downloads

If you only need a certificate in a special format then can choose the format and click on Download. The certificate will be send with an appropriate MIME type which prevents browsers from installation. You can save the certificate on a disk and you can do what you (or the policy) want to do with it.

4.2.2.2. Private Key Downloads

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” passphrase are often not really secure. If the admin sets the passphrase for this certificate via the RA interface then you can go again to your interface and download the certificate and private key. You have to enter the passphrase for the private key first and then the software will ask 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.

4.2.2.3. Certificate Installation

Sometimes you need a certificate of another user who has never sent you a signed mail. If you have a normal installation with LDAP support then you can search the certificate in the directory. There are installations 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, and the certificate will be automatically installed in your certificate store. After this you can use it to encrypt emails.

4.3. Start revocation

4.4. Write an email to the owner

4.5. Informational messages and their meaning

Anybody has too much time?

5. SCEP

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”.

5.1. SSCEP

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.

Our example uses the following configuration (sscep.conf):

# 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 

Example 7.1. SSCEP configuration

First you have to download the CA and SCEP certificate from the SCEP server. You can do this with the command sscep getca -f sscep.conf. 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.

After the activation of SCEP you have to configure it. The configuration settings can be found under /Settings/Certificate Handling/Enrollment/Protocol Settings/SCEP. The options are

CA Server URL

The value should look like http://scep.mypki.org/cgi-bin/scep/scep. This is the default SCEP gateway of OpenCA.

Warning

Please notice that F-Secure has a problem with DNS. If your VPN+ does not work then it is a good idea to replace the domain name in the URL with the IP of the server.

CA Identifier

This parameter is not used by OpenCA. You can ignore it.

Challenge Password

We don't use the challenge password today. So you can ignore it too.

Alternative Name Encoding

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.

5.4. Cisco PIX

The most OpenCA SCEP users are using PIX but nobody writes a good documentation until now :( We can only notice that it is sometimes necessary to create a new role which only includes the extension for the Netscape certificate type. It looks like the PIX is some kind of sensible for special extensions.

Please notice that the PIX has one major problem - it cannot scale for large installations. This does not mean that there is not enough performance but the box can only handle one CA. This mean that if your have to replace your old CA by a new one then the trust for all old certs breaks immediately. It is not possible to operate with two CAs at the same time. If you have a large company with thousands of employees then it is nearly impossible to replace all user certs at one time.

Timestamp: 2004-May-17

Chapter 8. Client Support

1. Introduction

The biggest problems of PKIs are like for all other big infrastructures the clients. The big advantage of PKIs is that all vendors accept the basic standards. The big disadvantage is that the area of PKI-enabled clients changes very fast and some vendors are in a very early implementation phase or have products with different behaviour.

If this sounds confusing then you can believe us it is confusing. Therefore you can find here some descriptions for the different browsers and the common problems with these browsers. If you have additional problems or other informations then please mail us. We try to support as many client as possible but sometimes a new release can outdate a complete description.

You will see this screen if you try to request a certificate
          with OpenCA.

Figure 8.1. Request a certificate

2. Mozilla

This section describes the behaviour of all spin offs from the original Netscape browser. This includes in the security area Opera because Opera includes the crypto stuff in the same way like Netscape. This doesn't mean that Opera includes code from Netscape or Mozilla. Opera only operates in the same way and therefore we included it here.

2.1. General

2.1.1. Requesting a certificate

If you use a Mozilla-like browser and you want to request a certificate from an OpenCA-based PKI then you have to go to the public web interface and klick onto the User area. There you can choose an option request a certificate. After this you can choose between several options (see Figure 8.1, “Request a certificate”).

You can choose the link for the automatic browser detection or more error proof the link for SPKAC-based requests. SPKAC is a special format defined by Netscape. This format is used by Netscape, Mozilla and Opera.

Please fill in your data at the next page. If you submit your data and the software finds no mistakes then you will see the data again. Please check them carefully to avoid additional work for your registration authority. If you now submit the form again then your browser generates a new private key and creates a new request with this key. This request will be send by your browser to the web server from your PKI.

Please print the last page or at minimum write down the displayed information about the necessary procedure and the displayed serials. These serials are necessary to install the later issued certificate.

2.1.2. Installing a certificate

2.2. Mozilla

2.2.1. Backup a certificate

2.2.2. Signing Data

There were several problems with Mozilla and signing in the past. The most problems should be fixed if you are using Mozilla 1.7+ or Firefox 0.9.3+.

2.2.2.1. Mozilla 1.7+ and Firefox 0.9.3+

These versions of Mozilla support the same technology like the old Section 2.3, “Netscape 4”. You must have the complete CA chain of a certificate and you must trust the CA certificate. If these requirements are meet then you can use a certificate to sign an HTML form. This is completely done in Javascript. No additional plugins are required.

2.2.2.2. Mozilla 1.0 to 1.6, Firefox up to 0.9.2 and Netscape 6 and 7

If you want to sign HTML forms with the old versions of the Mozilla browser then you must use Section 2.2.2.3, “SecClab”.

2.2.2.3. SecClab

Secclab is a XPCOM Component that implements some PKI functions. This sounds a little bit abstract but it is the official description from http://secclab.mozdev.org. In fact SecCLAB is a plugin which implements form signing.

All Mozillas from 1.0 to 1.6 and the modern Netscape version doesn't include the old crypto object from Netscape 4. This statement is correct for all Firefox up to and including 0.9.2 because Firefox uses the core code from Mozilla. The result is that your unable to sign form with these browsers. OpenCA needs this functionality to protect approved requests and to support X.509 based authentication. The plugin implements a new object class which replaces the old function signForm.

If you want to download or install the plugin from the homepage of SecCLAB then please notice that you must take care about the correct version. There are especially for Linux two different version - one for gcc3 and one for the old binaries. All new distributions use gcc3. Debian woody uses 2.95 and 2.96 (ia64). Only hppa (HP PA-RISC) uses gcc 3.0 but the plugin was only compiled for i386. After the installation you you have to quit Mozilla and start again. Please really quit Mozilla and not only close the used window (usually Ctrl-Q do the job). If you don't find the appropriate plugin in the download area then please check the installation area. There was some confusion with the gcc3 version for Linux.

If you want to sign something with a certficate then you must install the complete CA chain and you must trust the CA. The important thing is that you must trust the CA for email signing. We do not know what the signing of some data has to do with email signing but without this it does not work.

Note

It is strongly recommended to not use SecCLAB any longer because the actual Mozilla (1.7+) and Firefox (0.9.3+) versions include support for formsigning. SecCLAB was only necessary until the development team of Mozilla implemented the old feature from Netscape 4.
2.2.2.4. WaMCom

WaMCom should no longer be used because the actual versions of Firefox and Mozilla include all required components now include an up-to-date set of security patches.

2.3. Netscape 4

2.3.1. Backup a certificate

2.3.2. Signing Data

You must have the complete CA chain of a certificate and you must trust the CA certificate. If these requirements are meet then you can use a certificate to sign an HTML form. This is completely done in Javascript. No additional plugins are required.

2.4. Opera

3. Microsoft

3.1. Domaincontroller

Before the description starts please notice that the SMTP based replication of Microsoft ADS doesn't work with TTPs. Microsoft officially commits this problem but doesn't comment the reasons. If you don't use SMTP replication then you can TTPs without any problems except that Microsoft's automatic certificate renewal does not work of course.

The requirements are described in detail in the knowledge base article 291010. The most important things are listed here:

  • There must be at minimum one CDP.

  • The X.509v3 extension Key Usage must include the options Digital Signature and Key Encipherment.

  • The X.509v3 extension Extended Key Usage must include Client Authentication (1.3.6.1.5.5.7.3.2) and Server Authentication (1.3.6.1.5.5.7.3.1). This is necessary because domain controllers will be connected as servers and establish connections as clients to other servers.

  • The X.509v3 extension Subject Alternative Name must include the globally unique identifier (GUID) of the domain controller and the DNS name of the domain controller. The GUID is a 16 Byte long number which identify the object of the domain controller in the directory (ADS). The OID of the GUID in the othername is 1.3.6.1.4.1.311.25.1.

  • There must be one extension with the BMP value DomainController inside. Microsoft has an extra extension for this template name with the OID 1.3.6.1.4.1.311.20.2. The extension is referenced by Microsoft as Certificate Template Name.

  • The X.509v3 extension Basic Constraints should include End Entity as subject (OpenSSL: CA=false) and no limitation for the path length.

  • The subject of the certificate can be the directory path of the domain controller. This is only optional.

If you want to create such a certficate then you must create the key pair with RSA/Schannel CSP. The most simple way for doing this is to install Microsoft CA services and to issue a certificate request using a form, where you can choose this CSP and generate a key pair and certificate request in PKCS#10 format.

3.1.1. OpenSSL 0.9.7

The settings for Key Usage, Extended Key Usage and the CDPs is no problem with OpenSSL and we don't describe here in detail how you can configure this in OPENCADIR/etc/openssl/extfiles/domaincontroller.ext. The Basic Constraint and Subject stuff is the same like for every other certificate too.

The Subject Alternative Name is the first difficult thing. OpenSSL 0.9.7 does not support othername. The solution is to encode the GUID in binary format into the subject alternative name.

You can find a detailed description of DER: in openssl.txt of the OpenSSL documentation. 2.5.29.17 is the OID of the subject alternative name. The example GUID is 01020304050607080910111213141516. Please remember that the GUID is allways a 16-byte string and the numbers are hexadecimal encoded. A 16 is a decimal 22. The DNS name is dns.somehost.de (64:6E:73:2E:73:6F:6D:65:68:6F:73:74:2E:64:65). If you need more infos about ASN.1 encodings then please read the ASN.1 specs. We only know that the 10 in front of the GUID and the 0F in front of the DNS name are the length of the values.

The next complicated stuff is the certficate template name but this is a fixed extension so we can copy it from already existing certificates :)

After you read all these complicated issues you understand perhaps why I can only recommend you to use OpenSSL 0.9.8 if you want to issue certificates for domain controllers. The biggest problem is the subject alternative name which can only be created in binary format which requires to change the extension configuration file of the used role for every issued certificate to encode the correct GUID and DNS name of the domain controller. Nevertheless you can do it with OpenSSL 0.9.7.

3.1.2. OpenSSL 0.9.8

The first important note before you start with OpenSSL 0.9.8 - you cannot compile OpenCA with OpenSSL 0.9.8. You must install OpenCA with an OpenSSL 0.9.7 and then you must change the path of the OpenSSL binary from the 0.9.7 binary to the 0.9.8 binary. We know that this is not really comfortable but the header files changed from 0.9.7 to 0.9.8 in an incompatible way and we only migrate our sources if there is a 0.9.8 stable release.

The standard things like Key Usage, Extended Key Usage, Subject, CDPs and Basic Constraints do not change between the different OpenSSL versions. The certificate template name extension of Microsoft must be copied as binary too but it is like the other standardized extensions a static string.

The important improvement of OpenSSL 0.9.8 is the support for othername in the subject alternative name. The new OpenSSL version allows a much easier specification of proprietary extensions even if they are in binary format.

The GUID is the same GUID like in the example for OpenSSL 0.9.7. The big question is now how can I put it into my OpenCA? The answer is short. You have to choose otherName as attribute for the subject alternative name at the RA interface and then you have to enter 1.3.6.1.4.1.311.25.1;FORMAT:HEX,OCT:01020304050607080910111213141516.

We know that it is a big problem for the most admins to enter OIDs and cryptical things like OpenSSL formats. Therefore we added some extra stuff for Microsoft only. You can use the field MS_GUID as a subject alternative name attribute too. There you have only to enter the pure GUID in HEX format. The rest is handled by OpenCA.

3.2. Smartcard Logon

The requirements are described in detail in the knowledge base article 281245. Please note that we only list the requirements for the PKI system here. There are several other requirements to which you can find in the knowledge base article. The most important things are listed here:

  • There must be at minimum one CDP.

  • The X.509v3 extension Key Usage must include the options Digital Signature.

  • The X.509v3 extension Extended Key Usage must include Client Authentication (1.3.6.1.5.5.7.3.2) and Smart Card Logon (1.3.6.1.4.1.311.20.2.2).

  • The X.509v3 extension Subject Alternative Nme must include the universal principal name (UPN) of the user. A UPN is the like account@domain (e.g. john_doe@company.com). It is important to understand that this is no emailaddress. The OID of the UPN is 1.3.6.1.4.1.311.20.2.3. The format of the UPN is UTF-8.

  • The X.509v3 extension Basic Constraints should include End Entity as subject (OpenSSL: CA=false) and no limitation for the path length.

3.2.1. OpenSSL 0.9.7 (patched)

Please use the patch for OpenSSL which you can find at our ftp server. The patch othername.tgz includes a fix for Microsoft's othername usage. The following documentation only refers to this patched version of OpenSSL.

OpenCA's role User already includes the required extensions for Microsoft's smartcard logon. Generally you can add the OID for secure email (1.3.6.1.5.5.7.3.4) and other things to such a certificate. The smartcard certificate is not limited to logon. To be more Microsoft-like you can add a certificate template name to the certificates like for domain controllers. This is not required but it looks more nice :)

Now we have to deal with the UPN. This UPN must be placed in the othername of the subject alternative name. If you use the patched option and the othername is supported by the RA configuration then you have to enter 1.3.6.1.4.1.311.20.2.3:UTF8String:account@domain in the value field after you selected otherName. The keyword UTF8String is case-sensitive. If you do all correct then you can now issue a wonderful certificate for smartcard logon.

3.2.2. OpenSSL 0.9.8

The only difference between OpenSSL 0.9.8 and 0.9.7 is the handling of the othername. OpenSSL 0.9.8 support this by default without patching. You have to enter 1.3.6.1.4.1.311.20.2.3;UTF8:account@domain. Please notice that OpenSSL 0.9.8 uses UTF8 and not UTF8String.

We know that it is a big problem for normal users to enter OIDs and other cryptical things like which have nothing to do with the UPN. Therefore we added some extra stuff for Microsoft only. You can use the field MS_UPN as a subject alternative name attribute too. There you have only to enter the pure UPN like an emailaddress. The conversion to OpenSSL's format is handled by OpenCA.

3.3. Keystore

The private keys of a user are stored in the profile of the user if no smartcards are used. This means that the private keys of any Microsoft client software like Internet Explorer or Outlook are automatically present after a successful login because they are part of the profile. This protects the keys too.

3.4. Internet Explorer

3.4.1. Requesting a certificate

3.4.2. Installing a certificate

3.4.3. Backup a certificate

3.4.4. Signing Data

3.5. Outlook

3.6. Outlook Express

Technology Guide

Preface

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.

Chapter 9. Introduction

Table of Contents

1. Slotechnology

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.

Today this guide includes the following topics:

1. Slotechnology

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.

The general mechanism is really easy:

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);
            

I hope you see it is really simple to develop a slot concept :-)

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.

Chapter 10. XML

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.

Chapter 11. Cryptolayer

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