Info |
---|
This article is valid for Smart ID 20.11 and later. |
This article describes how to connect to the EJBCA certificate authority from Smart ID Identity Manager. For the supported certificate authorities, see Identity Manager requirements IDM 23.10.3 - Requirements and interoperability.
Prerequisites
Expand |
---|
|
Required files and details- Address of the Certificate Management Protocol (CMP) alias' endpoint (for example, https://my.ejbca.server/ejbca/publicweb/cmp/myCmpAlias)
- Names of all the certificate profiles configured in EJBCA
- When using HMAC: Shared secret from CA config (if configured globally) or CMP config (if customized for alias)
- When using client auth: P12 file containing admin keypair and its password (for example, officer.p12)
- When using HTTPS endpoint (this is recommended and may require client cert auth): server certificate of EJBCA (for example, ejbcaserver.crt)
Plain requestsIf you need plain requests, you must also configure Certificate Manager (CM) and the CM connector for key archival and recovery. The following details are required: - Name of Identity Manager CA configuration for CM
- Name of CM recovery token procedure
- CM must have key archival token procedures with key generation supported by the the respective EJBCA profiles (for example, RSA 4096 bit)
CM must have an import CA with configured P10 import token procedure for import of EJBCA certificates Set this in the CM connector configuration file nexus_cm.properties via Code Block |
---|
caTokenProcedureImportCert=NameOfTheImportProcedure |
This import CA must have a dummy self-signed keypair and have the same subject DN as the EJBCA issuing CA.
Multiple different issuersIf there are multiple issuers, you need the following per issuer: Import CA config in CM Note |
---|
You might have to create a new certificate format file for CM, which allows you to match the subject DN of the issuing EJBCA cert in attributes and order, in case the CM's default config does not fit. See "HTTPS works with client auth but fails with HMAC" under Troubleshooting below for details. |
CM connector configuration, specifying the import token procedure EJBCA connector configuration, referencing the CM configuration as key archive
|
Step-by-step instruction
Expand |
---|
|
Create a file called ejbca.properties. There are two options: In case of HMAC, specify like this (do not specify absolute or relative paths, just the filenames):
Code Block |
---|
title | ejbca.properties (with HMAC) |
---|
| useHmac = true
# optional when using http
#serverCert = ejbcaserver.crt
# add profiles as needed
certProfiles = SOME_KEY_ARCHIVAL_PROFILE,SOME_P10_PROFILE,ANOTHER_P10_PROFILE,EJBCA_Recovery
# these are optional if we don't use key archival/recovery
keyArchive=NameOfCMConfigInPrimeForEJBCAKeyArchivalAndRecovery
ejbcaToCMCertTemplateMapping=EJBCA_Recovery=RecoveryTokenProcInCM;SOME_KEY_ARCHIVAL_PROFILE=KeyArchivalTokenProcInCM
|
Or in case of client auth, specify like this:
Code Block |
---|
title | ejbca.properties (with client auth) |
---|
| # optional, as false is default
# useHmac = false
clientCert = officer.p12
serverCert = ejbcaserver.crt
# add profiles as needed
certProfiles = SOME_KEY_ARCHIVAL_PROFILE,SOME_P10_PROFILE,ANOTHER_P10_PROFILE,EJBCA_Recovery
# these are optional if we don't use key archival/recovery
keyArchive=NameOfCMConfigInPrimeForEJBCAKeyArchivalAndRecovery
ejbcaToCMCertTemplateMapping=EJBCA_Recovery=RecoveryTokenProcInCM;SOME_KEY_ARCHIVAL_PROFILE=KeyArchivalTokenProcInCM |
- Create a ZIP file containing in its root the following files:
- always:
ejbca.properties (the name is fixed)
if using HTTPS, then also: ejbcaserver.crt (this is an example, the name can vary)
if using client auth, then also: officer.p12 (this is an example, the name can vary)
|
...
Expand |
---|
|
- Reason: You are likely using an older version of EJBCA which does not have the "View" option in addition to "Edit", which does not work on built-in profiles.
- Workaround: Clone the profile you are interested in into a temporary copy and click "Edit" on the clone to view its settings.
- Solution: Update to a newer version.
HTTPS works with client auth but fails with HMAC- Reason: Your EJBCA instance might have its HTTPS endpoints configured to require client auth on the CMP endpoints (ejbca/publicweb/cmp/*) (this might have been done via application server and/or embedded Tomcat and/or reverse proxy)
- Solution: You have the following options:
- Reconfigure EJBCA and its associated software to make client auth optional on the CMP endpoints
- Use client cert auth instead of HMAC
- Use HTTP (not recommended)
Failed import during key archivalUsing certificate templates EncHardCodedValues(P10) fail with EJBCA- Reason: The cert attributes in these templates are partially incompatible with EJBCA. For example, the e-mail address is incorrectly formatted, multiple OU attributes are not supported, etc.
- Solution: Check the log messages and adjust the attributes accordingly.
|
...
Additional information
...