From 59e66e30c2aa82947c1f00ec64eec117efa8846d Mon Sep 17 00:00:00 2001 From: Christian Ruppert Date: Sun, 20 Feb 2022 22:54:01 +0100 Subject: [PATCH] DOC: Fix usage/examples of deprecated ACLs Some examples or references were still using deprecated ACL variants. Signed-off-by: Christian Ruppert --- doc/configuration.txt | 99 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 51 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 0c62b56bf..572c79d55 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4056,7 +4056,7 @@ balance url_param [check_post] rdp-cookie() The RDP cookie (or "mstshash" if omitted) will be looked up and hashed for each incoming TCP request. Just as - with the equivalent ACL 'req_rdp_cookie()' function, the name + with the equivalent ACL 'req.rdp_cookie()' function, the name is not case-sensitive. This mechanism is useful as a degraded persistence mode, as it makes it possible to always send the same user (or the same session ID) to the same server. If the @@ -4066,14 +4066,12 @@ balance url_param [check_post] Note that for this to work, the frontend must ensure that an RDP cookie is already present in the request buffer. For this you must use 'tcp-request content accept' rule combined with - a 'req_rdp_cookie_cnt' ACL. + a 'req.rdp_cookie_cnt' ACL. This algorithm is static by default, which means that changing a server's weight on the fly will have no effect, but this can be changed using "hash-type". - See also the rdp_cookie pattern fetch function. - is an optional list of arguments which may be needed by some algorithms. Right now, only "url_param" and "uri" support an optional argument. @@ -9985,8 +9983,7 @@ persist rdp-cookie() server srv1 1.1.1.1:3389 server srv2 1.1.1.2:3389 - See also : "balance rdp-cookie", "tcp-request", the "req_rdp_cookie" ACL and - the rdp_cookie pattern fetch function. + See also : "balance rdp-cookie", "tcp-request" and the "req.rdp_cookie" ACL. rate-limit sessions @@ -11607,8 +11604,8 @@ stick store-response [table ] [{if | unless} ] # maximum SSL session ID length is 32 bytes. stick-table type binary len 32 size 30k expire 30m - acl clienthello req_ssl_hello_type 1 - acl serverhello rep_ssl_hello_type 2 + acl clienthello req.ssl_hello_type 1 + acl serverhello rep.ssl_hello_type 2 # use tcp content accepts to detects ssl client and server hello. tcp-request inspect-delay 5s @@ -11622,10 +11619,10 @@ stick store-response [table
] [{if | unless} ] # at offset 44. # Match and learn on request if client hello. - stick on payload_lv(43,1) if clienthello + stick on req.payload_lv(43,1) if clienthello # Learn on response if server hello. - stick store-response payload_lv(43,1) if serverhello + stick store-response resp.payload_lv(43,1) if serverhello server s1 192.168.1.1:443 server s2 192.168.1.1:443 @@ -12349,12 +12346,12 @@ tcp-request content [{if | unless} ] Example: # reject SMTP connection if client speaks first tcp-request inspect-delay 30s - acl content_present req_len gt 0 + acl content_present req.len gt 0 tcp-request content reject if content_present # Forward HTTPS connection only if client speaks tcp-request inspect-delay 30s - acl content_present req_len gt 0 + acl content_present req.len gt 0 tcp-request content accept if content_present tcp-request content reject @@ -15882,17 +15879,17 @@ be placed first. The pattern matching method must be one of the following : For example, to quickly detect the presence of cookie "JSESSIONID" in an HTTP request, it is possible to do : - acl jsess_present cook(JSESSIONID) -m found + acl jsess_present req.cook(JSESSIONID) -m found In order to apply a regular expression on the 500 first bytes of data in the buffer, one would use the following acl : - acl script_tag payload(0,500) -m reg -i