Policy Violation Owner Approval Step Not Triggering in Access Request Workflow

Which IIQ version are you inquiring about?

8.5

Please share any images or screenshots, if relevant.

Share all details about your problem, including any error messages you may have received.

In Access Request, after a policy violation is detected, the requester can choose to submit the request with violations. I would like the Policy Violation owner to approve the request first before it goes to the next approval step, which is the manager’s approval. I tried adding a Policy Violation business process, but it didn’t work. I also modified the “Identity Request Violation Review” workflow, but that still didn’t work.

The Policy Violation approval process should be:
Requester → Policy Violation Owner → Manager of Requester

@Jayvee_APG

How Policies Work - SailPoint IdentityIQ

check here Policy Settings 

Hi @Jayvee_APG ,

In your LCM provisioning workflow, you can set Policy Violation Owner as the **identity** or **securityOfficer**. After that, set **approvalScheme** as one of the following

<Variable initializer="identity ,manager" input="true" name="approvalScheme">
<Variable initializer="identity ,securityOfficer" input="true" name="approvalScheme">

You can also use Approval Assignment Rule for more customization.

Hi @Jayvee_APG, You may want to try using an ApprovalAssignmentRule for this requirement. This rule allows you to dynamically determine the approval owner when the default approval mechanism doesn’t meet your needs.

In this case, the rule can check if the request has a policy violation, retrieve the Policy Violation Owner, and assign that user as the first approver. After the violation owner approves, the request can then proceed to the requester’s manager for the next approval step.

Also verify that the Violation Owner is properly defined in the policy and that the Identity Request Violation Review workflow is being triggered during the access request process.

Thanks,
Raju :expert_ambassador:

Hi @santhirajumunganda,

Thank you for the suggestion. For the 2 Policies, they have different violation owners. And for each policy, the owner is already place. I believe this is the requirement I am working on. Do you have a snippet code for this? And where do I place this rule?

Hi Jayvee,

If the policies already have different violation owners defined, you may not need to change much in the workflow itself.

First, I would suggest checking the LCM Provisioning workflow and see how the approvals are currently generated. In most cases the approval routing is controlled by the approvalScheme variable. If it is configured as owner,manager, IdentityIQ will automatically send the approval first to the owner and then to the requester’s manager.

You can test this first by submitting a request that triggers one of the policies and verifying whether the approval is routed to the owner defined on the policy object.

If the approval is not going to the policy owner (for example if it is resolving the role/entitlement owner instead), then you can use an ApprovalAssignmentRule to override the approver when a policy violation exists.

The rule is usually referenced in the LCM Provisioning workflow in the steps that call the approval subprocess (like Pre Split Approve or Approve and Provision). In those steps there is an argument called approvalAssignmentRule where you can pass the rule name.

A very simple example would be something like:

import sailpoint.object.PolicyViolation;
import sailpoint.object.Identity;

if (policyViolations != null && policyViolations.size() > 0) {
    PolicyViolation v = (PolicyViolation) policyViolations.get(0);
    if (v.getPolicy() != null && v.getPolicy().getOwner() != null) {
        return v.getPolicy().getOwner().getName();
    }
}
return null;

This rule checks if the request has policy violations and returns the policy owner as the approver. After that approval is completed, the workflow can continue to the next step (for example manager approval if it is part of the approvalScheme).

I would recommend first validating the default owner,manager behavior before adding the rule, since sometimes the policy owner is already resolved correctly depending on the request object.

Thanks,
Raju :expert_ambassador:

owner specify the entitlement or role owner, not policy owner.

@Jayvee_APG This may complicate the approval design. Let’s say you have approvalscheme as manager+owner..you submit request for 5 entitlements. then IIQ is going to assign the workitem with all entitlements to manager, then split it as per the owners.

In your case, you need to split based on policy violation and then assimilate the plan, then send single workitem to manager. basically a reverse of split plan execution.

Before implementing the change, you need to note down all your use cases (like when do you want to split the items, when to assimilate, level of approvals, etc.) and what is expected behavior. Accordingly you can implement the change.

Hi @neel193 & @santhirajumunganda ,

For the use case, there should be an approval from Policy Violation Owner, either after the requester’s submit with violation in the access request, or on the last approval.

For the policy, below is my configuration:

I am using LCM Provisioning for Access Request as the business process. My approvalScheme is manager and owner as seen below:

<Variable initializer="manager, owner" input="true" name="approvalScheme">

Below is my code for ApprovalAssignment rule

<Rule language="beanshell" name="Rule-Workflow-ApprovalAssignment" type="Workflow">
  <Description>A rule used by a Workflow to determine a step action or variable value.</Description>
  <Signature returnType="Object">
    <Inputs>
      <Argument name="log" type="org.apache.commons.logging.Log" />
      <Argument name="context" type="sailpoint.api.SailPointContext" />
      <Argument name="wfcontext" />
      <Argument name="handler" />
      <Argument name="workflow" />
      <Argument name="step" />
      <Argument name="approval" />
      <Argument name="item" />
      <Argument name="policyViolations" />
    </Inputs>
    <Returns>
      <Argument name="Object" />
    </Returns>
  </Signature>
  <Source>import sailpoint.object.*;
import sailpoint.api.*;
  import java.util.*;
  System.out.println("Rule-Workflow-ApprovalAssignment policyViolations: " + policyViolations); //Returns the 2 policies
  for (HashMap policy : policyViolations) {
    String name = (String) policy.get("policyName");
    System.out.println("Rule-Workflow-ApprovalAssignment name: " + name); // Returns the first policy name
    Policy v = (Policy) context.getObjectByName(Policy.class, name);
    System.out.println("Rule-Workflow-ApprovalAssignment v: " + v); //Returns the policy object that contains owner
    if (v != null &amp;&amp; v.getOwner() != null) {
      System.out.println("Rule-Workflow-ApprovalAssignment v.getOwner().getName(): " + v.getOwner().getName()); //Returns the policy owner name
      return v.getOwner();
    }
  }
  System.out.println("Rule-Workflow-ApprovalAssignment return " + wfcontext); //Return the wfcontext instead of null
  return wfcontext;</Source>
</Rule>

For the ApprovalAssignment rule, I applied it to the scenarios below:

First, I added the approvalAssignmentRule for “Approve and Provision”. I can see the values of the Policy Violation Owner in the logs, but it does not create a work item for the policy owner. The workflow goes only to the Requester/Requestee’s Submit with Violation, then the Manager.

Second, in “Pre-Split Approve”, the result is the same as in “Approve and Provision”.

Third, even when both steps have the rule applied, the result is still the same.

Below is the result in the interactions tab for all scenarios mentioned above:

The issue is that it works correctly for the detective part of the policy, but for the preventive part—which runs through access request—it does not create a work item for the policy violation owner.

@Jayvee_APG Let me try this out and confirm. will go with manager → policy owner approval. Will test and revert.

Yeah, let me check too, did you see those print statements? could you please share them here?