PKI Practice: Building a Complete Certificate Service System (openubmc.cn)
1. Introduction
This tutorial provides a hands-on guide based on EJBCA, designed to compliance the CA/RA workflow in a demo environment. It walks through key operational steps including certificate profile creation, end entity profile configuration, approval process activation, and RA certificate issuance and download. This tutorial focuses on practical execution, making it ideal for experiments, proof-of-concept (PoC) setups, or internal demonstrations. Please note that this tutorial does not cover production-level security hardening or compliance requirements.
Objective: Master the core operations of EJBCA and complete the entire process from template configuration to certificate issuance.
2. Terms
- RA: registers end entities and reviews their identities.
- Certificate profile: presets key usages, SANs, and validity periods.
3. Experiment Environment and Prerequisites
- OS: Ubuntu 20.04 Server (installed offline)
- Software to be preset: Docker and docker-compose (apt package)
4. EJBCA Docker Deployment and Persistence
This chapter explains how to deploy the EJBCA certificate service using Docker, with a focus on ensuring persistent data storage on a dedicated drive. This setup helps prevent data loss in the event of container or virtual machine restarts. Key topics cover configuring data persistence of the internal database (H2 by default), running containers using docke-compose, and setting up remote access through appropriate configuration parameters.
4.1 Environment Setup and Proxy Configuration
Some EJBCA Docker images (such as keyfactor/ejbca-ce) need to be pulled from the public network. To ensure environment availability, configure the HTTP/HTTPS proxy of Docker Daemon.
Step 1 Configure the systemd proxy.
Docker Daemon runs under the systemd management. You need to add the following configurations to inherit the system proxy.
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
Content:
[Service]
Environment="HTTP_PROXY=http://192.168.xxx.xxx:7890"
Environment="HTTPS_PROXY=http://192.168.xxx.xxx:7890"
Environment="NO_PROXY=127.0.0.1,localhost,192.168.13.119" // Change the IP address to the host IP address of your virtual machine.
Step 2 Reload and restart Docker.
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo systemctl status docker --no-pager -l
If the output contains Active: active (running), the proxy configuration takes effect.
Step 3 Check whether the proxy has taken effect.
docker info | grep -i proxy
If the following information is displayed, the proxy has taken effect:
HTTP Proxy: http://192.168.xxx.xxx:7890
HTTPS Proxy: http://192.168.xxx.xxx:7890
4.2 Data Persistence Configuration
- Save the H2 database in files, and set the database as follows:
jdbc:h2:/mnt/persistent/ejbcadb;DB_CLOSE_DELAY=-1. - Host mount path:
/opt/ejbca-data:/mnt/persistent - Do not use
--rmto start the container. - Set the host permission:
chown -R 10001:10001 /opt/ejbca-data
📌 Note: In a formal environment, it is recommended to use external database, such as PostgreSQL or MySQL, to improve system reliability and disaster recovery capabilities.
Deployment Using Docker Compose
- Create a directory structure.
mkdir -p /opt/ejbca-compose
cd /opt/ejbca-compose
mkdir -p /opt/ejbca-data
chown -R 10001:10001 /opt/ejbca-data
- Create and compile
docker-compose.ymlin the current directory.
version: "3.3" # Use Docker Compose v3.3.
services:
ejbca: # Define the service ejbca.
image: keyfactor/ejbca-ce:latest # Use the latest EJBCA image (community-edition) provided by Keyfactor.
container_name: ejbca # Set the container name to ejbca.
hostname: myejbca.test.local # Set the internal host name of the container, which affects fields such as CN in the certificate.
environment: # Set environment variables to configure the EJBCA startup behavior.
- DATABASE_JDBC_URL=jdbc:h2:/mnt/persistent/ejbcadb;DB_CLOSE_DELAY=-1 # Use the embedded H2 database. The data is stored in the mount directory.
- TLS_SETUP_ENABLED=true # Enable automatic TLS settings (for HTTPS access).
- SMTP_DESTINATION=192.168.xx.xx # Set the SMTP email server address (for sending notification emails).
- SMTP_DESTINATION_PORT=25 # Set SMTP service port. The default value is 25. (Encryption is disabled.)
- SMTP_FROM=ejbca@example.local # Set the email sender address.
- SMTP_TLS_ENABLED=false # Do not enable STARTTLS for SMTP.
- SMTP_SSL_ENABLED=false # Do not enable SSL/TLS encryption for SMTP.
ports: # Map the container port to the host.
- "80:8080" # Map the host port 80 to the container port 8080 (HTTP).
- "443:8443" # Map the host port 443 to the container port 8443 (HTTPS).
volumes: # Mount the data volume to map the directory in the container to the host for data persistence.
- /opt/ejbca-data:/mnt/persistent # Mount the /opt/ejbca-data directory on the host to the container to persist data such as the database.
restart: unless-stopped # If the container exits abnormally, the container is automatically restarted unless you manually stop the container.
- Start the container service.:
docker-compose up -d
docker-compose logs -f
⚙️ You can use Compose to easily manage configuration versions, facilitating team collaboration and version recovery.
4.4 Remote Access Configuration
- Set the container's hostname in advance, which affects CN of the TLS certificate.
hostname: myejbca.test.local
4.5 Certificate Trust Management
After downloading the super administrator certificate ·, double-click to import it.
4.6 Login Process Summary
- Run
docker-compose logs -fto search for SuperAdmin URL and one-time password in the container logs.
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) * *
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) * URL: https://myejbca.test.local:443/ejbca/ra/enrollwithusername.xhtml?username=superadmin *
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) * Password: urAMy0He5c/hHy+DYyDFNy4E *
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) * *
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) * Once the P12 is downloaded, use "urAMy0He5c/hHy+DYyDFNy4E" to import it. *
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) * *
ejbca | 2025-08-05 09:11:31,656+0000 INFO [/opt/keyfactor/bin/start.sh] (process:1) ******************************************************************************************************
- Access the URL, enter the password, set the export password, and download the
.p12certificate. - Import the certificate and access https://myejbca.test.local/ejbca/adminweb.
- If the system displays a message indicating that the client certificate is not provided, check whether the certificate is successfully imported, the proxy is disabled, and the domain name is correctly resolved.
✅ So far, the EJBCA deployment, persistence, and management login process is completed.
Important Notes (Must Be Followed)
✅ You must add myejbca.test.local to the hosts file or set up a local DNS server. Otherwise, the browser may fail to resolve the domain name.
✅ The default algorithm for the super administrator certificate is DILITHIUM2, which may vary by version. However, Windows probably cannot recognize DILITHIUM2. To ensure compatibility, it is advised to switch the algorithm to RSA 4096.
✅ No proxy should be enabled. Otherwise, EJBCA may fail to correctly process client certificate authentication.
✅ Ensure that the Windows/macOS/Linux certificate is correctly imported to avoid the "No client certificate was presented" error.
✅ It is recommended that you use the Chrome browser in Incognito mode for the first time to avoid the "No client certificate was presented" error caused by cache problems.
5. Initial CA Creation and Certificate Level Setup
5.1 Managing Certificate Profiles
- Log in to the EJBCA management console.
- Choose CA Functions > Certificate Profiles.
5.2 Creating a Certificate Profile
Method 1: Cloning an Existing Profile
- Find an appropriate profile (for example, ENDUSER) in the list.
- Click Clone, enter the new name, and save the profile.
Method 2: Manually Creating a Profile
- Click Add and enter the name. The editing page is displayed.
- Set necessary information as required, including Key Usage, Extended Key Usage, validity period, and Subject DN.
- Save the settings and return to the list for check.
5.3 Creating a Crypto Token
- Choose CA Functions → Crypto Tokens。
- Click Create new and enter the following information:
- Name:Enter the name of your crypto token.
- Type:Select
SOFT。 - Auto-activation(Optional):If selected, the crypto token can be automatically activated.
- Allow export of private keys:Select
Allowif you want to export the private key. - Authentication Code:Enter the authentication code and confirm it.
dd if=/dev/random bs=1 count=128 2>&1| sha256sum | awk '{print $1}
- Save the settings and ensure that the status is Active in the list。
5.4 Generating a Key Pair
- Access the xCrypto Token details page.
- Enter the key name, for example,
signKey, inCrypto Token currently does not contain any key pairs. - Select a key algorithm, for example,
RSA 4096. - Click Generate new key pair.
Note: The default profile cannot be modified. You need to clone it before creating a new one.
5.5 Creating a CA
- Choose CA Functions → Certification Authorities。
- The default
ManagementCA (Active)is displayed in the list on the top. You do not need to select it。 - Scroll to the
Add CAarea at the bottom of the page.- Enter the new CA name, for example,
DemoCA, in the text box. - Click Create… on the right. The CA configuration wizard is displayed.
- Enter the new CA name, for example,
- Enter necessary fields on the Create CA page.
- Click Create at the bottom to save the CA. If the configuration is correct, the CA list is displayed and the
DemoSubCA (Active)status is displayed. - (Optional) If you want to manually upload the certificate issued by the root CA, select the new CA in the list and select Import CA certificate… to upload the chain file.
The intermediate CA is created. You can use it to issue end-entity certificates.
5.6 (Example) Creating a Root CA
1️⃣ CA type and key configuration
| Parameter | Description |
|---|---|
| CA Type | ✅ X.509 CA; Standard X.509 CA |
| Crypto Token | ✅ Select the created Crypto Token, for example, demoCrypto. |
| Signing Algorithm | ✅ SHA256WithRSA; Secure signature algorithm |
| Alternative Signing Algorithm | ❌ None; No backup signature algorithm is required. |
| Key Sequence Format | ✅ Numeric (0-9); Serial number of the CA certificate |
| Key Sequence | ✅ 00000 ; Initial serial number, which can be changed. |
| Description | ✅ Root CA description, including the purpose and management unit. |
2️⃣ Certificate policies (Directives)
| Parameter | Description |
|---|---|
| Enforce unique public keys | ✅ Enforces the public key to be unique. |
| Enforce key renewal | ❌ Not required for the root CA. |
| Enforce unique DN | ✅ Ensures DN uniqueness (applicable to small-scale CAs). |
| Enforce unique Subject DN SerialNumber | ❌ Applicable only to large-scale CAs (not required for CAs with fewer than 20 certificates). |
| Use Certificate Request History | ❌ Records certificate request history (not required for the root CA). |
| Use User Storage | ✅ Stores user information. |
| Use Certificate Storage | ✅ Stores issued certificates. |
3️⃣ CA certificate data
| Parameter | Description |
|---|---|
| Subject DN | ✅ CN=test EnterpriseIT Root CA |
| Signed By | ✅ Self Signed; Root CA must be self-signed. |
| Certificate Profile | ✅ ITROOTCA_profile; Select the cloned root CA. This parameter can be modified. |
| Validity | ✅ 20y; The certificate validity period is 20 years. |
| Subject Alternative Name | ❌ Not required for the root CA. |
| Certificate Policy OID | ❌ (Optional) By default, this parameter is left blank. |
| Use UTF-8 in policy notice text | ✅ Ensures international character support. |
| PrintableString encoding in DN | ❌ Do not select this parameter to avoid affecting internationalization. |
| LDAP DN order | ✅ Ensures that DN is sorted according to the LDAP specifications. |
| Serial Number Octet Size | ✅ 20; 20-byte is recommended to ensure uniqueness. |
| Name Constraints, Permitted | ❌ Disabled for the root CA. Leave this parameter empty. |
| Name Constraints, Excluded | ❌ Disabled for the root CA. Leave this parameter empty. |
4️⃣ CRL configuration
| Parameter | Description |
|---|---|
| Microsoft CA Compatibility Mode | ❌ Disabled for the root CA. This parameter is applicable only to Windows AD CS. |
| Authority Key ID | ✅ Enabled and marked as Critical. This parameter is used to identify the CRL issuer. It is recommended that it be enabled for the root CA and intermediate CA. |
| CRL Number | ✅ Enabled and marked as Critical. This parameter is used to ensure that the CRL version is unique. It is recommended that it be enabled for the root CA and intermediate CA. |
| Issuing Distribution Point on CRLs | ❌ Disabled for the root CA. This parameter is applicable only to large-scale CAs with hierarchical CRL structures. |
| CA issuer URI | ❌ Left empty. Users provide this URI during final certificate download stage. |
| Keep expired certificates on CRL | ❌ Disabled for the root CA. Determine if this parameter should be enabled for the intermediate CA based on actual requirements. After this parameter is enabled, the certificate is still displayed in the CRL even if it expires. |
| Use CRL partitions | ❌ Not required for the root CA due to its low load. This parameter is applicable to CA that manages a large number of certificates. |
| CRL Expire Period | ✅ 30d. Set the period to a longer one for the root CA and to a shorter one for the intermediate CA. |
| CRL Issue Interval | ✅ 7d. Periodically updates the CRL. It is recommended that the active CA use 7d. |
| CRL Overlap Time | ✅ 12h. The old CRL and new CRL overlap for 12 hours to prevent certificate verification failures. |
| Delta CRL Period | ❌ 0m. Delta CRL is not used for the root CA. It is enabled only for CAs that require high real-time performance. |
| Generate CRL Upon Revocation | ❌ Disabled for the root CA, and enabled for the intermediate CA as required. A new CRL is generated immediately after a certificate is revoked. |
| Allow changing revocation reason | ✅ Enabled. This parameter allows to change the reason for certificate revocation. It is applicable to all CAs. |
| Allow invalidity date | ✅ Enabled. This parameter allows to set the certificate invalidity date. It is applicable to all CAs. |
5️⃣ Approval settings
| Parameter | Description |
|---|---|
| Add/Edit End Entity | ❌None. Root CA does not manage end entities. |
| Key Recovery | ❌None. Root CA does not provide key recovery. |
| Revocation | ❌None. Root CA rarely revokes its own certificates. |
| CA Service Activation | ❌None. Root CA is manually activated. |
6️⃣ Other data
| Parameter | Description |
|---|---|
| Validators | ✅ Finish User. Enable the certificate verification policy. |
| CMP RA Authentication Secret | ❌ Leave this parameter empty. This parameter needs to be configured only when the CMP protocol is used. |
| Monitor if CA active (healthcheck) | ✅ Activate. Enable CA running monitoring, which applies to all CAs. |
| Request Processor | ❌ None. Root CA usually does not need to process external requests. |
7️⃣ Creation/Renewal of Externally Signed CAs
| Parameter | Description |
|---|---|
| Renew CA | ❌ Creates a new root CA instead of regenerating the key and re-signing the existing CA. This avoids problems caused by root CA certificates with the same name. |
| CA Chain Certificates | ✅ Uploads the certificate chain file (in PEM/DER format) only when the CA is signed externally. If the root CA has been installed locally, you do not need to upload the file. |
8️⃣ CA Creation
After confirming all parameters are correct, click Create to generate a CA.
1. Download and verify the root CA certificate.
Run the following OpenSSL commands to verify the certificate format and validity:
# Verify PEM certificates.
openssl x509 -in rootca.pem -text -noout
# Verify DER certificates.
openssl x509 -in rootca.der -inform DER -text -noout
# Check the certificate's SHA256 fingerprint information.
openssl x509 -noout -fingerprint -sha256 -in rootca.pem
# Verify the self-signed certificate validity.
openssl verify -CAfile rootca.pem rootca.pem
2. Deploy and verify the CRL.
If the CRL URL is configured, run the following command:
# Verify the CRL file.
openssl crl -in rootca.crl -text -noout
Ensure that the CRL can be accessed through the web.
🚀 The root CA has been created and can be used to issue intermediate CAs! 🎉
5.7 Creating an Intermediate CA Certificate
1️⃣ CA type and key configuration
| Parameter | Description |
|---|---|
| CA Type | ✅ X.509 CA; Standard X.509 CA |
| Crypto Token | ✅ Select the created Crypto Token, for example, demoCrypto. |
| Signing Algorithm | ✅ SHA256WithRSA; Secure signature algorithm |
| Alternative Signing Algorithm | ❌ None; No backup signature algorithm is required. |
| Key Sequence Format | ✅ Numeric (0-9); Serial number of the CA certificate |
| Key Sequence | ✅ 00001; Initial serial number, which should be different from that of the root CA. |
| Description | ✅ Intermediate CA description, including the purpose and management unit. |
2️⃣ Certificate policies (Directives)
| Parameter | Description |
|---|---|
| Enforce unique public keys | ✅ Enforces the public key to be unique. |
| Enforce key renewal | ✅ Recommended to be enabled for intermediate CAs to ensure security. |
| Enforce unique DN | ✅ Ensures the DN to be unique. |
| Enforce unique Subject DN SerialNumber | ❌ Not required when the number of certificates is fewer than 20. |
| Use Certificate Request History | ✅ Records certificate request history. |
| Use User Storage | ✅ Stores user information. |
| Use Certificate Storage | ✅ Stores issued certificates. |
3️⃣ CA certificate data
| Parameter | Description/Example Value |
|---|---|
| Subject DN | ✅ CN=test Intermediate CA |
| Signed By | ✅ test EnterpriseIT Root CA The intermediate CA must be signed by the root CA. |
| Certificate Profile | ✅ INTERMEDIATE_CA_profile Configured for the intermediate CA after cloning. |
| Validity | ✅ 10y Generally, the validity period is 10 years, which is shorter than that of the root CA. |
| Subject Alternative Name | ❌ Not required for the intermediate CA. |
| Certificate Policy OID | ❌ Leave this parameter empty by default or enter a value as required. |
| Use UTF-8 in policy notice text | ✅ Ensures international character support. |
| PrintableString encoding in DN | ❌ Do not select this parameter to avoid affecting internationalization. |
| LDAP DN order | ✅ Arranges the DN according to LDAP specifications. |
| Serial Number Octet Size | ✅ 20 20-byte is recommended. |
| Name Constraints, Permitted | ❌ Disabled by default. Leave this parameter empty. |
| Name Constraints, Excluded | ❌ Disabled by default. Leave this parameter empty. |
4️⃣ CRL configuration
| Parameter | Description |
|---|---|
| Microsoft CA Compatibility Mode | ❌ Disabled, typically. This parameter is used only in the Windows AD environment. |
| Authority Key ID | ✅ Enabled and marked as Critical. |
| CRL Number | ✅ Enabled and marked as Critical. |
| Issuing Distribution Point on CRLs | ❌ Disabled, typically. |
| CA issuer URI | ❌ Leave this parameter empty or enter a download address as required. |
| Keep expired certificates on CRL | ❌ Recommended to be enabled for the intermediate CA and retain expired certificates. This parameter is disabled currently; otherwise, the CRL size will become large. |
| Use CRL partitions | ❌ Not required, typically. |
| CRL Expire Period | ✅ 7d 7-day is recommended to ensure timely update. |
| CRL Issue Interval | ✅ 1d The CRL is issued every day to ensure timely update. |
| CRL Overlap Time | ✅ 12h The new CRL overlaps with the old CRL for 12 hours to ensure smooth transition. |
| Delta CRL Period | ❌ 0m Delta CRL is not used. |
| Generate CRL Upon Revocation | ✅ Enabled. The CRL is updated immediately after the certificate is revoked. |
| Allow changing revocation reason | ✅ This parameter allows to change the reason for certificate revocation. |
| Allow invalidity date | ✅ This parameter allows to set the certificate invalidity date. |
5️⃣ Default CA defined validation data
| Parameter | Description |
|---|---|
| Default CRL Distribution Point | ❌ Leave this parameter empty or enter a value as required to distribute CRLs. |
| Default CRL Issuer | ❌ Leave this parameter empty. Typically, this parameter does not need to be set. |
| Default Freshest CRL Distribution Point | ❌ Leave this parameter empty. Typically, this parameter does not need to be set. |
| OCSP Service Default URI | ❌ Leave this parameter empty or enter an OCSP address as required. |
| CA Issuer Default URI | ❌ Leave this parameter empty or provide a URI later. |
6️⃣ Approval settings and other data
Currently, only None is available for approval settings, indicating that no additional approval process is required. If it is required, check the global approval policy Supervision Functions of EJBCA.
| Parameter | Description |
|---|---|
| Validators | ✅ Finish User. Enable the certificate verification policy. |
| CMP RA Authentication Secret | ❌ Leave this parameter empty. This parameter needs to be configured only when the CMP protocol is used. |
| Monitor if CA active (healthcheck) | ✅ Activate. Enable running monitoring. |
| Request Processor | ❌ None. Generally, external request processing is not required. |
7️⃣ Intermediate CA creation
After confirming all parameters are correct, click Create to generate a CSR.
Submit the CSR to the root CA for signature, download the signed certificate, and verify it.
openssl x509 -in intermediate_ca.pem -text -noout
openssl verify -CAfile rootca.pem intermediate_ca.pem
🚀 The intermediate CA has been created and can be used to issue end entity certificates! 🎉
6. RA Common User Creation and Permission Configuration
6.1 Creating an RA Role
- Access the RA Web page and choose Role Management > Roles > Create New Role.
Role Management →Roles →Create New Role - Enter role information.:
Field Recommended Value Namespace No namespace Role name test RA Users - Set the permissions for Certificate Authorities.:
- Select a CA, for example,
Intermediate CAor Root CA, from the Available list and clickAdd.
- Select a CA, for example,
- Set the permissions for End Entity.(Recommended):
- ✅ Create end entities
- ✅ Create certificates
- ✅ ...by using username and password
- ✅ ...by using a request ID
- ✅ View end entities and certificates
- Set the permissions for End Entity Profiles.:
- Select
EMPTYfrom the Available list and clickAdd.
- Select
- Click
Addto save the created role.
6.2 Creating an RA Commer User (End Entity)
- Access the EJBCA Admin Web page and choose RA Functions > Add End Entity.
- Enter the user details.
Field Recommended Value End Entity Profile EMPTY Username test_signuser Password 123 Confirm Password 123 Batch generation Not selected E-mail cert-user@example.com CN test RA user S1 O test C CN Certificate Profile ENDUSER CA test Intermediate CA Token P12 file - Click Add.
End Entity is created.
6.3 Downloading the User Certificate
- Access the RA Web page and choose Enroll > Use Username.
- Use the created username and password to log in.
- Username:
test_signuser - Password:
123
- Username:
- Select a key algorithm after logging in.
- Select the
RSA 4096algorithm, and generate and download the.p12user certificate.
- Select the
6.4 Adding a User to the RA Role
- Access the RA Web page and choose Search > End Entities.
- Copy the CN of the certificate created earlier.
- Access the RA Web page and choose Role Management > Roles > Members > Add Role Member.
- Enter the information about the role member.
Field Recommended Value Role test RA Users Token Type Certificate CA test Intermediate CA Match with CN Common Name Match Value Paste the copied certificate CN. Description RA common user - Click Add to add the role member.
- Restart the EJBCA service for the permission to take effect (recommended).
- docker restart ejbca
6.5 Logging In to the RA WebUI
- Non-administrator roles import the downloaded · certificate to the browser.
- Access the RA Web page for automatic authentication and login.
- Perform authorized RA operations, such as creating and viewing certificates.
6.6 Important Notes (Must Be Followed)
✅ You are advised to use the Chrome browser in incognito mode for the first login to quickly start the verification and avoid the error "No OAuth providers configured. Please log in using a valid certificate" caused by cache problems.
✅ Use HTTPS to access, for example, https://192.168.xxx.xxx/ejbca/ra/, to avoid the error "No OAuth providers configured. Please log in using a valid certificate."
7. Certificate Profile Settings
This section describes the meanings and recommended usage of the Certificate Profile configuration items in the EJBCA. It is applicable to certificate issuance requirements for common devices such as HTTPS, web, device, and client.
7.1 Basic Information
| Configuration Item | Description |
|---|---|
| Certificate Profile ID | Unique identifier of the profile in the database, which is used only for internal identification. |
| Type | Available end entity, subordinate CA, and root CA. |
| Available Key Algorithms | Available key algorithms, such as RSA, ECDSA, Ed25519, and DILITHIUM. |
| Available ECDSA curves | Available ECDSA curves. No curve is enabled currently. |
| Available bit length | Key size supported (for RSA), such as 2048 and 4096. |
| Signature algorithm | Signature hash algorithm used for certificate issuance, for example, SHA3-256withRSA. |
| Alternative Signature | Whether to enable the alternative signature algorithm, such as ECDSA and EdDSA. |
| End date or end date of the certificate | Default validity period. For example, "2y" indicates two years. |
| Validity Offset | Offset of the issue date. The start time can be set forward or backward. |
| Expiration Restrictions | Maximum expiration time, which is used for compliance control. |
| Profile Description | Certificate profile description, which is used to note the purpose (for example, "terminal device certificate"). |
7.2 Permissions Control
| Configuration Item | Description | Recommended Setting |
|---|---|---|
| Allow Validity Override | Allow the default validity period to be overwritten when a certificate is issued. | ✅ which is used when the validity period needs to be manually adjusted. |
| Allow Expired Validity End Date | Allow the end time to be set to an expired time (for test or audit). | ✅ (for debugging) |
| Allow Extension Override | Allow the extension fields in the CSR to overwrite the predefined extension fields in the profile. | ❌ Enabling this function can harm profile uniformity and create potential risks. |
| Allow certificate serial number override | Allow the certificate serial number to be customized during issuance. | ❌ Enable this function only under specific circumstances (for example, for certificate cloning and replacement). |
| Allow Subject DN Override by CSR | Allow the subject information (such as CN/O) in the CSR to overwrite the profile configuration. | ✅ which is applicable to the automatic issuance process. |
| Allow Subject DN Override by End Entity Information | Allow the subject field to be specified based on the end entity information (user input). | (Recommended) ✅, which provides high flexibility. |
| Allow Key Usage Override | Allow the keyUsage field in the CSR to overwrite the profile configuration. | ❌ Enabling this function creates inconsistencies that compromise security. |
| Allow Backdated Revocation | Allow the revocation time to be set to a historical time for retrospective revocation. | ✅ which is required in some audit/compliance scenarios. |
| Use Certificate Storage | Enable the certificate to be stored in the database. This item must be enabled unless it is used for special offline purposes. | ✅ |
| Store Certificate Data | Store the complete original certificate data (used with OCSP/CRL). | ✅ It is recommended that this function be enabled together with the storage function. |
✅ Suggestion: Keep profiles consistent in the production environment. Disable override permissions unless needed to stop CSR or End Entities from making unauthorized changes.
7.3 X.509v3 Extension—Basic Information
| Extension Item | Description | Recommended Setting |
|---|---|---|
| Basic constraints | Must be a CA certificate (the value must be FALSE for end entity certificates) | ✅ Enabled; key setting |
| CA key identifier | Information about the CA that issues the certificate. | ✅ Enabled |
| Subject key identifier | Unique ID of the certificate. | ✅ Enabled |
7.4 X.509v3 Extension—Key Usage
| Item | Description |
|---|---|
| digitalSignature | Used for signature verification, such as identity authentication and code signature. |
| nonRepudiation | Indicates that the signature is non-repudiable (legal scenario). |
| dataEncipherment | Used to encrypt non-key data. |
| keyEncipherment | Used to encrypt key materials, such as symmetric keys. |
| keyAgreement | Key negotiation protocol (such as DH) |
| cRLSign | Used by the CA to sign CRLs. |
| keyCertSign | Used by the CA to sign certificates. |
| encipherOnly | Used with keyAgreement (only for encryption). |
| decipherOnly | Used with keyAgreement (only for decryption). |
| Forbid encryption usage for ECC keys | Forbids encryption usage for ECC keys. |
7.5 X.509v3 Extension—Extended Key Usage
| Extended Key Usage | Description |
|---|---|
| TLS client | TLS authentication on the client |
| TLS server | TLS authentication on the server |
| EAP over LAN (EAPOL) | Enterprise identity authentication |
| EAP over PPP | Point-to-Point Protocol (PPP) identity authentication |
| ETSI TSL Signing | ETSI TSL signing |
| ICAO Deviation List Signing | ICAO signing |
| ICAO Master List Signing | ICAO primary list signing |
| Intel AMT management | Dedicated to Intel management certification |
| Internet Key Exchange for IPsec | IPsec key exchange |
| Kerberos Client Authentication | Kerberos client authentication |
| Kerberos KDC | Kerberos key center |
| MS CA Key Exchange | Microsoft CA key exchange |
| MS Commercial Code Signing | Microsoft commercial code signing |
| MS Document Signing | Microsoft document signing |
| MS EFS Recovery | Microsoft EFS recovery |
| MS Encrypted File System | Microsoft encrypted file system |
| MS Individual Code Signing | Microsoft individual code signing |
| MS Smart Card Sign-in | Microsoft smart card login authentication |
| OCSP Issuer | Online Certificate Status Protocol (OCSP) signing certificate |
| PDF Signing | PDF signing |
| PIV Card Authentication | PIV card authentication |
| RFC9336 Document Signing | RFC9336-compliant document signing |
| SCVP Client | Simplified Certificate Verification Protocol (SCVP) client |
| SCVP Server | SCVP server |
| SIP Domain | VoIP/SIP domain name authentication |
| SSH Client | SSH client authentication |
| SSH Server | SSH server authentication |
| codeSigning | Software/Driver signing |
| Any EKU | Common EKU support |
| emailProtection | S/MIME email signing/encryption |
| clientAuth | TLS client authentication |
| timeStamping | Timestamp signing |
| serverAuth | Server identity authentication (HTTPS, etc.) |
7.6 Name Extension
| Item | Description | Suggestion |
|---|---|---|
| Subject Alt Name | IP address, DNS, and Uemail can be used as certificate identifiers. | ✅ Enabled |
| Issuer Alternative Name | Additional CA name. Optional | Optional |
| Name Constraints | Constraints for subject namespaces. | Optional (used in high-security scenarios) |
7.7 Validation Data
| Item | Description | Suggestion |
|---|---|---|
| CRL Distribution Point | CRL URL | ✅ Enabled; key setting |
| Delta CRL(Freshest CRL) | Incremental CRL | Enable on demand |
| Authority Information Access (AIA) | OCSP/CA information | ✅ |
7.8 Private Key Validity Period
| Item | Description |
|---|---|
| Start Offset | Start offset time of the private key |
| Period Length | Validity period of the private key (independent of the certificate validity period) |
7.9 ETSI Compliant Extensions (Typically for High-compliance PKI Use Cases)
| Item | Description |
|---|---|
| Certifications Statement | Identifies certificates used for legal or compliance purposes. |
| Assured validity | Ensures the validity of short-term certificates. |
7.10 Other Extensions
| Extension | Usage |
|---|---|
| OCSP No Check | Disables OCSP check (useful only for OCSP responders). |
| Microsoft Profile | Value Special extensions for Windows AD integration |
| CA/B Forum OID | Identifier extension for CA/B-compliant organization |
7.11 Approval Settings and Additional Fields
| Configuration Item | Description |
|---|---|
| Add/Edit End Entity | Bound approval process |
| Key Recovery | Whether key recovery is supported (for example, for backup and restoration) |
| Revocation Approval | Whether approval is required for revocation |
| CN Suffix | A character string automatically added to the end of Subject CN |
| Subject Subset Restriction | Restriction on the Subject fields that can be used |
7.12 CA & Release Settings
| Item | Description |
|---|---|
| Available CA | CA that can use the certificate profile |
| Publisher | Publishing to LDAP, databases, or external services |
| Single Certificate Limit | Whether an end entity can have only one valid certificate |
| Account Binding Namespace | Device account binding (for example, IoT) |
To configure the code signing certificate profile, adjust the keyUsage and extendedKeyUsage fields.
📌 You are advised to create different profiles for different applications (such as VPN, HTTPS, code signing, and client authentication) to facilitate management and compliance control.
8. Approval Configuration and Management
8.1 Creating an Approval Profile (Approval Configuration)
- Choose Watchdog > Approval Profiles.
- Type a name (for example, test) at the bottom and click Add.
- Click Edit in the list to enter the detailed settings.
8.2 Basic Parameter Settings
| Field | Suggestion/Example |
|---|---|
| Approval Profile Type | Accumulative Approval Partitioned Approval (can be used in cross-department cases) |
| Request Expiration Period | 8h (The request will be voided if not approved within the expiration period.) |
| Approval Expiration Period | 8h (Re-approval is required after the expiration period.) |
| Max Extension Time | 0d (The period cannot be extended.) |
| Allow Self Approved Request Editing | Deselected (Self-approval is prohibited in production.) |
8.3 Approval Steps
- Set
Number of Required Approvals.- Development/Test:
1(1-of-1). - Production/Sensitive operations:
2(2-of-2) or partitioned approval.
- Development/Test:
- Notification email:
Notification message email recipient:approval-admin-group@example.org supervisor@example.orgNotification message email sender:no-reply@192.168.xxx.xx- Example theme profile:
[AR-${approvalRequest.ID}-${approvalRequest.STEP_ID}-${approvalRequest.PARTITION_ID}] Approval Request - Variables that can be referenced in the body:
${approvalRequest.TYPE},${approvalRequest.REQUESTOR}, and${approvalRequest.WORKFLOWSTATE}.
8.4 Binding to a Specific Action
End Entity Profile:
Choose CA Functions > End Entity Profiles >
Common options: Add/Edit End Entity and Key Recovery (if enabled)
Certificate Profile:
Choose CA Functions > Certificate Profiles >
Sensitive administrator actions: It is recommended that 2-of-2 or partitioned approval be used for intermediate CA change and revocation.
8.5 Testing and Verification
- Use a common RA account to start an operation (for example, creating an end entity) that requires approval on the RA WebUI.
- Choose Inspector Function > Approvals to check the approval queue, and use another approver account to complete the approval.
- Confirm that the operation was executed automatically and the email notification was received successfully.
8.6 FAQs
- No email received: Check the SMTP configuration, firewall, and recipient name, and view container logs.
- Stuck in pending status: Number of Required Approvals is set too high or the approver does not have the permission.
- Can be self-approved: Allow Self Approved Request Editing is selected by mistake. This function should be disabled in production.
- Expired: Request/Approval Expiration is set too short. The value can be changed to 8h to 24h.
9. End Entity Profile Settings
Path: RA Functions > End Entity Profiles. The End Entity Profile defines the fields that can be populated, specifies which are mandatory or modifiable, and determines the default Certificate Profile, CA, and Token.
9.1 Creating and Opening an End Entity Profile
- Choose RA Functions > End Entity Profiles.
- Enter the profile name (for example, test) at the bottom and click Add Profile.
- Select the profile from the list and click Edit Endpoint Entity Profile.
9.2 Basic Information (Username/Password/Email)
Generally, the username/password does not need to be specified in the profile. The profile only sets the rules and methods. The username/password/enrollment code can be specified during end entity creation or application submission.
Recommended practice
- Username: Select Auto-generated (for auto and batch operations), or manually specify the username when creating an end entity.
- Password (or Enrollment Code): Select Required to use the one-off Enrollment Code. Enter the specific value when creating an end entity or submitting the application on the RA.
- Minimum password strength/length: Retain the policy (for example, the length is greater than or equal to 8), but do not enter the specific password.
- Maximum number of failed login attempts: Set the number as needed. Select Modifiable if you need to temporarily change this limit.
- Batch generation: Disable this function. Avoid storing enrollment codes in plaintext.
- E-mail: Set it based on the Required/Modifiable setting. It is used for notification and identification.
Impact of different application paths on username/password
- RA Web > Enroll > Use Username: Username and Password/Enrollment Code are specified when an end entity is created. The user uses this account to log in to the system and obtain the certificate.
- RA Web > Enroll > Use Request ID: The system allocates Request ID. Password/Enrollment Code is set when the request is created. The applicant uses the ID and code to obtain the certificate.
- User Generated (CSR): Token=User Generated. Retain Required to generate a one-off code. The applicant uses the CSR and code to complete the issuance.
Directives
- Reverse Subject DN and Subject Alt Name Checks: You can also deselect this option.
- Allow merge DN for all interfaces: Generally, this option is not selected. It is selected only when DN combination is required for multiple APIs.
- Allow multi-value RDNs: This option is selected only when special requirements are met. (It is disabled by default, which is more secure.)
9.3 Subject DN Attributes—(Setting by Users)
Available attributes are displayed on the left, and selected attributes are displayed on the right. Add the required fields to the right and set Required/Modifiable/Validation for each field.
Common recommendations (client/general):
| Field | Suggestion |
|---|---|
| CN, Common name | Required; Modifiable is determined by the RA. |
| emailAddress, E-mail address in DN | Optional. To bind with the email system, set it to Required. |
| O, Organization / OU, Org. Unit | Service-dependent. You are advised to disable Modifiable to prevent arbitrary input. |
| C, Country | The value is fixed to CN or the country where the user is located. Generally, the value cannot be changed. |
If stricter verification is required, you can specify a regular expression or format rule in Validation.
9.4 Other Subject Attributes—(Setting by Users)
Subject Alternative Name (SAN) :
- Client certificate: RFC 822 Name (e-mail address) (same as the account email address)
- Server certificate: DNS Name and IP Address (added by domain name/IP address)
- Device certificate: OtherName (written into the device ID/OID)
(Optional) **Subject Directory Attributes:
Attributes such as Date of birth (YYYYMMDD) are used only for archiving or compliance needs. You are advised not to enable multiple directory attributes.
Addition method: Select an item in the Other Subject Attributes area and click Add. You can also mark it as Required/Modifiable if supported by the interface.
9.5 Main Certificate Data
| Field | Suggestion/Description |
|---|---|
| Default Certificate Profile | Select a certificate profile (for example, ENDUSER or SERVER). |
| Available Certificate Profiles | Select only the allowed profiles. |
| Default CA / Available CAs | Specify the CAs that can issue the certificate. Note: Changing the available CAs impacts which roles can access the profile. |
| Default Token / Available Tokens | P12 file (downloaded directly on the RA) or User Generated (CSR created by the user) |
9.6 Other Certificate Data
- Custom certificate serial number: disabled by default
- Certificate Validity Start/End Time: controlled by Certificate Profile by default. If a temporary certificate is required, enable this item and select Modifiable.
- Name Constraints (Permitted/Excluded): used for intermediate CAs. Generally, this item is disabled in end entity profiles.
- Custom certificate extension data / ETSI PSD2 QC Statement / CA/B Forum Organization Identifier: Enable it as required for compliance.
9.7 Other Data/Restrictions
| Field | Suggestion |
|---|---|
Number of allowed requests | 1 (preventing repeated issuance) |
Allow renewal before expiration | Example: 30 days. -1 indicates no limit. |
Revocation reason to set after certificate issuance | Active by default (typically left unchanged) |
Redact Subject Name from logs | Enable this feature only for strict privacy or compliance needs. |
Send Notification | Enable it when needed for SMTP settings. |
9.8 Saving and Authorization
- Click Save.
- Choose RA Web > Role Management and check that the related role has been authorized to use the end entity profile (visible/creatable).
- Choose Search > End Entities and use the profile to create a test user to check the following:
- Check whether the DN/SAN is added to the database according to the rules.
- Check whether the certificate uses the expected Certificate Profile/CA/Token.
- Check whether the download or import is successful (P12/PEM/CSR process).
10. Applying for an End Entity Certificate as an RA Common User
Choose RA Web → Enroll。
By default, you are advised to use By the CA (the CA generates the key) for stability and fewer errors; no CSR is needed.
10.1 Path and Prerequisites
- Profiles have been prepared in End Entity Profiles (Section 9) and Certificate Profiles. Users have access permission.
- When approval is enabled (see Section 8), submissions go into the pending queue. Certificates are issued once they are approved.
10.2 Recommended: By the CA (No CSR Required)
- Choose Enroll > Make New Request.
- Select Certificate Type (End Entity Profile) and Certificate subtype (Certificate Profile).
- Set Keypair generation to By the CA.
- Expand Provide request info and enter Subject DN / SAN (such as CN, email address, DNS, and IP address) as required.
- Download the
*.p12file.
10.3 Optional: Provided by user (Uploading a CSR)
This option is used only when the key must be generated on the client or server for reasons like compliance, using an HSM or dedicated device, or migrating an existing key.
- Generate a private key and CSR locally.
- Select Provided by user and paste the complete CSR, including
BEGIN/END CERTIFICATE REQUEST, into the text box. - Submit the CSR and download the certificate as prompted (the private key is not included).
10.4 Approval Association and Notification
- If a profile is bound to an Approval Profile, the profile will be pending approval upon submission. After the profile is approved, the profile will be automatically issued or available for download.
- The email subject and body comply with the notification requirements in Section 8.
10.5 FAQs
- Field failure: The DN/SAN is inconsistent with that in the profile. Adjust the DN/SAN according to Section 9.
- Unable to download P12: Download is blocked by the browser, or password policies conflict. Use another browser or check the password length and character set.
- CSR rejected: The Subject/SAN in the CSR conflicts with that in the profile. Rebuild the CSR using the profile or use By the CA.
- Approval suspended: The number of approvers does not meet the requirement, or the approver does not have the required permission. Check the status under Monitor > Approvals.
【版权声明】Copyright © 2026 openUBMC Community。本文由openUBMC社区首发,欢迎遵照CC-BY-SA 4.0协议规定转载。转载时敬请在正文注明并保留原文链接和作者信息。
【免责声明】本文仅代表作者本人观点,与本网站无关。本网站对文中陈述、观点判断保持中立,不对所包含内容的准确性、可靠性或完整性提供任何明示或暗示的保证。本文仅供读者参考,由此产生的所有法律责任均由读者本人承担。