{ "id":"/axapi/v3/ddos/template/http/{http-tmpl-name}", "type":"object", "node-type":"list", "title":"http", "partition-visibility":"shared", "description":"HTTP template Configuration", "properties":{ "http-tmpl-name":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared", "description":"DDOS HTTP Template Name", "optional":false }, "multi-pu-threshold-distribution":{ "type":"object", "properties":{ "multi-pu-threshold-distribution-value":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "not":"multi-pu-threshold-distribution-disable", "description":"Destination side rate limit only. Default: 0" }, "multi-pu-threshold-distribution-disable":{ "type":"string", "format":"enum", "partition-visibility":"shared", "not":"multi-pu-threshold-distribution-value", "description":"'disable': Destination side rate limit only. Default: Enable; ", "enum":[ "disable" ] } } }, "action":{ "type":"string", "format":"enum", "default":"drop", "partition-visibility":"shared", "description":"'drop': Drop packets for the connection; 'reset': Send RST for the connection; ", "enum":[ "drop", "reset" ], "optional":true }, "disable":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Disable this template", "optional":true }, "mss-cfg":{ "type":"object", "properties":{ "mss-timeout":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Configure DDOS detection based on mss and packet size" }, "mss-percent":{ "type":"number", "format":"number", "minimum":1, "maximum":100, "partition-visibility":"shared", "description":"Configure percentage of mss such that if a packet size is below the mss times mss-percent, packet is considered bad." }, "number-packets":{ "type":"number", "format":"number", "minimum":1, "maximum":31, "partition-visibility":"shared", "description":"Specify percentage of mss. Default is 0, mss-timeout is not enabled." } } }, "disallow-connect-method":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Do not allow HTTP Connect method (asymmetric mode only)", "optional":true }, "challenge-method":{ "type":"string", "format":"enum", "partition-visibility":"shared", "description":"'http-redirect': http-redirect; 'javascript': javascript; ", "enum":[ "http-redirect", "javascript" ], "optional":true }, "challenge-redirect-code":{ "type":"string", "format":"enum", "default":"302", "partition-visibility":"shared", "description":"'302': 302 Found; '307': 307 Temporary Redirect; ", "enum":[ "302", "307" ], "optional":true }, "challenge-uri-encode":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Encode the challenge phrase in uri instead of in http cookie. Default encoded in http cookie", "optional":true }, "challenge-cookie-name":{ "type":"string", "format":"string", "minLength":1, "maxLength":63, "default":"sto-idd", "partition-visibility":"shared", "description":"Set the cookie name used to send back to client. Default is sto-idd", "optional":true }, "challenge-keep-cookie":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Keep the challenge cookie from client and forward to backend. Default is do not keep", "optional":true }, "challenge-interval":{ "type":"number", "format":"number", "minimum":1, "maximum":31, "default":8, "partition-visibility":"shared", "description":"Specify the challenge interval. Default is 8 seconds", "optional":true }, "non-http-bypass":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Bypass non-http traffic instead of dropping", "optional":true }, "malformed-http":{ "type":"object", "properties":{ "malformed-http-enabled":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Enabling ddos malformed http protection. Default value is disabled." }, "malformed-http-max-line-size":{ "type":"number", "format":"number", "minimum":1, "maximum":65280, "default":32512, "partition-visibility":"shared", "description":"Set the maximum line size. Default value is 32512" }, "malformed-http-max-num-headers":{ "type":"number", "format":"number", "minimum":1, "maximum":90, "default":90, "partition-visibility":"shared", "description":"Set the maximum number of headers. Default value is 90" }, "malformed-http-max-req-line-size":{ "type":"number", "format":"number", "minimum":1, "maximum":65280, "default":32512, "partition-visibility":"shared", "description":"Set the maximum request line size. Default value is 32512" }, "malformed-http-max-header-name-size":{ "type":"number", "format":"number", "minimum":1, "maximum":64, "default":64, "partition-visibility":"shared", "description":"Set the maxinum header name length. Default value is 64." }, "malformed-http-max-content-length":{ "type":"number", "format":"number", "minimum":1, "maximum":4294967295, "default":4294967295, "partition-visibility":"shared", "description":"Set the maximum content-length header. Default value is 4294967295 bytes" }, "malformed-http-bad-chunk-mon-enabled":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Enabling bad chunk monitoring. Default is disabled" } } }, "use-hdr-ip-cfg":{ "type":"object", "properties":{ "use-hdr-ip-as-source":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Mitigate on src ip specified by http header for example X-Forwarded-For header. Default is disabled" }, "l7-hdr-name":{ "type":"string", "format":"string", "minLength":1, "maxLength":63, "default":"X-Forwarded-For", "partition-visibility":"shared", "description":"Set the http header name to parse for client ip. Default is X-Forwarded-For" } } }, "request-header":{ "type":"object", "properties":{ "timeout":{ "type":"number", "format":"number", "minimum":1, "maximum":63, "partition-visibility":"shared" } } }, "post-rate-limit":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Configure rate limiting for HTTP POST request", "optional":true }, "request-rate-limit":{ "type":"object", "properties":{ "request-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"HTTP request rate limit" }, "uri":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "equal-cfg":{ "type":"object", "properties":{ "url-equals":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":127, "partition-visibility":"shared", "description":"Request rate-limit HTTP URI matching a specified pattern" }, "url-equals-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Request rate limit" } } }, "contains-cfg":{ "type":"object", "properties":{ "url-contains":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":127, "partition-visibility":"shared", "description":"Request rate-limit HTTP URI containing a specified pattern" }, "url-contains-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Request rate limit" } } }, "starts-cfg":{ "type":"object", "properties":{ "url-starts-with":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":127, "partition-visibility":"shared", "description":"Request rate-limit HTTP URI strting with a specified pattern" }, "url-starts-with-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Request rate limit" } } }, "ends-cfg":{ "type":"object", "properties":{ "url-ends-with":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":127, "partition-visibility":"shared", "description":"Request rate-limit HTTP URI ending with a specified pattern" }, "url-ends-with-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Request rate limit" } } } } } ] } } }, "response-rate-limit":{ "type":"object", "properties":{ "obj-size":{ "type":"object", "properties":{ "less-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "obj-less":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response size configuration" }, "obj-less-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response rate limit" } } } ] }, "greater-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "obj-greater":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response size configuration" }, "obj-greater-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response rate limit" } } } ] }, "between-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "obj-between1":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response size configuration" }, "obj-between2":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response size configuration" }, "obj-between-rate":{ "type":"number", "format":"number", "minimum":1, "maximum":16000000, "partition-visibility":"shared", "description":"Response rate limit" } } } ] } } } } }, "slow-read-drop":{ "type":"object", "properties":{ "min-window-size":{ "type":"number", "format":"number", "minimum":1, "maximum":65535, "partition-visibility":"shared", "description":"minimum window size" }, "min-window-count":{ "type":"number", "format":"number", "minimum":1, "maximum":31, "partition-visibility":"shared", "description":"Number of packets" } } }, "idle-timeout":{ "type":"number", "format":"number", "minimum":1, "maximum":63, "partition-visibility":"shared", "description":"Set the the idle timeout value in seconds for HTTP connections", "optional":true }, "ignore-zero-payload":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Don't reset idle timer on packets with zero payload length from clients", "optional":true }, "out-of-order-queue-size":{ "type":"number", "format":"number", "minimum":0, "maximum":15, "default":3, "partition-visibility":"shared", "description":"Set the number of packets for the out-of-order HTTP queue (asym mode only)", "optional":true }, "out-of-order-queue-timeout":{ "type":"number", "format":"number", "minimum":0, "maximum":15, "default":3, "partition-visibility":"shared", "description":"Set the timeout value in seconds for out-of-order queue in HTTP (asym mode only)", "optional":true }, "referer-filter":{ "type":"object", "properties":{ "ref-filter-blacklist":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Blacklist the source if the referer matches" }, "referer-equals-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "referer-equals":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] }, "referer-contains-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "referer-contains":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] }, "referer-starts-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "referer-starts-with":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] }, "referer-ends-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "referer-ends-with":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] } } }, "agent-filter":{ "type":"object", "properties":{ "agent-filter-blacklist":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Blacklist the source if the user-agent matches" }, "agent-equals-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "agent-equals":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] }, "agent-contains-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "agent-contains":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] }, "agent-starts-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "agent-starts-with":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] }, "agent-ends-cfg":{ "type":"array", "minItems":1, "items":{ "type":"object" }, "uniqueItems":true, "array":[ { "properties":{ "agent-ends-with":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":63, "partition-visibility":"shared" } } } ] } } }, "uuid":{ "type":"string", "format":"string", "minLength":1, "maxLength":64, "partition-visibility":"shared", "modify-not-allowed":1, "description":"uuid of the object", "optional":true }, "user-tag":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":127, "partition-visibility":"shared", "description":"Customized tag", "optional":true }, "filter-header-list":{ "type":"array", "minItems":1, "items":{ "type":"filter-header" }, "uniqueItems":true, "$ref":"/axapi/v3/ddos/template/http/{http-tmpl-name}/filter-header/{http-filter-header-seq}", "array":[ { "properties":{ "http-filter-header-seq":{ "type":"number", "format":"number", "minimum":1, "maximum":5, "partition-visibility":"shared", "description":"Sequence number", "optional":false }, "http-filter-header-regex":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":1275, "partition-visibility":"shared", "description":"Regex Expression", "optional":true }, "http-filter-header-unmatched":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"action taken when it does not match", "optional":true }, "http-filter-header-blacklist":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Also blacklist the source when action is taken", "optional":true }, "http-filter-header-whitelist":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Whitelist the source after filter passes, packets are dropped until then", "optional":true }, "http-filter-header-count-only":{ "type":"number", "format":"flag", "default":0, "partition-visibility":"shared", "description":"Take no action and continue processing the next filter", "optional":true }, "uuid":{ "type":"string", "format":"string", "minLength":1, "maxLength":64, "partition-visibility":"shared", "modify-not-allowed":1, "description":"uuid of the object", "optional":true }, "user-tag":{ "type":"string", "format":"string-rlx", "minLength":1, "maxLength":127, "partition-visibility":"shared", "description":"Customized tag", "optional":true } }, "required":[ "http-filter-header-seq" ] } ] } }, "object-keys":[ "http-tmpl-name" ], "required":[ "http-tmpl-name" ] }