mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 11:43:26 +08:00
127 lines
15 KiB
JSON
127 lines
15 KiB
JSON
|
|
{
|
|||
|
|
"sections": [
|
|||
|
|
"title",
|
|||
|
|
"description",
|
|||
|
|
"file_information",
|
|||
|
|
"directory_location",
|
|||
|
|
"fields",
|
|||
|
|
"sub_types",
|
|||
|
|
"wsdl_segment",
|
|||
|
|
"declarative_metadata_sample_definition"
|
|||
|
|
],
|
|||
|
|
"title": "TransactionSecurityPolicy - Metadata API",
|
|||
|
|
"description": "Represents a transaction security policy definition. Transaction security policies give you a way to look through events in your organization and specify actions to take when certain combinations occur.",
|
|||
|
|
"file_information": ".transactionSecurityPolicy",
|
|||
|
|
"directory_location": "transactionSecurityPolicies",
|
|||
|
|
"fields_columns": [
|
|||
|
|
"type",
|
|||
|
|
"description"
|
|||
|
|
],
|
|||
|
|
"fields": {
|
|||
|
|
"action": {
|
|||
|
|
"type": "TransactionSecurityAction",
|
|||
|
|
"description": "Describes the action to take when the matching Transaction Security policy is triggered.",
|
|||
|
|
"required": true
|
|||
|
|
},
|
|||
|
|
"active": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "If true, the policy is enabled and actively monitors its event.",
|
|||
|
|
"required": true
|
|||
|
|
},
|
|||
|
|
"apexClass": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "Required for Apex-based policies, and optional for all other policies. The name of the class that implements the TxnSecurity.PolicyCondition or TxnSecurity.EventCondition interface for this policy. Available in API version 46.0 and later.",
|
|||
|
|
"required": true
|
|||
|
|
},
|
|||
|
|
"blockMessage": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "The custom message sent to a user when a policy blocks their action. Used in Real-Time Event Monitoring only. Maximum of 1000 characters. This field is null when the default message option is selected in the UI. Available only when eventName is set to ApiEvent, ListViewEvent, BulkApiResultEventStore, or ReportEvent. Available in API version 49.0 and later. Include org- or policy-specific information in your custom message, such as the name of the responsible administrator or the business unit. Be careful about what you include. Too much information on how the policy was designed. can aid a malicious user. Two-factor authentication (2FA) isn’t supported in Lightning Experience, so events like ListView and ReportEvent are upgraded to Block in Lightning. Custom messages aren’t translatable."
|
|||
|
|
},
|
|||
|
|
"customEmailContent": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "The administrator-created custom email content sent when a policy is triggered. Used in Real-Time Event Monitoring only. Maximum of 1333 characters. This field is null when the Custom Email Content setting is selected in the UI but no message content is entered. Available in API version 54.0 and later. Custom messages aren’t translatable."
|
|||
|
|
},
|
|||
|
|
"description": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "A description of the policy."
|
|||
|
|
},
|
|||
|
|
"developerName": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "This unique name prevents conflicts with other policies that have the same masterLabel. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field."
|
|||
|
|
},
|
|||
|
|
"eventName": {
|
|||
|
|
"type": "TransactionSecurityEventName (enumeration of type string)",
|
|||
|
|
"description": "Used in Real-Time Event Monitoring only. Indicates the name of the event the policy monitors. This field is available in API 45.0 and later. Valid values are: ApiEvent—Tracks these user-initiated read-only API calls: query(), queryMore(), and count(). Captures API requests through SOAP API and Bulk API for the Enterprise and Partner WSDLs. Tooling API calls and API calls originating from a Salesforce mobile app aren’t captured. ApiAnomalyEventStore—Tracks anomalies in how users make API calls. ApiAnomalyEventStore is an object that stores the event data of ApiAnomalyEvent. This object is available in API version 50.0 and later. BulkApiResultEventStore—Tracks when a user downloads the results of a Bulk API request. BulkApiResultEventStore is a big object that stores the event data of BulkApiResultEvent. This object is available in API version 50.0 and later. CredentialStuffingEventStore—Tracks when a user successfully logs into Salesforce during an identified credential stuffing attack. Credential stuffing refers to large-scale automated login requests using stolen user credentials.This value is available in API version 49.0 and later. FileEventStore (beta)—Tracks when a user downloads, previews, or uploads a file. FileEventStore is a big object that stores the event data of FileEvent. This object is available in API version 57.0 and later. GuestUserAnomalyEventStore—Tracks data access anomalies that are caused by guest user permission misconfiguration. This object is available in API version 60.0 and later. ListViewEvent—Tracks when users access data with list views using Lightning Experience, Salesforce Classic, or the API. It doesn’t track list views of Setup entities. LoginAsEvent—Tracks the login activity of admins who log in to Salesforce as other users. This object is available in API version 46.0 and later. LoginEvent—LoginEvent tracks the login activity of users who log in to Salesforce. PermissionSetEventStore —Tracks changes to permission sets and permission set groups. ReportAnomalyEventStore— This value is available in API version 49.0 and later. ReportEvent—Tracks when reports are run in your org. SessionHijackingEventStore—Tracks when unauthorized users gain ownership of a Salesforce user’s session with a stolen session identifier. To detect such an event, Salesforce evaluates how significantly a user’s current browser fingerprint diverges from the previously known fingerprint using a probabilistically inferred significance of change. Available in API version 49.0 and later."
|
|||
|
|
},
|
|||
|
|
"eventType": {
|
|||
|
|
"type": "MonitoredEvents (enumeration of type string)",
|
|||
|
|
"description": "Used in Legacy Transaction Security only. Required for Apex-based policies, and optional for all other policies. Indicates which type of event is being monitored. Valid values are: AccessResource—Notifies you when the selected resource has been accessed. AuditTrail—Reserved for future use. DataExport—Notifies you when the selected object type has been exported using the Data Loader API client. Entity—Notifies you on use of an object type such as an authentication provider or Chatter comment. Login—Notifies you when a user logs in. As of Summer '20, Legacy Transaction Security is a retired feature in all Salesforce orgs."
|
|||
|
|
},
|
|||
|
|
"executionUser": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "Used in Legacy Transaction Security only. The name or ID of an active user who is assigned the Modify All Data and View Setup user permissions. As of Summer '20, Legacy Transaction Security is a retired feature in all Salesforce orgs."
|
|||
|
|
},
|
|||
|
|
"flowId": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "Required only for policies of type CustomConditionBuilderPolicy. The ID of the Flow object that contains the logic the Condition Builder transaction security policy. Available in API version 46.0 and later.",
|
|||
|
|
"required": true
|
|||
|
|
},
|
|||
|
|
"masterLabel": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "The label for this object. This display value is the internal label that is’t translated. Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations."
|
|||
|
|
},
|
|||
|
|
"resourceName": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "Used in Legacy Transaction Security only. Required for Apex-based policies, and optional for all other policies. A resource used to narrow down the conditions under which the policy triggers. For example, with a DataExport event, you can select a resource Lead to specifically monitor export activity occurring on your Lead entities. The resources available depend on the Event Type field. The following valid resources are grouped by event type. AccessResource—ConnectedApplication, Reports DataExport—Account, Case, Contact, Lead, Opportunity Entity—AuthProvider, ChatterMessage, FeedComment, FeedItem, Idea, Question Login—LoginHistory As of Summer '20, Legacy Transaction Security is a retired feature in all Salesforce orgs."
|
|||
|
|
},
|
|||
|
|
"type": {
|
|||
|
|
"type": "TxnSecurityPolicyType (enumeration of type string)",
|
|||
|
|
"description": "The type of validation that the policy uses. The valid values are: CustomApexPolicy— Created with Apex editor. CustomConditionBuilderPolicy— Created with Condition Builder. The default value is CustomApexPolicy."
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"sub_types": {
|
|||
|
|
"TransactionSecurityAction": {
|
|||
|
|
"block": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "If true, the requested operation is blocked. This action only applies to Login and AccessResource events."
|
|||
|
|
},
|
|||
|
|
"endSession": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "Used in Legacy Transaction Security only. If true, a current session must be closed before a new session can be started. This action only applies to Login events. As of Summer '20, Legacy Transaction Security is a retired feature in all Salesforce orgs."
|
|||
|
|
},
|
|||
|
|
"freezeUser": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "Used in Legacy Transaction Security only. If true, the user that triggered the policy is frozen. This action only applies to Chatter resources for Entity events. As of Summer '20, Legacy Transaction Security is a retired feature in all Salesforce orgs."
|
|||
|
|
},
|
|||
|
|
"notifications": {
|
|||
|
|
"type": "TransactionSecurityNotification[]",
|
|||
|
|
"description": "Specifies how to notify the Salesforce administrator when the action is triggered. There can be none, one, or multiple notifications."
|
|||
|
|
},
|
|||
|
|
"twoFactorAuthentication": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "If true, multi-factor authentication (MFA) is required for a higher level of access before the requested operation can continue. This action only applies to Login and AccessResource events. Multi-factor authentication was formerly called two-factor authentication."
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"TransactionSecurityNotification": {
|
|||
|
|
"inApp": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "True if an in-app notification is selected."
|
|||
|
|
},
|
|||
|
|
"sendEmail": {
|
|||
|
|
"type": "boolean",
|
|||
|
|
"description": "True if an email notification is selected."
|
|||
|
|
},
|
|||
|
|
"user": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "The user to receive the notification."
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"wsdl_segment": "```xml\n<xsd:complexType name=\"Metadata\">\n <xsd:sequence>\n <xsd:element name=\"fullName\" minOccurs=\"0\" type=\"xsd:string\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:simpleType name=\"MonitoredEvents\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"AuditTrail\"/>\n <xsd:enumeration value=\"Login\"/>\n <xsd:enumeration value=\"Entity\"/>\n <xsd:enumeration value=\"DataExport\"/>\n <xsd:enumeration value=\"AccessResource\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:complexType name=\"TransactionSecurityAction\">\n <xsd:sequence>\n <xsd:element name=\"block\" type=\"xsd:boolean\"/>\n <xsd:element name=\"endSession\" type=\"xsd:boolean\"/>\n <xsd:element name=\"freezeUser\" type=\"xsd:boolean\"/>\n <xsd:element name=\"notifications\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:TransactionSecurityNotification\"/>\n <xsd:element name=\"twoFactorAuthentication\" type=\"xsd:boolean\"/>\n <xsd:element name=\"useStepUp\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:simpleType name=\"TransactionSecurityEventName\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"ReportEvent\"/>\n <xsd:enumeration value=\"ApiEvent\"/>\n <xsd:enumeration value=\"AdminSetupEvent\"/>\n <xsd:enumeration value=\"LoginEvent\"/>\n <xsd:enumeration value=\"ListViewEvent\"/>\n <xsd:enumeration value=\"CredentialStuffingEventStore\"/>\n <xsd:enumeration value=\"ReportAnomalyEventStore\"/>\n <xsd:enumeration value=\"SessionHijackingEventStore\"/>\n <xsd:enumeration value=\"ApiAnomalyEventStore\"/>\n <xsd:enumeration value=\"BulkApiResultEventStore\"/>\n <xsd:enumeration value=\"PermissionSetEventStore\"/>\n <xsd:enumeration value=\"FileEventStore\"/>\n <xsd:enumeration value=\"GuestUserAnomalyEventStore\"/>\n <xsd:enumeration value=\"LoginAsEvent\"/>\n <xsd:enumeration value=\"LoginAnomalyEventStore\"/>\n <xsd:enumeration value=\"UniversalAnomalyEventStore\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:complexType name=\"TransactionSecurityNotification\">\n <xsd:sequence>\n <xsd:element name=\"inApp\" type=\"xsd:boolean\"/>\n <xsd:element name=\"sendEmail\" type=\"xsd:boolean\"/>\n <xsd:element name=\"user\" type=\"xsd:string\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:complexType name=\"TransactionSecurityPolicy\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"action\" type=\"tns:TransactionSecurityAction\"/>\n <xsd:element name=\"active\" type=\"xsd:boolean\"/>\n <xsd:element name=\"apexClass\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"blockMessage\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"customEmailContent\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"developerName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"eventName\" minOccurs=\"0\" type=\"tns:TransactionSecurityEventName\"/>\n <xsd:element name=\"eventType\" minOccurs=\"0\" type=\"tns:MonitoredEvents\"/>\n <xsd:element name=\"executionUser\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"flow\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"masterLabel\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"resourceName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"type\" minOccurs=\"0\" type=\"tns:TxnSecurityPolicyType\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:simpleType name=\"TxnSecurityPolicyType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"CustomApexPolicy\"/>\n <xsd:enumeration value=\"CustomConditionBuilderPolicy\"/>\n </xsd:restriction>\n</xsd:simpleType>\n```",
|
|||
|
|
"declarative_metadata_sample_definition": [
|
|||
|
|
{
|
|||
|
|
"description": "The following is an example of a Real-Time Event Monitoring TransactionSecurityPolicy component.",
|
|||
|
|
"code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<TransactionSecurityPolicy xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <action>\n <block>true</block>\n <notifications>\n <inApp>true</inApp>\n <sendEmail>true</sendEmail>\n <user>user@your.org</user>\n </notifications>\n <twoFactorAuthentication>false</twoFactorAuthentication>\n </action>\n <active>true</active>\n <apexClass>TxnSecMDApiPolicyEventCondition</apexClass>\n <blockMessage>You cannot view this report.</blockMessage>\n <developerName>TxnSecPolicyMDApi</developerName>\n <eventName>ReportEvent</eventName>\n <masterLabel>Txn Sec MD Api Policy</masterLabel>\n <type>CustomApexPolicy</type>\n</TransactionSecurityPolicy>"
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
}
|