9.5:documentation:roles:adm:role_assignment

Introduction to the topic - read here.

All permission changes must be made via the role request agenda (RoleRequest).

This agenda contains all requests (wishes) for requested changes of authorized identities. The main idea is that all changes in identities' permission must go through this agenda. Therefore, it is not intended only for end users' requests but for automatic operations (synchronization, automatic roles, etc.) as well.

The standard scenario of a permission change is as follows:

  • A user requests a change in their set of permissions.
  • They presse the "Change permission" button in the "Assigned roles" tab.
  • A new request (in "CONCEPT" state) is created automatically. The detail of this new request is shown to the user.
  • All the assigned roles which the user has are displayed in the table of concepts "Currently assigned roles (including requested changes)". The user can make the changes over this table (see more in Concept table)
  • All the requested changes of permission are displayed in the table "Requested permission changes".
  • The user presses the button "Make a request".
  • If the request is not evaluated as duplicate, its execution is performed (the state is set to "IN_PROGRESS").
  • Subsequently, the event "RoleRequestEventType.EXCECUTE" is called out.
  • Ordinarily, this event is firstly captured by the processor "role-request-approval-processor", which starts the approval workflow (calls the method IdmRoleRequestService.startApprovalProcess). In the default state, the workflow with the definition "approve-identity-change-permissions" is started. The key of the definition which is to be started can be changed in the application configuration by adding the key "idm.sec.core.processor.role-request-approval-processor.wf", (the value will be the key of the requested definition).
  • After a successful approval, the workflow process calls out the event "RoleRequestEventType.EXCECUTE" again (it continues with the event with which it has been started).
  • Ordinarily, the event is then captured by the processor "role-request-realization-processor", which provides the realization of the event itself. The processor calls the method IdmRoleRequestService.executeRequest(requestId), which performs the application of all role concepts which are in the "APPROVED" or "CONCEPT" states (the concept state is realized due to the situation when the realization processor is called out immediately after making the request, i.e. approval is disabled).
  • The user is assigned roles according to the requested changes.
If the user creates a new request but does not submit it, it will be displayed as "Concept" in the table "Unfinished requests for permission change" in the assigned roles tab. Thus they can return to an unfinished concept.

The request can be submitted only when the request is in the "CONCEPT", "DUPLICATED" or "EXCEPTION" states

There are two ways of how to make a change in permissions without approval.

Disabling the approval processor

As mentioned above, after submitting a request, an event is called out which is captured by the "role-request-approval-processor". If we disable this processor, all submitted requests will be realized immediately without any approval.

By disabling the approval processor, all submitted requests will be realized immediately for all users in the system regardless of their permissions.

Request attribute "Execute immediately"

A request for permission change contains attribute "executeImmediately". If this attribute is set to "true", the request will be executed immediately after submitting it. A submission without approval can be executed only by users having permission "ROLEREQUEST_EXECUTEIMMEDIATELY". If an event marked in this way is executed by a user without this permission, an exception will be called out.

During the process of submitting a request, it is verified if there is another duplicate request of the new request (in state "IN_PROGRESS", "APPROVED"). If a duplicate request is found, the executed request is labelled as duplicated (state "DUPLICATED") and its attribute "duplicatedToRequest" is filled with the identifier of the duplicate request (a record is made in the request log). The submission (execution) of the request is thus suspended.

A duplicate request is such a request with equivalent:

  • applicants.
  • individual role concepts (identical role type, identical validity from/to, identical link IdentityRole).
  • a request note (the user can define their request only in this note).
A duplicate request can be submitted (executed) repeatedly. Due to this, duplicate requests are found again.

A request can be removed completely only in "CONCEPT" state. If it is in "EXECUTED" state, every attempt to remove it ends in exception "ROLEREQUESTEXECUTEDCANNOTDELETE". If it is in "APPROVED, IN_PROGRESS, EXCEPTION, DUPLICATED" states, the request is set to "CANCELED" state. If a process is tied to the request, the process is terminated (subsequently a record about this is made in the request log).

A situation when the end user creates a request for permission change from their profile has been described above. For administrators, it is convenient to use the "Role requests" agenda, which provides an overview of all requests in the system. All requests in all states are displayed in this agenda (including those already executed).

The agenda allows a direct request submission from a list of requests. The agenda also allows creating a new request, where the administrator must first choose the user who the request is being created for.

In addition, the request detail in this agenda contains (compared to the end user request detail) a possibility of ticking that the request is not to be approved. The request detail also contains a log. This log contains all crucial information which occur during the life cycle of the request (errors, duplicates, request cancellation due to integrity, executed operations, etc.).

When role or contract (using in the some concept) is deleted and workflow process for that concept is not ended, the must be that process terminated. We cannot use standard 'cancel' of subprocess, because this operation does not triggered the main process.

This cause the main process will be frozen, because from his view cancelled subprocess never ended.

For prevent this situation is concept's subprocess not cancelled, but disapproved ( on delete role or contract).

It means if a current process task contains a decision with ID 'disapprove', then it is used. When a disapproval decision is not found, the standard cancellation of process is called.

The approval process

If the request-permission-change-without-approval mode is not used, process "approve-identity-change-permissions" will be started. This process ensures the approval of the request as a whole and its base implementation is composed of these parts:

  • Process name generating (the applicant's name will also be stated in the name)
  • Approval by the helpdesk department.
  • Approval by the manager of the applicant.
  • Approval by the user administration department.
  • Execution of subprocesses for each requested role.
  • Approval of role incompatibilities
  • Approval by the security department.
  • Sending the notification.
  • Realization of the request - the realization itself is not carried out by the process, but by the service for managing requests for permission change.