Policy > Networking > Network Services > Advanced Load Balancing > Alb Waf Policies

Create or update a ALBWafPolicy

If a ALBWafPolicy with the alb-WafPolicy-id is not
already present, create a new ALBWafPolicy. If it already exists,
update the ALBWafPolicy. This is a full replace.
This API is only available when using VMware NSX-T.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/alb-waf-policies/<alb-wafpolicy-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ALBWafPolicy+

Example Request:

{ "allow_mode_delegation": true, "confidence_override": { "confid_high_value": 9500, "confid_low_value": 7500, "confid_probable_value": 9000, "confid_very_high_value": 9999 }, "crs_groups": [ { "enable": true, "index": 0, "name": "CRS_402_Additional_Rules", "rules": [ { "enable": true, "index": 0, "name": "Desync attack detected", "rule": "SecRule &REQUEST_HEADERS:Content-Length \"@gt 0\" \"id:4022010, phase:1, block, t:none, msg:'Desync attack detected', tag:'application-multi', tag:'language-multi', tag:'platform-multi', tag:'attack-protocol', ver:'AVI_CRS/2019_2', severity:'WARNING', chain\"\nSecRule &REQUEST_HEADERS:Transfer-Encoding \"@gt 0\" \"setvar:'tx.anomaly_score_pl1=+%{tx.warning_anomaly_score}', setvar:'tx.http_violation_score=+%{tx.warning_anomaly_score}'\"", "rule_id": "4022010" }, { "enable": true, "index": 1, "name": "Multiple Transfer Encoding Headers detected", "rule": "SecRule &REQUEST_HEADERS:Transfer-Encoding \"@gt 1\" \"id:4022020, phase:1, block, t:none, msg:'Multiple Transfer Encoding Headers detected', tag:'application-multi', tag:'language-multi', tag:'platform-multi', tag:'attack-protocol', ver:'AVI_CRS/2019_2', severity:'WARNING', setvar:'tx.anomaly_score_pl1=+%{tx.warning_anomaly_score}', setvar:'tx.http_violation_score=+%{tx.warning_anomaly_score}'\"", "rule_id": "4022020" }, { "enable": true, "index": 2, "name": "Failed to parse request body.", "rule": "SecRule REQBODY_ERROR \"!@eq 0\" \"id:4022030, phase:2, block, t:none, msg:'Failed to parse request body.', tag:'application-multi', tag:'language-multi', tag:'platform-multi', tag:'attack-protocol', ver:'AVI_CRS/2019_3', severity:'CRITICAL', setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'\"", "rule_id": "4022030" }, { "enable": true, "index": 3, "name": "Multipart request body failed strict validation.", "rule": "SecRule MULTIPART_STRICT_ERROR \"!@eq 0\" \"id:4022031, phase:2, block, t:none, msg:'Multipart request body failed strict validation.', tag:'application-multi', tag:'language-multi', tag:'platform-multi', tag:'attack-protocol', ver:'AVI_CRS/2019_3', severity:'CRITICAL', setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}'\"", "rule_id": "4022031" } ] } ], "display_name": "test-WAF-Policy", "enable_app_learning": false, "enable_auto_rule_updates": true, "failure_mode": "WAF_FAILURE_MODE_OPEN", "learning_params": { "enable_per_uri_learning": true, "max_params": 100, "max_uris": 500, "min_hits_to_learn": 10000, "sampling_percent": 1, "update_interval": 30 }, "min_confidence": "CONFIDENCE_VERY_HIGH", "mode": "WAF_MODE_DETECTION_ONLY", "paranoia_level": "WAF_PARANOIA_LEVEL_LOW", "waf_crs_path": "/infra/alb-waf-crs/test-waf-crs", "waf_profile_path": "/infra/alb-waf-profiles/test-waf-profile" }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ALBWafPolicy+

Example Response:

{ "_create_time": 1604070856976, "_create_user": "admin", "_last_modified_time": 1604070857297, "_last_modified_user": "admin", "_protection": "NOT_PROTECTED", "_revision": 0, "_system_owned": false, "allow_mode_delegation": true, "crs_groups": [ { "enable": true, "index": 0, "name": "CRS_402_Additional_Rules", "rules": [ { "avi_tags": [ "platform-multi", "language-multi", "attack-protocol", "application-multi" ], "enable": true, "index": 0, "is_sensitive": false, "name": "Desync attack detected", "rule": "SecRule &REQUEST_HEADERS:Content-Length \"@gt 0\" \"id:4022010, phase:1, block, t:none, msg:'Desync attack detected', tag:'application-multi', tag:'language-multi', tag:'platform-multi', tag:'attack-protocol', ver:'AVI_CRS/2019_2', severity:'WARNING', chain\"\nSecRule &REQUEST_HEADERS:Transfer-Encoding \"@gt 0\" \"setvar:'tx.anomaly_score_pl1=+%{tx.warning_anomaly_score}', setvar:'tx.http_violation_score=+%{tx.warning_anomaly_score}'\"", "rule_id": "4022010" } ] } ], "display_name": "test-WAF-Policy", "enable_app_learning": false, "enable_auto_rule_updates": true, "failure_mode": "WAF_FAILURE_MODE_OPEN", "id": "test-WAF-Policy", "is_system_default": true, "learning_params": { "enable_per_uri_learning": true, "max_params": 100, "max_uris": 500, "min_hits_to_learn": 10000, "sampling_percent": 1, "update_interval": 30 }, "marked_for_delete": false, "min_confidence": "CONFIDENCE_VERY_HIGH", "mode": "WAF_MODE_DETECTION_ONLY", "overridden": false, "paranoia_level": "WAF_PARANOIA_LEVEL_LOW", "parent_path": "/infra", "path": "/infra/alb-waf-policies/test-WAF-Policy", "relative_path": "test-WAF-Policy", "resource_type": "ALBWafPolicy", "unique_id": "7ae756f3-bd33-4a73-ae9d-251a33c60c48", "waf_crs_path": "/infra/alb-waf-crs/CRS-2020-3", "waf_profile_path": "/infra/alb-waf-profiles/test-WAF-Policy" }

Required Permissions:

crud

Feature:

policy_lb

Additional Errors: