Info |
---|
This article is valid for Smart ID Identity Manager 24.R1 or later. |
Here you can find information on common error scenarios related to the sign and encrypt engine and now to solve them.
!!!!!THIS NEEDS A THOROUGH REWRITE !!!!!
Note |
---|
Before doing any repair procedures, a backup of the IDM applications, config files and database is recommended. |
Table of Contents |
---|
...
Error Message(s) Logged On Startup: Compromised key detected ...
...
This means that one or more demo keys (considered compromised and unfit for productive use) are still in use. Each message indicates the offending descriptor and version from the config xmlXML.
For replacing these keys see Bootstrap the sign and encrypt engine in Identity Manager .
Warningnote |
---|
Replacing the EncryptedFields descriptor's key requires re-encryption of existing secrets via the batch_secretfieldstore_change_encryption_key tool. Replacing the ObjectHistorySigner descriptor's key requires re-signing existing history entries via the batch_re-sign_history tool. Replacing the ConfigZipSigner descriptor's key means any previously exported encrypted config ZIP files cannot be decrypted anymore (versioning to enable decryption with historical keys is not yet supported here). |
...
This means that the config xml XML for the sign and encrypt engine references a file that does not exist at the given location.
All files referenced via the location "classpath:
" usually need to be inside the WEB-INF\classes\ folder of the web application.
In IDM versions before 24.R1 that folder did contain all demo keys, which were since removed. Furthermore, the engineSignEncryptConfig.xml shipped in WAR files of 24.R1 and above references additional P12 files not used or not bootstrapped previously (by default we use a dedicated P12 file per descriptor, instead of sharing them).
So the above error can happen for example in these scenarios:
Scenario A: Tomcat WAR deployment created without bootstrapping
See Bootstrapping Development And Test Systems for instructions on how to create and configure the bootstrap CA and P12 files.
Scenario B: Tomcat WAR deployment upgraded from a bootstrapped 23.10.x or lower version
In this case most likely only sign.p12 and hybridEncKeypair.p12 were bootstrapped and you need to create the remaining files.
There are multiple options:
Option 1: Re-Bootstrap to add missing files
Note |
---|
This assumes you use the cacerts.zip bootstrap script, getting the respective certs and keys from a different CA is out of scope of this document. |
You mostly follow the steps from Bootstrapping Development And Test Systems , but with some changes, as we want to retain the previously bootstrapped P12 files.
Note |
---|
Ideally you still have the cacerts folder that was created during the previous bootstrapping, so you can re-use the same CA. Otherwise you need to create a new bootstrap CA via the createCA.sh / createCA.bat command during bootstrapping. |
Regardless of whether you created a new CA or used the old one, the most important change is this:
Warning |
---|
After running createP12.sh / createP12s.bat, remove the freshly generated hybridEncKeypair.p12 and sign.p12 (we will not replace those, as they were bootstrapped already and we would break history signature and secret fields otherwise). |
Option 2: Create copies of previously shared P12 files
Follow these steps:
copy sign.p12 three times, to signJWT.p12, signJWS.p12 and signConfig.p12
copy hybridEncKeypair.p12 to encryptConfig.p12
if emailSigning.p12 is also missing, copy sign.p12 to emailSigning.p12
if deviceEncCA.p12 is also missing, copy sign.p12 to deviceEncCA.p12
set the pins for the newly created files in WEB-INF\classes\engineSignEncrypt.xml, based on the pin of the respective source file
Scenario C: Docker deployment with an outdated signencrypt.xml
An outdated docker/compose/identitymanager/config/signencrypt.xml is being used, which does not reference the bootstrapped files from the docker/compose/certs folder mounted into the container as /certs/.
Make sure you use the correct Smart ID docker config release for your IDM version, so you have a suitable signencrypt.xml file, similar to this:
example Docker signencrypt.xml referencing mounted P12 files
...
language | xml |
---|
...
Refer to Bootstrap the sign and encrypt engine in Identity Manager to bootstrap any missing keys/certificates.