Applies To:
Show VersionsBIG-IP ASM
- 13.1.5, 13.1.4, 13.1.3, 13.1.1, 13.1.0
Configuring advanced general settings on a profile
Enable an iRule to handle logins and alerts
iRule events
iRules® can subscribe to the ANTIFRAUD_ALERT event and the ANTIFRAUD_LOGIN event in BIG-IP® DataSafe™
iRule event | Description |
---|---|
ANTIFRAUD_ALERT | Occurs when alerts are sent to the BIG-IP® system. |
ANTIFRAUD_LOGIN | Occurs when a user successfully logs in to the profile. Or if login validation is not configured, this event can occur if just the user name is identified. |
iRule Examples
The following example shows how an iRule uses the ANTIFRAUD_ALERT event to log all available information about an alert that was sent by the BIG-IP system to the location /var/log/ltm.
when ANTIFRAUD_ALERT{ log local0. "=========Anti-Fraud Alert=========" log local0. "Alert Identifier: [ANTIFRAUD::alert_id]" log local0. "Alert Type: [ANTIFRAUD::alert_type]" log local0. "Alert Component: [ANTIFRAUD::alert_component]" log local0. "Alert Details: [ANTIFRAUD::alert_details]" log local0. "Alert GUID: [ANTIFRAUD::alert_guid]" log local0. "Alert Device ID: [ANTIFRAUD::alert_device_id]" log local0. "Alert License ID: [ANTIFRAUD::alert_license_id]" log local0. "Alert Score: [ANTIFRAUD::alert_score]" log local0. "Alert Transaction Data: [ANTIFRAUD::alert_transaction_data]" log local0. "Alert Username: [ANTIFRAUD::alert_username]" log local0. "Alert HTTP Referrer: [ANTIFRAUD::alert_http_referrer]" log local0. "Alert Additional Info: [ANTIFRAUD::alert_additional_info]" log local0. "Alert Forbidden Added Element: [ANTIFRAUD::alert_forbidden_added_element]" log local0. "Alert Bait Signatures: [ANTIFRAUD::alert_bait_signatures]" log local0. "Alert HTML: [ANTIFRAUD::alert_html]" }
The following example shows how an iRule uses the ANTIFRAUD_ALERT event to disable a specific alert according to its type.
when ANTIFRAUD_ALERT{ if {[ANTIFRAUD::alert_type] eq "components_validation"}{ log local0. "Alert Type is components validation" ANTIFRAUD::disable_alert log local0. "Disabled Alert" } }
The following example shows how an iRule uses the ANTIFRAUD_LOGIN event with its commands.
when ANTIFRAUD_LOGIN{ log local0. "=========Anti-Fraud Login=========" # read mode log local0. "Username: [ANTIFRAUD::username]" log local0. "GUID: [ANTIFRAUD::guid]" # write mode ANTIFRAUD::username "other_user" }
Values for iRule commands
The following values can be used in iRule commands:Value | Description |
---|---|
alert_id | For example, d4. |
alert_type | The type of alert. |
alert_component | An error type that is determined according to the alert_type. |
alert_details | Additional information regarding the alert. |
alert_device_id | Persistent browser identifier. |
alert_license_id | crc32 of the license id in hex. |
alert_transaction_data | Key-value list of all parameters marked to be attached. |
alert_username |
When this command is used without any additional arguments, this is the name of the user who triggered the alert. It is possible to use additional arguments to override the current user name (write mode), as shown in the ANTIFRAUD_LOGIN example above. |
alert_http_referrer | The URL of the site that was visited just before the Alert URL was visited. |
alert_additional_info |
Shows additional information about the alert, such as the parameter values too long error message. |
disable_alert | Disables the current alert. |