In this blog, we will learn about how we can work with Transaction Security. Before we start working on it, we should have knowledge about what it states in salesforce.
Transaction Security
Transaction Security in Salesforce refers to provide security while an event or a transaction, for ex- login, data export or accessing resources. It is a feature that monitors Salesforce events in real time and takes action with respect to rules i.e. policies that we create. Basically, you can divide it into three parts, i.e. Events, Notification, and Action. Let’s discuss it thoroughly.
Events: The events which are available:
- Data Export for selected objects (Accounts, Case, Contact, Lead, and Opportunity)
- Entity for Authentication providers and login Ip
- Login, for limiting the session and client browser.
- Access resources for connected app and reports and dashboards
Notification: It states that the event has occurred as well as the criteria are satisfied for the policy to be triggered. We can notify the end user through following ways:
- In App Notification in Salesforce 1
Action: The actions which we can take when the criteria is satisfied.
- Block the operation
- Two-factor authentication
- End the current Session
- Send notification
Prerequisites
Example
Output
As you chose Generate Apex option, you can now observe an apex class is generated as following:
global class RestrictLoginSafariPolicyCondition implements TxnSecurity.PolicyCondition { public boolean evaluate(TxnSecurity.Event e) { LoginHistory eObj = [SELECT ApiType FROM LoginHistory WHERE Id = :e.data.get('LoginHistoryId')]; if(eObj.ApiType == 'Safari') { return true; } return false; } }
As well as, you will be unable to login by Safari browser.
Support
That’s all for how we can work with Transaction Security, still, if you have any issue feel free to add a ticket and let us know your views to make it better https://webkul.uvdesk.com/en/customer/create-ticket/
Be the first to comment.