config security waf data-leak-protection
Use this command to configure a DLP policy that can then be applied in a WAF profile. The Data Loss Prevention (DLP) feature allows the Web Application Firewall (WAF) to prevent information leaks, damage and loss. DLP provides desensitization and warning measures for sensitive information leaks on websites, such as SSN numbers and credit card information, as well as the leakage of sensitive keywords.
You can create a DLP Policy to match a sensor based on file content or an HTTP Payload, and the email protocol being used to attach files. It also allows you to choose the action to allow, log, or block the IP address.
Before you begin:
- Configure a virtual server with a WAF Profile.
- Configure a DLP Dictionary object. For details, see config security waf dlp-dictionary.
- Configure a DLP Sensor object. For details, see config security waf dlp-sensors.
- Configure a Sensitive Data Type object. For details, see config security waf sensitive-data-type.
Syntax
config security waf data-leak-prevention
edit <name>
set status {enable|disable}
set masking {enable|disable}
set action {alert|deny|block|silent-deny|captcha|<datasource>}
set severity {high|medium|low}
config rule
edit <name>
set request-uri-pattern <string>
set type {sdt|sensors}
set sensor <datasource>
set sensitive-data-type <datasource>
set threshold <integer>
next
end
next
end
status |
Enable or disable the profile; default is disable. |
masking |
Enable masking to replace sensitive data with asterisks (*); default is disable. Note: When masking is enabled, all target data will be replaced by asterisks, so the threshold value won't take effect here. Masking only works when Action is Alert, because the connection will reject when action is set as Deny or Block, so no target data will be replaced. |
action |
Sets the action FortiADC will take if a security check detects a potential attack. This configuration comes from Action in WAF Profile.
Note: You can also reference a user-defined WAF action object. |
severity |
Set the severity in WAF logs for potential attacks detected by DLP Policy.
The default option is low. |
config rule |
|
request-uri-pattern |
Specify the URI Pattern in the Data Loss Prevention rules. Scanning and receiving an empty value means this rule is not working. |
type |
Select the DLP data type to match:
|
sensor |
The sensor option is available if type is sensors. Specify the DLP Sensor you want to apply. |
sensitive-data-type |
The sensitive-data-type option is available if type is sdt. Specify the Sensitive Data Type you want to apply. |
threshold |
The threshold option is available if type is sdt. Set a threshold for the Data Loss Prevention rule. |
Example
config security waf data-leak-prevention
edit "dlp-profile-sensors"
set status enable
set masking enable
set action alert
set severity low
config rule
edit 1
set request-uri-pattern /dir1/
set type sensors
set sensor user-defined-sensor1
next
end
next
end
config security waf data-leak-prevention
edit "dlp-profile-sdt"
set status enable
set action alert
set severity low
config rule
edit 1
set type sdt
set sensitive-data-type Credit_Card_Number
set threshold 1
next
end
next
end