The following workflows are default LCM workflows:
- LCM Provisioning
- LCM Manage Passwords
- LCM Create and Update
- LCM Registration
The following workflows are default LCM workflows:
Reference:-
Quartz Enterprise Job Scheduler (quartz-scheduler.org)
Rapid Setup:
Rapid Setup Migration Guide - Compass (sailpoint.com)
https://www.sailpoint.com/university/training-paths/identityiq/?
if(identity != null @and identity.getManager() != null){
return identity.getManager();
} else{
return oldValue;
}
Identity Blog URL:-
#
https://community.sailpoint.com/t5/IdentityIQ-Blog/bg-p/IIQ_blog
EFix URL:-
#
https://community.sailpoint.com/t5/IdentityIQ-Blog/IdentityIQ-log4j-Remote-Code-Execution-Vulnerability/ba-p/206681?elq=46e7bafd65ca4860965690f2a5d3da35&elqCampaignId=4118&elqTrackId=757e1b94243c4dbc97f78764f0daecff&elqaid=5155&elqat=1&utm_medium=email&utm_source=Eloqua
#
https://community.sailpoint.com/t5/IdentityIQ-Blog/Identity-Forwarding-Vulnerability/ba-p/226246
#
https://community.sailpoint.com/t5/IdentityIQ-Blog/IdentityIQ-JavaServer-Faces-File-Path-Traversal-Vulnerability/ba-p/227148
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition executor="sailpoint.reporting.LiveReportExecutor" name="TaskDefSch-Report" progressMode="Percentage" resultAction="Rename" subType="Role Management Reports" template="true" type="LiveReport">
<Attributes>
<Map>
<entry key="TaskDefinition.runLengthAverage" value="422"/>
<entry key="TaskDefinition.runLengthTotal" value="422"/>
<entry key="TaskDefinition.runs" value="1"/>
<entry key="report">
<value>
<LiveReport title="Task Result Report">
<DataSource objectType="TaskDefinition" type="Filter">
<QueryParameters>
<Parameter argument="type" property="type">
<QueryScript>
<Source>
import sailpoint.object.Filter;
import sailpoint.tools.Util;
List allowedTypes = new ArrayList();
allowedTypes.add("AccountAggregation");
allowedTypes.add("AccountGroupAggregation");
queryOptions.addFilter(Filter.in("type", allowedTypes));
queryOptions.addFilter(Filter.notnull("parent"));
return queryOptions;
</Source>
</QueryScript>
</Parameter>
</QueryParameters>
</DataSource>
<Columns>
<ReportColumnConfig field="taskName" header="Task Name" property="name" sortable="true" width="110"/>
<ReportColumnConfig field="taskType" header="Task Type" property="type" sortable="true" width="110"/>
<ReportColumnConfig field="appName" header="Application Name" property="name" sortable="true" width="110">
<RenderScript>
<Source>
import sailpoint.object.TaskDefinition;
TaskDefinition taskDef = context.getObjectByName(TaskDefinition.class, value);
if(taskDef != null && null != taskDef.getArguments() && null!= taskDef.getArguments().get("applications")){
return taskDef.getArguments().get("applications");
}
else
return "";
</Source>
</RenderScript>
</ReportColumnConfig>
<ReportColumnConfig field="isSchedule" header="Is Sheduled" property="name" sortable="true" width="110">
<RenderScript>
<Source>
import sailpoint.object.TaskDefinition;
import sailpoint.object.TaskDefinition;
import sailpoint.object.TaskSchedule;
import sailpoint.object.QueryOptions;
import sailpoint.object.Attributes;
import sailpoint.object.Filter;
import sailpoint.api.IncrementalObjectIterator;
import java.util.List;
import java.util.ArayList;
import java.util.Set;
public static String isPresentInSchlTasks(String taskIdParam)
{
//log.error("Entered into the method isPresentInSchlTasks() ");
try{
QueryOptions qo = new QueryOptions();
IncrementalObjectIterator taskSchedule = new IncrementalObjectIterator(context, TaskSchedule.class, qo);
String returnStmt = "notscheduled";
while (taskSchedule.hasNext()) {
TaskSchedule taskScheduleObject = (TaskSchedule) taskSchedule.next();
if(taskScheduleObject.getArguments().get("executor").contains(taskIdParam))
{
returnStmt = "scheduled";
break;
}
}
return returnStmt;
}
catch (Exception e)
{
return e.getMessage();
}
}
public static String checkInSeqSchExe(String taskNameParam)
{
try{
Filter f = Filter.like("formPath","sequentialTask");
QueryOptions qo = new QueryOptions();
qo.add(f);
IncrementalObjectIterator taskDefSeq = new IncrementalObjectIterator(context, TaskDefinition.class, qo);
String returnValue = "No";
while (taskDefSeq.hasNext()) {
TaskDefinition taskDefSeqObject = (TaskDefinition) taskDefSeq.next();
String taskName = taskDefSeqObject.getName();
String taskId = taskDefSeqObject.getId();
if(taskDefSeqObject.getArgument("taskList")!=null && taskDefSeqObject.getArgument("taskList").contains(taskNameParam))
{
returnValue = isPresentInSchlTasks(taskId);
break;
}
}
return returnValue;
}
catch (Exception e)
{
return e.getMessage();
}
}
try{
//log.error("value task: "+value);
TaskDefinition taskDef = context.getObjectByName(TaskDefinition.class, value);
String taskId = taskDef.getId();
String taskName = taskDef.getName();
if(taskDef != null && null != taskId)
{
String isPresented = isPresentInSchlTasks(taskId);
if("scheduled".equalsIgnoreCase(isPresented))
{
return "Yes";
}
else if("notscheduled".equalsIgnoreCase(isPresented))
{
String result = checkInSeqSchExe(taskName);
if("scheduled".equalsIgnoreCase(result))
{
return "Yes";
}
else
{
return "No";
}
}
}
else
return null;
}
catch(Exception e){
return e.getMessage();
}
</Source>
</RenderScript>
</ReportColumnConfig>
<ReportColumnConfig field="executeTime" header="Execution Time" property="name" sortable="true" width="110">
<RenderScript>
<Source>
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import sailpoint.object.TaskDefinition;
import sailpoint.object.TaskSchedule;
import sailpoint.object.Attributes;
import sailpoint.api.IncrementalObjectIterator;
import java.util.List;
import java.util.ArayList;
public static String isPresentInSchlTasks(String taskIdParam)
{
try{
QueryOptions qo = new QueryOptions();
IncrementalObjectIterator taskSchedule = new IncrementalObjectIterator(context, TaskSchedule.class, qo);
String returnStmt = "NA";
while (taskSchedule.hasNext()) {
TaskSchedule taskScheduleObject = (TaskSchedule) taskSchedule.next();
//log.error("Inside the while loop ");
if(taskScheduleObject.getArguments().get("executor").equalsIgnoreCase(taskIdParam) && null != taskScheduleObject.getNextExecution())
{
returnStmt = taskScheduleObject.getNextExecution().toString();
break;
}
}
return returnStmt;
}
catch (Exception e)
{
return e.getMessage();
}
}
public static String checkInSeqSchExe(String taskNameParam)
{
try{
Filter f = Filter.like("formPath","sequentialTask");
QueryOptions qo = new QueryOptions();
qo.add(f);
IncrementalObjectIterator taskDefSeq = new IncrementalObjectIterator(context, TaskDefinition.class, qo);
String returnValue = "NA";
while (taskDefSeq.hasNext()) {
TaskDefinition taskDefSeqObject = (TaskDefinition) taskDefSeq.next();
String taskName = taskDefSeqObject.getName();
String taskId = taskDefSeqObject.getId();
if(taskDefSeqObject.getArgument("taskList")!=null && taskDefSeqObject.getArgument("taskList").contains(taskNameParam))
{
returnValue = isPresentInSchlTasks(taskId);
break;
}
}
return returnValue;
}
catch (Exception e)
{
return e.getMessage();
}
}
try{
TaskDefinition taskDef = context.getObjectByName(TaskDefinition.class, value);
String taskId = taskDef.getId();
String taskName = taskDef.getName();
if(taskDef != null && null != taskId)
{
String exeTime = isPresentInSchlTasks(taskId);
if(exeTime!=null && !"NA".equalsIgnoreCase(exeTime))
{
return exeTime;
}
else
{
String exeTime2 = checkInSeqSchExe(taskName);
if(exeTime2!=null && !"NA".equalsIgnoreCase(exeTime2))
{
return exeTime2;
}
else
{
return "NA";
}
}
}
else
return null;
}
catch(Exception e){
return e.getMessage();
}
</Source>
</RenderScript>
</ReportColumnConfig>
<ReportColumnConfig field="executeFrequency" header="Execution Frequency" property="name" sortable="true" width="110">
<RenderScript>
<Source>
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import sailpoint.object.TaskDefinition;
import sailpoint.object.TaskSchedule;
import sailpoint.object.Attributes;
import sailpoint.api.IncrementalObjectIterator;
import java.util.List;
import java.util.ArayList;
public static long isPresentInSchlTasks(String taskIdParam)
{
try{
QueryOptions qo = new QueryOptions();
IncrementalObjectIterator taskSchedule = new IncrementalObjectIterator(context, TaskSchedule.class, qo);
long returnStmt = 0L;
while (taskSchedule.hasNext()) {
TaskSchedule taskScheduleObject = (TaskSchedule) taskSchedule.next();
if(taskScheduleObject.getArguments().get("executor").equalsIgnoreCase(taskIdParam) && null != taskScheduleObject.getNextExecution() && null != taskScheduleObject.getLastExecution())
{
returnStmt = (taskScheduleObject.getNextExecution().getTime())-(taskScheduleObject.getLastExecution().getTime());
break;
}
}
return returnStmt;
}
catch (Exception e)
{
return e.getMessage();
}
}
public static long checkInSeqSchExe(String taskNameParam)
{
try{
Filter f = Filter.like("formPath","sequentialTask");
QueryOptions qo = new QueryOptions();
qo.add(f);
IncrementalObjectIterator taskDefSeq = new IncrementalObjectIterator(context, TaskDefinition.class, qo);
long returnValue = 0L;
while (taskDefSeq.hasNext()) {
TaskDefinition taskDefSeqObject = (TaskDefinition) taskDefSeq.next();
String taskName = taskDefSeqObject.getName();
String taskId = taskDefSeqObject.getId();
if(taskDefSeqObject.getArgument("taskList")!=null && taskDefSeqObject.getArgument("taskList").contains(taskNameParam))
{
returnValue = isPresentInSchlTasks(taskId);
break;
}
}
return returnValue;
}
catch (Exception e)
{
return e.getMessage();
}
}
try{
TaskDefinition taskDef = context.getObjectByName(TaskDefinition.class, value);
String taskId = taskDef.getId();
String taskName = taskDef.getName();
if(taskDef != null && null != taskId)
{
long exeTime = isPresentInSchlTasks(taskId);
if(exeTime!=null && exeTime!=0)
{
if((exeTime / (1000*60*60)) % 24==1)
{
return "Once in a hour";
}
else if((exeTime / (1000*60*60*24)) % 365==1)
{
return "Once in a day";
}
else if((exeTime / (1000*60*60*24)) % 365==7)
{
return "Once in a week";
}
else if((exeTime / (1000*60*60*24)) % 365==31)
{
return "Once in a month";
}
else if ((exeTime / (1000*60*60*24)) % 365==89)
{
return "Once in a quarter";
}
else if ((exeTime / (1000*60*60*24)) % 365==0)
{
return "Once in a year";
}
else
return "Once in a "+exeTime+" milliseconds";
}
else
{
long exeTime2 = checkInSeqSchExe(taskName);
if(exeTime2!=null && exeTime2!=0)
{
if((exeTime2 / (1000*60*60)) % 24==1)
{
return "Once in a hour";
}
else if((exeTime2 / (1000*60*60*24)) % 365==1)
{
return "Once in a day";
}
else if((exeTime2 / (1000*60*60*24)) % 365==7)
{
return "Once in a week";
}
else if((exeTime2 / (1000*60*60*24)) % 365==31)
{
return "Once in a month";
}
else if ((exeTime2 / (1000*60*60*24)) % 365==89)
{
return "Once in a quarter";
}
else if ((exeTime2 / (1000*60*60*24)) % 365==0)
{
return "Once in a year";
}
else
return "Once in a "+exeTime2+" milliseconds";
}
else
{
return "NA";
}
}
}
else
return null;
}
catch(Exception e){
return e.getMessage();
}
</Source>
</RenderScript>
</ReportColumnConfig>
</Columns>
</LiveReport>
</value>
</entry>
</Map>
</Attributes>
<Description>Displays the tasks and schedules.</Description>
<RequiredRights>
<Reference class="sailpoint.object.SPRight" name="FullAccessIdentityRoleReport"/>
</RequiredRights>
</TaskDefinition>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule language="beanshell" name="Rule-Purging-AccessRequests">
<Source>
import sailpoint.object.QueryOptions;
import sailpoint.object.IdentityRequest;
import sailpoint.object.Filter;
import sailpoint.object.TaskResult;
import sailpoint.object.WorkflowCase;
import sailpoint.api.Workflower;
import sailpoint.api.Terminator;
import sailpoint.tools.Util;
import sailpoint.tools.Message;
try {
Terminator terminator = new Terminator(context);
Workflower workflower = new Workflower(context);
int daysToDelete = 365;
int daysToDeleteNegative = (~(daysToDelete - 1));
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, daysToDeleteNegative);
Date beforeDate= cal.getTime();
QueryOptions qo = new QueryOptions();
qo.addFilter(Filter.lt("created",beforeDate));
qo.addFilter(Filter.or(Filter.eq("completionStatus", "Pending"),Filter.eq("executionStatus", "Executing")));
Iterator iterator = context.search(IdentityRequest.class,qo);
if( null!= iterator){
while(iterator.hasNext()){
IdentityRequest identityRequest = (IdentityRequest) iterator.next();
if(null != identityRequest && null != identityRequest.getAttribute("taskResultId"))
{
TaskResult taskResult = context.getObjectById(TaskResult.class,identityRequest.getAttribute("taskResultId"));
if(null != taskResult && null != taskResult.getAttribute("workflowCaseId"))
{
WorkflowCase workflowCase = context.getObjectById(WorkflowCase.class, taskResult.getAttribute("workflowCaseId"));
if(null != workflowCase)
{
workflower.terminate(workflowCase);
}
//terminator.deleteObject(taskResult);
}
Calendar cal2 = Calendar.getInstance();
Date verificationDate = cal2.getTime();
List msgList = new ArrayList();
Message msg = new Message();
msg.setType(Message.Type.Warn);
msg.setKey("This request has been made to terminated through a rule explicitly, since it has been there in pending queue from long back.");
msgList.add(msg);
identityRequest.setMessages(msgList);
identityRequest.setVerified(verificationDate);
identityRequest.setExecutionStatus(IdentityRequest.ExecutionStatus.Terminated);
identityRequest.setCompletionStatus(IdentityRequest.CompletionStatus.Failure);
context.saveObject(identityRequest);
context.commitTransaction();
}
}
Util.flushIterator(iterator);
}
}
catch(Exception e) {
log.error("Exception "+e.getMessage);
}
</Source>
</Rule>
Web Service:
WebService connector supports pagination for Account Aggregation and Group Aggregation.
There are two ways to implement pagination for WebService connector:
1. Paging Tab
2. Before Rule (OR) After Rule
Ex 1: fullUrl = https://mightypedia.com/xyz/api/employee?pageIndex=1
Json Response:
{
"totalcount": 666,
"pageSize": 100,
"pageIndex":1,
"startAt":1,
"records":[
{
.......
.......
.......
}
]
}
Paging Tab:
TERMINATE_IF $response.startAt == 0
$offset$ = $response.pageIndex$ + 1
$endpoint.fullUrl$ = $application.baseUrl$ + $endpoint.relativeUrl$ + ?pageIndex=+ $offset$
Definition : A VA is a Linux-based virtual machine that connects to your sources and apps using SailPoint APIs, connectors, and integrations...