global class DataLoaderLeadExportCondition implements TxnSecurity.PolicyCondition {
public boolean evaluate(TxnSecurity.Event e){
// The event data is a Map<String, String>.
// We need to call the valueOf() method on appropriate data types to use them in our logic.
Integer numberOfRecords = Integer.valueOf(e.data.get('
Long executionTimeMillis = Long.valueOf(e.data.get('
String entityName = e.data.get('EntityName');
// Trigger the policy only if and export on leads, where we are downloading more than 2000
// records or it took more than 1 second (1000ms).
if('Lead'.equals(entityName)){
if(numberOfRecords > 2000 || executionTimeMillis > 1000){
return true;
}
}
// For everything else don't trigger the policy.
return false;
}
}
This helps security teams to stay in the know with realtime actions for large data export events or shield from unwanted data loss.
You can use various triggers, such as time, geolocation, IP, profile etc to customize the report export criteria. Simply choose the Data Export event from the dropdown menu and select Account, Case, Contact, Lead or Opportunity from from the resource name and apply your wanted action, in-app notification, email notification, two factor authentication or block.
Please see the following short demo for applying policy condition on report export with Accounts.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.