Table of Contents

Provisioning

Provisioning ensures the implementation of accounts settings on target systems according to the settings in IdM. The provisioning itself then only propagates information to the target system. It does not make the evaluation of which identities should be subject to provisioning on a particular system. This is the task of accounts management which is an integral part of IdM and precedes the provisioning itself.

Provisioning is an integral part of the ACC module (Account management)
Since version 9.4.0 are lists in provisioning compares independent on order of values. For example: If value from IdM is [A,B,C] and value from the system [C,A,B], then this values are for provisioning same. It means none provisioning on system will be executed. If you need to ensure that comapring of lists will be dependent on value order, then you can override method isAttributeValueEquals in service ProvisioningService.

As it has been already said, the provisioning is preceded by accounts management. In most cases, provisioning is therefore run by the service ensuring accounts management. If this service evaluates that such a change of the account which requires provisioning has occurred, it will call the service ProvisioningService. This service includes the following methods:

The term account owner stands for the link between an dto and an account (e.g. AccIdentityAccoutnDto). Provisioning is done exclusively for the links which are marked as the account owner. Otherwise such a link is only an "informational" one. For example, the administrator´s account may have more identities, but only its owner may change it.

Supported dto types

Provisioning is implemented for:

Provisioning operation life cycle

Provisioning queue

All provisioning operations are processed through provisioning queue. The individual provisioning operations (create, update, delete) are serialized, saved in the queue, and then processed. If provisioning operation is completed, then archive provisioning operation record is created ⇒ active provisioning operation is executed and is moved into archive.

Three entities was created to persist provisioning operations and their state:

Supported provisioning operation states:

To extend or reconfigure the provisioning mechanism, the processing has been moved to the events on the dto SysProvisioningOperationDto and to the individual processors treating this dto (the list of the registered processors has been extracted to the application on the module page). Calling the provisioning then takes places through publishing the events with the SysProvisioningOperationDto content through ProvisioningExecutor. The individual operations are serialized, persisted in the queue, and transmitted to the processors. If a ProvisioningException occurs or some of the processors stops working, then it is possible to find what happened in the agenda placed above the queue (error code, return state etc.). The GuardedStrings (e.g. passwords) are not saved in the serialized state - the values are replaced and saved in a confidential storage from which they are only read when needed (account re-calculation, provisioning implementation).

Make sure you handle all exceptions, which could be thrown in your custom provisioning processor and throw ProvisioningException descendants only (used @Transactional mechanism can handle ProvisioningException only and doesn't do rollback for them - this is needed to persist exception reason and operation state in the queue).

The operation content in SysProvisioningOperationDto is called ProvisioningContext and is divided into two logical units:

First the accountObject ("wish"), then the connectorObject which is the real provisioning input is calculated. When repeating the operation, a new connectorObject from an accountObject is always calculated so that the possible changes which could occur right on the target system are taken into consideration.

Once the object (defined by the identifier on the system and the idm entity) is in the queue, all the other requests for the provisioning of the same objects are persisted and remains in the queue - consistent sequence of operations on one object in the target system.

Provisioning queue functions:

More about attribute strategies (attributes merge and etc.) is here.

Provisioning attributes

Entity SysProvisioningAttribute contains attributes used in provisioning context connector object. Provisioning attribute fields:

Is possible to filter provisioning operations and archives with used attributes. Is possible to filter empty provisioning (~ without attributes). Active provisioning operations in the queue are evaluated as empty only if attributes was already computed (after prepare provisioning object processor), so can be used for redonly systems, but only the first operation contains attributes (other operations are put into queue without attributes).

Older records (created before version 9.6.3 was installed) will be filtered as empty provisioning without attributes (attributes are empty).

Filter usage

Retry mechanism

Provisioning operations ending with an error are persisted in the queue and new running time is scheduled to them = another attempt will be executed by long running task periodically - long running task RetryProvisioningTaskExecutor configuration is needed. Only failed operations are processed from queue by retry mechanism.

Asynchronous provisioning

Target system can be switched to use asynchronous provisioning - flag on the system detail. Then requests for active provisioning operations (create, update, delete) are persisted in the queue as ``CREATED`` and their processing is delayed. Operations in queue are processed by long running task ProvisioningQueueTaskExecutor, which operates above the queue periodically and starts ``CREATED`` provisioning operation processing. Make sure you have ProvisioningQueueTaskExecutor configured, if you have some target system switched to use asynchronous provisioning.

Change password operation is still synchronous - is needed to change passwords immediately.

Provisioning of attachment

Since version 9.4.0 is supported provisioning for EAV attributes with attachment.

During provisioning is loaded `IdmAttachmentDto` first (by ID of attachment stored in the EAV attribute value). `IdmAttachmentDto` contains metadata (as file name, size, …), but doesn't contains data. For it was created DTO `IdmAttachmentWithDataDto`, where was added field data (byte array). Then are loaded data for this attachment and given input-stream is converted to the array of bytes. From this moment is value (for EAV attribute with attachment) replaced by instance of `IdmAttachmentWithDataDto` (contains metadata + data). It means the transformation to the system will have as input value (attributeValue) this new DTO.

Structure of IdmAttachmentWithDataDto is here.

This DTO is useful in situation when we need to do provisioning for some attachment's metadata field (for example name of file). In this case we only need to create transformation to the system:

// Transformation for get name of file
if (attributeValue != null) {
 return attributeValue.getName();
}
return attributeValue;

Example of use

The EAV attribute must have the Attachment type set.
None additional transformation is required. Load of attachment and transformation to the byte array is automatical (if transformation to the system is blank).