Table of Contents

Changing user permissions

A manual change (via REST api) of permission, i.e. adding/editing/removing a link between an identity and a role is not possible. All permission changes must be made via the role request agenda (RoleRequest).

Role request agenda

The standard scenario of a permission change, after a user presses the button "Make a request", is as follows:

Concept table

The goal is to provide the user with a comfortable way of creating the requested permission changes (they can see all the change in one location, projected into their currently assigned roles).

Changing permission without approval

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

Disabling the approval processor

As mentioned above, after submitting a request, an event is called out which is captured by processor "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.

Systematically, it is possible to execute a submission of an event without approval even without having the required permission. Method "IdmRoleRequestService.startRequestInternal" serves this purpose. This method is not available through the REST interface.

Integrity on remove contract or role

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 current process task has decision with ID 'disapprove', then is used. When disapprove decision is not found, the standard cancel of process is called.

REST interface

The creation of a request via a REST interface has the following steps:

  1. Creation of the request
  2. Creation of the role concepts (requested permission changes)
  3. Execution of the request (submitting the request)

Creation of the request

A request can be created via method POST on endpoint "/api/v1/role-requests/".

Example of a request:

{
  "applicant" : "846164b4-8272-46a7-ba69-0bfdad652aff",
  "requestedByType" : "MANUALLY",
  "conceptRoles" : [],
  "executeImmediately" : false,
  "description" : "Please check and approve the permission change"
}

Creation of the role concepts

A role concept can be created via method POST on endpoint "/api/v1/concept-role-requests/".

Example of a request (creation of a concept for assigning a new role):

{
 "roleRequest":"740d7dc3-d90b-40cd-80f9-80cf36180c80",
 "identityContract":"7fdf1128-ce2d-4d34-ba99-821a544ad753",
 "role":"6ac36596-4f68-4282-88de-685e654199d6",
 "identityRole":null,
 "roleTreeNode":null,
 "validFrom":null,
 "validTill":"2017-07-31",
 "operation":"ADD"
}

Execution of the request

Execution of the request can be done via method PUT on endpoint "/api/v1/role-requests/{requestId}/start", where requestId is the UUID of the created request.

During the approval process, the requested changes can be changed (e.g. the manager disagrees with assigning of the role and removes it from the request). For easy backtracking of how the original request looked like, it is converted to JSON format at its start and saved to the request.

The approval process

If the request-permission-change-without-approval mode is not used, process "approve-identity-change-permissions" will be started. This process is described here in the admin guide.

The input of the proces is the event which started the approval process. This event contains the request itself (IdmRoleRequestDto). At the end of the process the event is called out again (performs the realization).

Approval by the helpdesk department

Approval by the manager

Approval by the manager is disabled by default

.

Approval by the user administration department

Approval by the user administration department is disabled by default.

.

Execution of approving subprocesses

Every constituent role being requested (change or assignment) can be approved separately. Due to that, a separate subprocess is always run for every role.

If the role is evaluated as not requiring approval, default process "change-role-without-approve" is run. This process only generates the name (it is saved in the history of workflow processes) and changes the state of the role concept to "APPROVED".

Setting of the approval process to a role

The approval process (for assigning or changing an ssigned role) is set to the role by setting the relevant priority. The role's priority can have values (0,1,2,3,4), where every priority can be assigned a different approval process.

The specific priority assignment and the type of approval process is defined in the application configuration:

idm.sec.core.wf.role.approval.{priority}={wf}

,where {priority} is the priority number and {wf} is the key of the process workflow.

There is only one process approving removal of assigned roles for the whole application (all priorities). Again, it can be defined in the application configuration under key "idm.sec.core.wf.role.approval.remove". The default process is "approve-remove-role-by-manager"
To make removing of a role approved, it is necessary that the role item "Approve role removal" is ticked.

The default setting of priorities and approval processes is as follows:

This process supports approving for change automatic role.

This process supports approving for change automatic role.

Approval by the security department

Approval by the security department is disabled by default

.

Approval of role incompatibilities

Approval of role incompatibilities is enabled by default

.

Automatic skipping of approval processes

Automatic skipping of approval processes is performed if the request realizator (the one who really submitted it) is the same user as the currently logged-in user and, at the same time, is among the candidates who can approve this task. In that case, the task is skipped with the same result as if it was approved manually.

Approve, disprove task by task detail

To task detail is possible to get from url in notification (email and etd.), after click to url in notofication you will be redirected to task detail. After aprove, disaprove or go back you will be redirected to all your tasks. When is reopend already denied or approved task, user recive information about nonexisting or solved task.

Beware if url with task is copy by ctrl+c and paste directly to web browesr by ctrl+v, user will be redirected to the page on which he was (for example google.com, blank page, etc.)

Sending notifications

Sending notifications is by default enabled just to notify user just about his change of permissions. Sending notifications can be modified with two global boolean variables, which specify sending notifications.

Security

Authorization policies are implemented fo role requests agenda. Concept role requests are secured by assigned role request internally. Only identity with authority ROLEREQUEST_ADMIN can read all concepts without filter by role request through the IdmConceptRoleRequestController.