Part 1: EJBCA Administration
This section will cover:
Creation of a 3-tier CA using soft keystores
Creating the custom extension for Microsoft template information
Creating user and computer profiles for auto enrollment
Creating the Web Services API keystore
Creating the server certificate for Apache Tomcat web server
Administrator roles for the Web Services Client
In the examples below, the Certificate Services hostname is csserver.primekey.com. The text highlighted in red should be replaced with names in your environment.
1. Create the 3-tier CA hierarchy
1.1 Create the Root CA
Create Root CA Crypto Token
Click Crypto Tokens under CA Functions
Select Create New
Enter a name for the Crypto Token: Root CA Token
Select Type as Soft
Enter an authentication code for the token.
Auto-activation: Not selected
Click Save
Generate a signKey of size 4096
Generate a defaultKey of size 4096
Generate a testKey of size 1024
Create Root CA Certificate Profile
Clone the ROOTCA profile for the Root CA and label it as "Root CA Certificate Profile" Select the following values:
Available key algorithms: RSA
Available bit lengths: 4096
Validity: 25y
LDAP DN order: Unchecked
Available CA: Any CA
Create the Root CA certificate
Click Certificate Authorities, In the Add CA field enter the name "Root CA". Click "Create…"
In the Create CA screen populate the following fields:
Signing Algorithm: SHA256WithRSA
Crypto Token: Root CA Token
Subject DN: <RootCASubjectDN>
Signed By: Self Signed
Certificate Profile: Root CA Certificate Profile
Validity: 25y
CRL Distribution Point: http://crl.company.com/Root_CA.crl
OCSP Service Locator URI: http://ocsp.company.com
1.2 Create Intermediate CA
Create Intermediate CA Crypto Token
Click Crypto Tokens under CA Functions
Select Create New
Enter a name for the Crypto Token: Intermediate CA Token
Select Type as Soft
Enter an authentication code for the token.
Auto-activation: Not selected
Click Save
Generate a signKey of size 4096
Generate a defaultKey of size 4096
Generate a testKey of size 1024
Create Intermediate CA Certificate Profile
Clone the SUBCA profile for the Intermediate CA and label it as "Intermediate CA Certificate Profile." Select the following values:
Available key algorithms: RSA
Available bit lengths: 4096
Validity: 25y
LDAP DN order: Unchecked
Available CA: Any CA
Create Intermediate CA certificate
Click Certificate Authorities, In the Add CA field enter the name "Intermediate CA". Click "Create…"
In the Create CA screen populate the following fields:
Signing Algorithm: SHA256WithRSA
Crypto Token: Intermediate CA Token
Subject DN: <IntermediateCASubjectDN>
Signed By: Root CA
Certificate Profile: Intermediate CA Certificate Profile
Validity: 20y
CRL Distribution Point: http://crl.company.com/Intermediate_CA.crl
OCSP Service Locator URI: http://ocsp.company.com
1.3 Create Issuing CA
Create Issuing CA Crypto Token
Click Crypto Tokens under CA Functions
Select Create New
Enter a name for the Crypto Token: Issuing CA Token
Select Type as Soft
Enter an authentication code for the token.
Auto-activation: Not selected
Click Save
Generate a signKey of size 4096
Generate a defaultKey of size 4096
Generate a testKey of size 1024
Create Issuing CA Certificate Profile
Clone the SUBCA profile for the Issuing CA and label it as "Issuing CA Certificate Profile." Select the following values:
Available key algorithms: RSA
Available bit lengths: 4096
Validity: 25y
LDAP DN order: Unchecked
Available CA: Any CA
Create Issuing CA certificate
Click Certificate Authorities, In the Add CA field enter the name "Issuing CA". Click "Create…"
In the Create CA screen populate the following fields:
Signing Algorithm: SHA256WithRSA
Crypto Token: Issuing CA Token
Subject DN: <IssuingCASubjectDN>
Signed By: Intermediate CA
Certificate Profile: Issuing CA Certificate Profile
Validity: 15y
CRL Distribution Point: http://crl.company.com/Issuing_CA.crl
OCSP Service Locator URI: http://ocsp.company.com
2. Create Custom Certificate Extensions
On the EJBCA Administration Interface, click System Configuration
Select the Custom Certificate Extensions tab
Enter the Object Identifier (OID) as "1.3.6.1.4.1.311.21.7".
Enter "Certificate Template Information" as the Label.
Click Add.
Click Edit on the object previously added.
Select the Encoding to DEROBJECT
Set Dynamic to true.
Click Save.
3. Create User and Computer Auto Enrollment Certificate Profiles
3.1 Create a certificate profile for User Auto Enrollment
Click Certificate Profiles under CA Functions
Clone from ENDUSER named User_Certificate_Profile
Edit the User_Certificate_Profile
Key Usage: Digital Signature, Non-repudiation, and Key encipherment
Extended Key Usage: Client Authentication, Email Protection, and MS Encrypted File System (EFS)
Used Custom Certificate Extensions: Certificate Template Information
Available CAs: Issuing CA
3.2 Create a certificate profile for Computer Auto Enrollment
Click Certificate Profiles under CA Functions
Clone from ENDUSER named Computer_Certificate_Profile
Edit the Computer_Certificate_Profile
Key Usage: Digital Signature and Key encipherment
Extended Key Usage: Client Authentication and Server Authentication
Used Custom Certificate Extensions: Certificate Template Information
Available CAs: Issuing CA
4. Create Tomcat Server and Web Services API Certificate Profiles
4.1 Create a certificate profile for Tomcat server
Click Certificate Profiles under CA Functions
Clone from SERVER named Tomcat_Server_Certificate_Profile
Edit the Tomcat_Server_Certificate_Profile
Available key algorithms: RSA
Change Validity to 5y
Available bit lengths: 2048
CRL Distribution Point: Use
Use CA defined CRL Dist. Point: Use
Authority Information Access: Use
Use CA defined OCSP locator: Use
Available CAs: Issuing CA
4.2 Create a certificate profile for Web Services API client
Click Certificate Profiles under CA Functions
Clone from ENDUSER named WebService_Client_Certificate_Profile
Edit WebService_Client_Certificate_Profile
Available key algorithms: RSA
Change Validity to 5y
Available bit lengths: 2048
Available CAs: ManagementCA
5. Create User and Computer Auto Enrollment End Entity Profiles
All attributes that may occur in a request should be added and marked as modifiable.
5.1 Create End Entity Profile for User Auto Enrollment
Add End Entity profile named "User_End_Entity_Profile"
Click User_End_Entity_Profile and click Edit End Entity Profile
Subject DN Attributes: CN
Other subject attributes: MS UPN
Default Certificate Profile: User_Certificate_Profile
Available Certificate Profiles: User_Certificate_Profile
Default CA: Issuing CA
Available CAs: Issuing CA
Default Token: User Generated
Available Tokens: User Generated
5.2 Create End Entity Profile for Computer Auto Enrollment
Add End Entity profile named "Computer_End_Entity_Profile"
Click Computer_End_Entity_Profile and click Edit End Entity Profile
Subject DN Attributes: CN
Other subject attributes: DNS Name
Default Certificate Profile: Computer_Certificate_Profile
Available Certificate Profiles: Computer_Certificate_Profile
Default CA: Issuing CA
Available CAs: Issuing CA
Default Token: User Generated
Available Tokens: User Generated
6. Create Tomcat Server and Web Services API End Entity Profiles
6.1 Create End Entity Profile for the SSL server certificate
Click End Entity Profiles under RA Functions
Add End Entity profile named "TomcatServerEEProfile"
Click TomcatServerEEProfile and click Edit End Entity Profile
Uncheck End Entity E-mail
Subject DN Attributes: CN
Default Certificate Profile: Tomcat_Server_Certificate_Profile
Available Certificate Profiles: Tomcat_Server_Certificate_Profile
Default CA: Issuing CA
Available CAs: Issuing CA
Default Token: JKS
Available Tokens: JKS
6.2 Create End Entity Profile for the Web Services Client
Click End Entity Profiles under RA Functions
Add End Entity profile named "WebServiceClientEEProfile"
Click WebServiceClientEEProfile and click Edit End Entity Profile
Uncheck End Entity E-mail
Subject DN Attributes: CN
Default Certificate Profile: WebService_Client_Certificate_Profile
Available Certificate Profiles: WebService_Client_Certificate_Profile
Default CA: ManagementCA
Available CAs: ManagementCA
Default Token: JKS
Available Tokens: JKS
7. Create Tomcat and Web Services End Entities
7.1 Creating and downloading the Tomcat JKS keystore
Add the Tomcat server End Entity
Click Add End Entity
End Entity Profile: TomcatServerEEProfile
Username: tomcat_server
Password: <PASSWORD>
Confirm Password: <PASSWORD>
CN: csserver.primekey.com
Click Add
Download Tomcat server certificate as a JKS keystore with FireFox
Click Public Web
Click Create Keystore
Username: tomcat_server
Password: <PASSWORD>
Save this keystore as tomcat_server.jks
7.2 Creating and downloading the Web Services JKS keystore
Add the Web Services Client End Entity
Click Add End Entity
End Entity Profile: WebServiceClientEEProfile
Username: aewsclient
Password: <PASSWORD>
Confirm Password: <PASSWORD>
CN: aewsclient
Click Add
Download the Web Services Client certificate as a JKS keystore with FireFox
Click Public Web
Click Create Keystore
Username: aewsclient
Password: <PASSWORD>
Save this keystore as aewsclient.jks
8. Create Administrator Roles for Web Services Client
Create Administrator Role for Web Services Client
Click Administrator Roles
Click Add
Enter name for role: AutoEnrollment Web Services
Click on Administrators for AutoEnrollment Web Services
Select the following:
CA: ManagementCA
Match with: X509: CN, Common Name
Match type: Equal, case sens.
Match value: aewsclient
Click Add
Click Edit Access Rules for AutoEnrollment Web Services
Role Template: RA Administrators
Authorized CA: Issuing CA
End Entity Rules: View End Entity, Create End Entity, and Edit End Entity
End Entity Profiles: User_End_Entity_Profile and Computer_End_Entity_Profile (select all End Entity Profiles that will be used with Auto Enrollment)
Other Rules: View Audit Log
Click Save