Share all details related to your problem, including any error messages you may have received.
Hi, We have a requirement to set sensitivity for newly added entitlements by default to itsensitive.
We created custom rule to set sensitivity for the entitlements by created date which will be called in task definition
Can anyone suggest do we have inbuilt method to set classification in managed attribute.
ma.setRequestable // used to set requestable
ma.setowner //used to set owner
Likewise do we have any method to set the classification as Itsensitive.
Also, what do we need to send in query options to pull the enitlements on created date as current date. Any suggestions will be helpfull.
To set it you can use native IIQ agregation process no need for custom task really.
You can create a customization rule and set it on the app level to set correct classification.
Use groupRefresh rule which can do the same but it is configured in the groups aggregation task xml.
The difference btween this solutions is that no. 1 works only for newly aggregated entitlements thateans sailpoint will not overwrite changes if you do any to the entitlement. Solution no. 2 is fired for every single entitlement during every aggregation that means it will overwritenyour changes.
Thanks for your input but our requirement is very specifc for audit purpose. We have to send querry options as created date as current date and mark the sensitivity as itsensitive.
I tried setClassification but it is throwing error method not found. DO we have any import object.
Also, how do we need to send querry options as created date and current date.
Any help will be much usefull
First you need to create classification object based on the guide here (classification from other sources) 8.3 IdentityIQ Classifications Guide - Compass
then you need to retrieve the classification object using context, afterwards you can pass it to the managed attribute.
Our requirement is we need to set sensitivity of newly added entitlements as itsensitive by default.
For which we need to create a custom rule to pass created as current date in querry options and set classification as itsensitive.
How do we pass created date as current date in querry option …Also which method we use to setclassification…
I ahve pasted the code . Can you please have a look. Any suggestions will be helpfull
@Preethi Use this below code once the classification is created, do let me know if this worked.
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import sailpoint.object.Application;
import sailpoint.object.Classification;
import sailpoint.object.ObjectClassification;
import sailpoint.object.ManagedAttribute;
import java.util.Date;
import org.apache.commons.lang.time.DateUtils;
import sailpoint.api.IncrementalObjectIterator;
import org.apache.log4j.Logger;
String applicationName="Your App Name";
String classificationName="Your Classification Name"; // provide the name, in your case "Insenstive"
QueryOptions managedQO = new QueryOptions();
Classification classf=context.getObjectByName(Classification.class, classificationName);
managedQO.addFilter(Filter.eq("application.name",applicationName)); //Filter the entitlements belonging to a application, if you dont need this you can remove
Date last1DayDate = new Date();
last1DayDate= DateUtils.addDays(last1DayDate, -1);
managedQO.addFilter(Filter.gt("created",last1DayDate));// Filter to Get entitlements created in last 1 day
IncrementalObjectIterator<ManagedAttribute> managedAttrsIterator = new IncrementalObjectIterator<ManagedAttribute>(context, ManagedAttribute.class, managedQO);
while (managedAttrsIterator.hasNext()) {
ObjectClassification objClassf=new ObjectClassification();
objClassf.setClassification(classf);
ManagedAttribute managedAttr = (ManagedAttribute) managedAttrsIterator.next();
managedAttr.addClassification(objClassf);
context.saveObject(managedAttr);
context.commitTransaction();
}
Thank you for giving me the details.
Already we have the classifcation as below, and I created object classification in my rule and tried to set the classification. But sensitivity is not getting updated and I don’t see any issues. I created one test entitlement yesturday…
<?xml version='1.0' encoding='UTF-8'?>
This rule is used to mark sensitivity for newly added entitlment by default
import sailpoint.object.*;
import sailpoint.object.ManagedAttribute;
import sailpoint.object.Application;
import sailpoint.object.Identity;
import sailpoint.object.Filter;
import sailpoint.object.QueryOptions;
import sailpoint.object.Classification;
objClassf.setClassification(classf);
Date last1DayDate = new Date();
last1DayDate= DateUtils.addDays(last1DayDate, -1);
qo.addFilter(Filter.eq(“application.name”,“Veritax”));
qo.addFilter(Filter.gt(“created”,last1DayDate));// Filter to Get entitlements created in last 1 day
log.error (“qo list is :”+qo);
IncrementalObjectIterator<ManagedAttribute> managedAttrsIterator = new IncrementalObjectIterator<ManagedAttribute>(context, ManagedAttribute.class, qo);
log.error (“Entitlement list is :”+managedAttrsIterator);
while (managedAttrsIterator.hasNext()) {
ManagedAttribute managedAttr = (ManagedAttribute) managedAttrsIterator.next();
log.error ("managedAttr list is :"+managedAttr);
managedAttr.addClassification(objClassf);
context.saveObject(managedAttr);
context.commitTransaction();
As per your suggestion the code has been modified. But sensitivity is not getting updated.
<?xml version='1.0' encoding='UTF-8'?>
This rule is used to mark sensitivity for newly added entitlment by default
import sailpoint.object.*;
import sailpoint.object.ManagedAttribute;
import sailpoint.object.Application;
import sailpoint.object.Identity;
import sailpoint.object.Filter;
import sailpoint.object.QueryOptions;
import sailpoint.object.Classification;
objClassf.setClassification(classf);
Date last1DayDate = new Date();
last1DayDate= DateUtils.addDays(last1DayDate, -1);
qo.addFilter(Filter.eq(“application.name”,“Veritax”)); //qo.addFilter(Filter.gt(“created”,last1DayDate));// Filter to Get entitlements created in last 1 day
log.error (“qo list is :”+qo);
IncrementalObjectIterator<ManagedAttribute> managedAttrsIterator = new IncrementalObjectIterator<ManagedAttribute>(context, ManagedAttribute.class, qo);
log.error (“Entitlement list is :”+managedAttrsIterator);
while (managedAttrsIterator.hasNext()) {
ManagedAttribute managedAttr = (ManagedAttribute) managedAttrsIterator.next();
log.error ("managedAttr list is :"+managedAttr);
managedAttr.addClassification(objClassf);
context.saveObject(managedAttr);
context.commitTransaction();
log.error ("saved managedAttr list is :"+managedAttr);
what I see is missing here is ownerID which should be ID of the managedAttribute object and also ownerType which should be set to managedAttribute. It would be also good to set source but I think it’s not required.