...
Info |
---|
This article is new for Identity Manager 5.0.1. |
The sign and encrypt engine has one configuration file. On Docker docker deployments it is located in docker/compose/identitymanager/config/signencrypt.xml, on WAR deployments it is located in WEB-INF/classes/engineSignEncryptConfig.xml of IDM Identity Manager Admin and IDM Identity Manager Operator.
There are also several tools including a similar configuration file.
...
The configuration is divided into entries for descriptors and keys. Each descriptor handles one distinct use case and uses one of the key-entries.
...
Descriptors
IDM Identity Manager references descriptors by their name: for each use case there is a known descriptor name. Most names are fixed (e.g. for example, ConfigZipEncrypter
is always used for encrypting configuration files) and a few can be named arbitrarily (e.g. for example, descriptors for PIN blob decryption).
Descriptor
...
Some descriptors support multiple versions. For example, you can replace the key of the ObjectHistorySigner
by adding a descriptor with the same name and a newer version, and leaving the existing descriptor with the old version configured. This will cause any new signatures to be created with the new key, but you can still verify signatures made with the old one.
See the following example:
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<engineSignEncrypt>
<descriptors>
<descriptor name="ObjectHistorySigner" version="2">
<type algorithm="SHA-256" key="newKey" />
</descriptor>
<descriptor name="ObjectHistorySigner" version="1">
<type algorithm="SHA-256" key="oldKey" />
</descriptor>
<!-- others descriptors -->
</descriptors>
<keys>
<key name="newKey">
<type name="pkcs12" locationValue="classpath:sign_new.p12" pin="1234"/>
</key>
<key name="oldKey">
<type name="pkcs12" locationValue="classpath:sign_old.p12" pin="1234"/>
</key>
<!-- other keys -->
</keys>
</engineSignEncrypt> |
There are also descriptors which cannot be versioned, e.g. EncryptedFields
. For those the version always needs to be set to 1.
Descriptor
See the tables below the example for more information on the different possible attributes of a descriptor/-type.
Descriptor example
Code Block | ||
---|---|---|
| ||
<descriptor name="ObjectHistorySigner" version="1">
<type algorithm="SHA-256" key="objectHistorySignerCert" />
</descriptor> |
...
descriptor
element attribute
...
Description
...
name
...
Used by Identity Manager to refer to this descriptor. There might be different descriptors with the same name but with different versions.
...
version
...
A numeric value that denotes the descriptor's version. This is only needed for the ObjectHistorySigner
.
A new version of a descriptor is needed, for example, when an old key needs to be replaced.
The descriptor with the highest version number is used. Verification of Object History entries will automatically select the right descriptor version.
...
Attribute of the type
element inside descriptor
...
Description
...
algorithm
...
For EncryptedFields
/ConfigZipEncrypter
: symmetric algorithm to be used, usually AES/CBC/PKCS7Padding
.
For SelfServiceJWTSigner
/ContentProviderJWSSigner
: always RSA
.
For ConfigZipSigner
/ObjectHistorySigner
: hashing algorithm to be used (for example, SHA-256
).
For SignEmailDescriptor
/hermodDeviceEnc
/att_*
and pin-blob decryption descriptors:
signature algorithm to be used (for example, SHA256withRSA
).
For idopteAuthentication
: always NoneWithRSA
.
...
size
...
For EncryptedFields
/ConfigZipEncrypter
only.
Size of the symmetric key, either 128
or 256
(recommended).
...
result
...
For EncryptedFields
only.
Output format, currently always NX02
.
...
key
...
The descriptor’s key. Refers to a key defined in the same document.
...
asymCipher
...
For EncryptedFields
/ConfigZipEncrypter
only.
Cipher definition, e.g. RSA/None/OAEPWithSHA384AndMGF1Padding
.
When used with an HSM, you need to adjust the cipher format to be compatible with the JCE provider
used for HSM access.
For example, instead of the above cipher definition, specify RSA/ECB/OAEPWithSHA-384AndMGF1Padding
(ECB
instead of None
and SHA-384
instead of SHA384
).
...
initVector
...
Only needed for migrating EncryptedFields
from SmartAct or ProAct. A fixed Initialization Vector (IV).
For other descriptors, omit this attribute in order to use randomly generated IVs.
Key
...
example
Code Block | ||
---|---|---|
| ||
<descriptor name="ObjectHistorySigner" version="1">
<type algorithm="SHA-256" key="objectHistorySignerCert" />
</descriptor> |
See the following tables for more information on the different possible attributes of a descriptor/-type.
| Description |
---|---|
name | Used by Identity Manager to refer to this descriptor. There might be different descriptors with the same name but with different versions. |
version | A numeric value that denotes the descriptor's version. This is only needed for the A new version of a descriptor is needed, for example, when an old key needs to be replaced. The descriptor with the highest version number is used. Verification of Object History entries will automatically select the right descriptor version. |
Attribute of the | Description |
---|---|
algorithm | For For For For For |
size | For Size of the symmetric key, either |
result | For |
key | The descriptor’s key. Refers to a key defined in the same document. |
asymCipher | For Cipher definition, for example, When used with an HSM, you need to adjust the cipher format to be compatible with the JCE provider used for HSM access. For example, instead of the above cipher definition, specify |
initVector | Only needed for migrating For other descriptors, omit this attribute in order to use randomly generated IVs. |
Descriptor versioning
The ObjectHistorySigner
supports multiple versions. You can replace its key by adding a descriptor with the same name and a newer version, and leaving the existing descriptor with the old version configured. This will cause any new signatures to be created with the new key, but you can still verify signatures made with the old one.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
There are also descriptors which cannot be versioned, for example, EncryptedFields
. For those the version always must be set to 1.
Currently most descriptors either do not support versioning at all or do not benefit from defining multiple versions.
Key
Key elements are referenced by the descriptors. They describe keys found in HSMs and/or keystores. Each key should be used by only one descriptor.
Key example
Code Block | ||
---|---|---|
| ||
<key name="objectHistorySignerCert"> <type name="pkcs12" locationValue="classpath:sign.p12" pin="1234"/> </key> |
See the tables below for more information about the key/-type.
| Description |
---|---|
name | Used by descriptors' key attribute to reference this key. |
Attribute of the | Description |
---|---|
name | Type of storage: |
locationValue | For docker:
|
|
Default attestation keys are referenced from the |
, for example,
For WAR file deployment:
|
|
For an HSM: use the path of the PKCS11 library, without filename extension,
for example: locationValue="/usr/local/lib/libpkcs11hsm"
pin
PIN for the keystore or HSM.
To avoid having clear text PINs in this file, the pin should be scrambled.
That can be achieved by setting it with pin.encrypted="1234"
instead of pin="1234"
.
For WAR deployments the pin will then be scrambled on the next (re-)start of Tomcat.
For Docker deployments you need to scramble the pins with a dedicated tool while IDM Admin / IDM Operator containers are not running.
See Scramble sensitive data in Identity Manager files for detailed instructions.
Example configuration file
Below is an example of the XML configuration.
...
language | xml |
---|
...
| |
pin | PIN for the keystore or HSM. To avoid having clear text PINs in this file, the pin should be scrambled. That can be achieved by setting it with For WAR deployments the pin will then be scrambled on the next (re-)start of Tomcat. For docker deployments you need to scramble the pins with a dedicated tool while Identity Manager Admin/Identity Manager Operator containers are not running. After scrambling, the PIN will look something like |
Configuration file example
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|