waf client-side-protection-policy
Use this command to configure a Client-Side Protection policy.
Client-Side Protection enables browser-level threat detection by monitoring JavaScript execution and DOM activity in real time. Unlike traditional WAF features that inspect only HTTP traffic, this feature inserts a JavaScript collector or performs passive HTML analysis to detect in-browser threats such as script injection, credential theft, and DOM manipulation.
Client-Side Protection is designed to mitigate risks highlighted in the OWASP Top 10 for client-side security and works in conjunction with static mechanisms like HTTP security headers and Subresource Integrity.
After defining the policy, you must assign it to an inline Web Protection Profile and apply that profile to a Server Policy. To activate enforcement, the Web Protection Profile must also include an HTTP Header Security policy and a Subresource Integrity Check policy.
Before You Begin:
-
A valid license for the Client-Side Protection service is required. Without it, the feature is unavailable in both the CLI and GUI.
-
Ensure that HTTP Header Security and Subresource Integrity Check policies are configured, as they are required for this feature to operate when applied in a Web Protection Profile.
Syntax
config waf client-side-protection-policy
edit <name>
set host-status {enable|disable}
set host <string>
set js-collector {enable|disable}
set collect-ip-range <ip_range>
set passive-assessment {enable|disable}
next
end
Example
config waf client-side-protection-policy
edit csp_policy_1
set host-status enable
set host www.example.com
set js-collector enable
set url-type plain
set url-pattern /secure/
set collect-ip-range 192.168.1.0/24
set passive-assessment disable
next
end