Web authentication
-
Server IP—The IP address of the authentication Web server.
-
Server Port—The port of the authentication Web server.
-
Authentication Rule—An expression in NetScaler appliance Advanced policy that contains the user's credentials in the format that the Web server expects.
-
Scheme—HTTP (for unencrypted web authentication) or HTTPS (for encrypted web authentication).
-
Success Rule—An expression in NetScaler appliance Advanced policy that matches the web server response string that signifies that the user authenticated successfully.
To configure a Web authentication action by using the command line interface
add authentication webAuthAction <name> -serverIP <ip_addr|ipv6_addr|*> -serverPort <port|*> [-fullReqExpr <string>] -scheme ( http | https ) -successRule <expression> [-defaultAuthenticationGroup <string>][-Attribute1 <string>][-Attribute2 <string>] [-Attribute3 <string>][-Attribute4 <string>] [-Attribute5 <string>][-Attribute6 <string>] [-Attribute7 <string>][-Attribute8 <string>] [-Attribute9 <string>][-Attribute10 <string>] [-Attribute11 <string>][-Attribute12 <string>] [-Attribute13 <string>][-Attribute14 <string>] [-Attribute15 <string>][-Attribute16 <string>]
add policy expression post_data "\"username=\" + http.REQ.BODY(1000).SET_TEXT_MODE(IGNORECASE).AFTER_STR(\"login=\").BEFORE_STR(\"&\") + \"&passwort=\" + http.REQ.BODY(1000).SET_TEXT_MODE(IGNORECASE).AFTER_STR(\"passwd=\")"
add policy expression length_post_data "(\"username= \" + http.REQ.BODY(1000).SET_TEXT_MODE(IGNORECASE).AFTER_STR(\"login=\").BEFORE_STR(\"&\") + \"passwort=\" + http.REQ.BODY(1000).SET_TEXT_MODE(IGNORECASE).AFTER_STR(\"passwd=\")).length"
add authentication webAuthAction webAuth_POST -serverIP 10.106.187.54 -serverPort 80 -fullReqExpr q{"POST /MyPHP/auth.php HTTP/" + http.req.version.major + "." + http.req.version.major + "\r\nAccept:*/*\r\nHost: 10.106.187.54\r\nReferer: http://10.106.187.54/MyPHP/auth.php\r\nAccept-Language: en-US\r\nUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)\r\nContent-Type: application/x-www-form-urlencoded\r\n" + "Content-Length: " + length_post_data + "\r\nConnection: Keep-Alive\r\n\r\n" + post_data} -scheme http -successRule "http.res.status.eq(200)"
To configure a Web authentication action by using the configuration utility
-
Navigate to Security > AAA - Application Traffic > Policies > LDAP.
-
In the details pane, on the Servers tab, do one of the following:
-
If you want to create a new web authentication action, click Add.
-
If you want to modify an existing web authentication action, in the data pane select the action, and then click Edit.
-
-
If you are creating a new web authentication action, in the Create Authentication Web server dialog box, Name text box, type a name for the new web authentication action. The name can be from one to 127 characters in length, and can consist of upper- and lowercase letters, numbers, and the hyphen (-) and underscore (\_) characters. If you are modifying an existing web authentication action, skip this step. The name is read-only; you cannot change it.</span>
-
In the Web Server IP Address text box, type the IPv4 or IPv6 IP address of the authentication web server. If the address is an IPv6 IP address, select the IPv6 check box first.
-
In the Port text box, type the port number on which the web server accepts connections.
-
Select HTTP or HTTPS in the Protocol drop-down list.
-
In the HTTP Request Expression text area, type a PCRE-format regular expression that creates the web server request that contains the user's credentials in the exact format expected by the authentication web server.
-
In the Expression to validate the Authentication text area, type a NetScaler appliance Advanced policy expression that describes the information in the web server response that indicates that user authentication was successful.
-
Fill out the remaining fields as described in the general authentication action documentation.
-
Click OK.