Confidential fields
You can designate web-form fields as confidential to protect the information users type into them. Normally, any information a user types into a web form on one of your protected web servers is logged in the NetScaler logs. The information typed into a web-form field designated as confidential, however, is not logged. That information is saved only where the website is configured to save such data, normally in a secure database.
Common types of information that you may want to protect with a confidential field designation include:
- Passwords
- Credit card numbers, validation codes, and expiration dates
- Social security numbers
- Tax ID numbers
- Home addresses
- Private telephone numbers
In addition to being good practice, proper use of confidential field designations may be necessary for PCI-DSS compliance on ecommerce servers, HIPAA compliance on servers that manage medical information in the United States, and compliance with other data protection standards.
Important:
In the following two cases, the Confidential Field designation does not function as expected:
- If a Web form has either a confidential field or an action URL longer than 256 characters, the field or action URL is truncated in the NetScaler logs.
- With certain SSL transactions, the logs are truncated if either the confidential field or the action URL is longer than 127 characters.
In either of these cases, the Web App Firewall masks a fifteen-character string with the letter “x,” instead of the normal eight character string. To ensure that any confidential information is removed, the user must use form field name and action URL expressions that match the first 256, or (in cases where SSL is used) the first 127 characters.
To configure your Web App Firewall to treat a web-form field on a protected website as confidential, you add that field to the Confidential Fields list. You can enter the field name as a string, or you can enter a PCRE-compatible regular expression specifying one or more fields. You can enable the confidential-field designation when you add the field, or you can modify the designation later.
Note
From release 13.1 build 27.x, confidential fields are also supported in WAF profiles. For more information, see Confidential fields in WAF profile.
To add a confidential field by using the command line interface
At the command prompt, type the following commands:
add appfw confidField <fieldName> <url> [-isRegex ( REGEX | NOTREGEX )] [-comment "<string>"] [-state ( ENABLED | DISABLED )]
save ns config
Example
The following example adds all web form fields whose names begin withPassword to the confidential fields list.
add appfw confidField Password "https?://www[.]example[.]com/[^<>]*[^a-z]password[0-9a-z._-]*[.](asp|cgi|htm|html|htp|js|php)" -isRegex REGEX -state ENABLED
save ns config
<!--NeedCopy-->
To modify a confidential field by using the command line interface
At the command prompt, type the following commands:
set appfw confidField <fieldName> <url> [-isRegex ( REGEX | NOTREGEX )][-comment "<string>"] [-state ( ENABLED | DISABLED )]
save ns config
Example
The following example modifies the confidential field designation to add a comment.
set appfw confidField Password "https?://www[.]example[.]com/[^<>]*[^a-z]password[0-9a-z._-]*[.](asp|cgi|htm|html|htp|js|php)" -comment "Protect password fields." -isRegex REGEX -state ENABLED
save ns config
<!--NeedCopy-->
To remove a confidential field by using the command line interface
At the command prompt, type the following commands:
rm appfw confidField <fieldName> <url>
save ns config
To configure a confidential field by using the GUI
- Navigate to Security > Application Firewall.
- In the details pane, under Settings, click Manage Confidential Fields.
- In the Manage Confidential Fields dialog box, do one of the following:
- To add a new form field to the list, click Add.
- To change an existing confidential field designation, select the field, and then click Edit.
The Web App Firewall Confidential Fields dialog box appears.
Note:
If you select an existing confidential field designation and then click Add, the Create Confidential Form Field dialog box displays the information for that confidential field. You can modify that information to create your new confidential field.
- In the dialog box, fill out the elements. They are:
- Enabled check box. Select or clear to enable/disable this confidential field designation.
- Is form field name a regular expression check box. Select or clear to enable PCRE-format regular expressions in the form field name.
- Field Name. Enter a literal string or PCRE-format regular expression that either represents a specific field name or that matches multiple fields with names that follow a pattern.
- Action URL. Enter a literal URL or a regular expression that defines one or more URLs of the web page(s) on which the web form(s) that contains the confidential field are located.
- Comments. Enter a comment. Optional.
- Click Create or OK.
- To remove a confidential field designation from the confidential fields list, select the confidential field listing you want to remove, then click Remove to remove it, and then click OK to confirm your choice.
- When you have finished adding, modifying, and removing confidential field designations, click Close.
Examples
Following are some regular expressions that define form field names that you might find useful:
-
^passwd_ (Applies confidential-field status to all field names that begin with the “passwd_” string.)
-
^((\[0-9a-zA-Z._-]*||\\x\[0-9A-Fa-f][0-9A-Fa-f])+-)?passwd_ (Applies confidential-field status to all field names that begin with the string passwd_, or that contain the string -passwd_ after another string that might contain non-ASCII special characters.)
Following are some regular expressions that define specific URL types that you might find useful. Substitute your own web host(s) and domain(s) for those in the examples.
-
If the web form appears on multiple web pages on the web host www.example.com, but all of those web pages are named logon.pl?, you can use the following regular expression:
https?://www[.]example[.]com/([0-9A-Za-z][0-9A-Za-z_.-]*/)*logon[.]pl\? <!--NeedCopy-->
-
If the web form appears on multiple web pages on the web host www.example-español.com, which contains the n-tilde (ñ) special character, you can use the following regular expression, which represents the n-tilde special character as an encoded UTF-8 string containing C3 B1, the hexadecimal code assigned to that character in the UTF-8 charset:
https?://www[.]example-espa\xC3\xB1ol[.]com/([0-9A-Za-z][0-9A-Za-z_.-]*/)* logon[.]pl\? <!--NeedCopy-->
-
If the web form containing query.pl appears on multiple web pages on different hosts within the example.com domain, you can use the following regular expression:
https?://([0-9A-Za-z][0-9A-Za-z_-.]*[.])*example[.]com/([0-9A-Za-z][0-9A-Za-z_-.]*/)*logon[.]pl\? <!--NeedCopy-->
-
If the web form containing query.pl appears on multiple web pages on different hosts in different domains, you can use the following regular expression:
https?://([0-9A-Za-z][0-9A-Za-z_-.]*[.])*[0-9A-Za-z][0-9A-Za-z_-.]+[.][a-z]{2,6}/([0-9A-Za-z][0-9A-Za-z_-.]*/)*logon[.]pl\? <!--NeedCopy-->
-
If the web form appears on multiple web pages on the web host www.example.com, but all of those web pages are named logon.pl?, you can use the following regular expression:
https?://www[.]example[.]com/([0-9A-Za-z][0-9A-Za-z_-.]*/)*logon[.]pl\? <!--NeedCopy-->