app security guide

Upload: duncan-ngacha

Post on 11-Oct-2015

30 views

Category:

Documents


0 download

DESCRIPTION

App Security

TRANSCRIPT

  • Cisco Systems, Inc.www.cisco.com

    Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco website at www.cisco.com/go/offices.

    Citrix NetScaler 1000V Application Security GuideCitrix NetScaler 10.1October 3, 2013

  • THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

    THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

    The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio-frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.

    The following information is for FCC compliance of Class B devices: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If the equipment causes interference to radio or television reception, which can be determined by turning the equipment off and on, users are encouraged to try to correct the interference by using one or more of the following measures:

    Reorient or relocate the receiving antenna. Increase the separation between the equipment and receiver. Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help.

    Modifications to this product not authorized by Cisco could void the FCC approval and negate your authority to operate the product.

    The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCBs public domain version of the UNIX operating system. All rights reserved. Copyright 1981, Regents of the University of California.

    NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED AS IS WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

    IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)

    Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

    Citrix and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. and/or one of its subsidiaries, and may be registered in the United States Patent and Trademark Office and in other countries. All other product names, company names, marks, logos, and symbols are trademarks of their respective owners.

    2013 Cisco Systems, Inc. All rights reserved.

  • Contents

    1 AAA Application Traffic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15How AAA Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16Enabling AAA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

    To enable AAA by using the command line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18To enable AAA by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    Setting up AAA Virtual Servers and DNS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19Configuring the Authentication Virtual Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    To configure an authentication virtual server by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20To configure an authentication virtual server by using the configuration utility. . 21

    Configuring a Traffic Management Virtual Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22To configure a TM virtual server for AAA by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22To configure a TM virtual server for AAA by using the configuration utility. . . . . . 23

    Configuring DNS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Verifying Your Setup for AAA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    To verify authentication virtual server setup by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23To verify your AAA virtual server setup by using the configuration utility. . . . . . . . 24

    Configuring Users and Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24To create a local AAA user account by using the command line interface. . . . . . . . . . . . 25To change the password for an existing AAA local user account by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25To configure AAA local users by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . 25To create AAA local groups and add users to them by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26To remove users from an AAA group by using the command line interface. . . . . . . . . . 26To remove an AAA group by using the command line interface. . . . . . . . . . . . . . . . . . . . . . . 27To configure AAA local groups and add users to them by using the configurationutility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    Configuring AAA Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28

    iii

  • Authentication Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28To add an authentication action by using the command line interface. . . . . . . . . . . 29To configure an authentication action by using the command line interface. . . . . 30To remove an authentication action by using the command line interface. . . . . . . 30To configure an authentication server by using the configuration utility. . . . . . . . . .30To create and bind an authentication policy by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31To modify an existing authentication policy by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32To remove an authentication policy by using the command line interface. . . . . . . 32To configure and bind authentication policies by using the configurationutility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32LDAP Authentication Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33RADIUS Authentication Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35SAML Authentication Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    Authorization Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40To create an authorization policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40To modify an authorization policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40To bind an authorization policy to a user account or group. . . . . . . . . . . . . . . . . . . . . . .41To unbind an authorization policy from a user account or group. . . . . . . . . . . . . . . . . 41To remove an authorization policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42To configure and bind authorization policies by using the configuration utility. . . 42

    Auditing Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43To create an auditing policy by using the command line interface. . . . . . . . . . . . . . . 43To modify an auditing policy by using the command line interface. . . . . . . . . . . . . . . 43To globally bind an auditing policy by using the command line interface. . . . . . . . 44To bind an auditing policy to an authentication virtual server by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44To bind an auditing policy to a user account or a group by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45To unbind a globally bound auditing policy by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45To unbind an auditing policy from an authentication virtual server by usingthe command line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45To unbind an auditing policy from a user account or a group by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46To remove an auditing policy by using the command line interface. . . . . . . . . . . . . . 46To configure and bind auditing policies by using the configuration utility. . . . . . . . 46

    Session Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47Session Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    Contents

    iv

  • To create a session profile by using the command line interface. . . . . . . . . . . . . . . . 48To modify a session profile by using the command line interface. . . . . . . . . . . . . . . . 49To remove a session profile by using the command line interface. . . . . . . . . . . . . . . 49To configure session profiles by using the configuration utility. . . . . . . . . . . . . . . . . . . 49

    Session Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50To create a session policy by using the command line interface. . . . . . . . . . . . . . . . . 50To modify a session policy by using the command line interface. . . . . . . . . . . . . . . . 50To globally bind a session policy by using the command line interface. . . . . . . . . . 51To bind a session policy to an authentication virtual server by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51To unbind a session policy from an authentication virtual server by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52To unbind a globally bound session policy by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52To remove a session policy by using the command line interface. . . . . . . . . . . . . . . .52To configure and bind session policies by using the configuration utility. . . . . . . . .52

    Global Session Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53To configure the session settings by using the command line interface. . . . . . . . . 54To configure the session settings by using the configuration utility. . . . . . . . . . . . . . 54

    Traffic Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55Traffic Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    To create a traffic profile by using the command line interface. . . . . . . . . . . . . . . . . . . 55To modify a session profile by using the command line interface. . . . . . . . . . . . . . . . 55To remove a session profile by using the command line interface. . . . . . . . . . . . . . . 56To configure traffic profiles by using the configuration utility. . . . . . . . . . . . . . . . . . . . . 56

    Traffic Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57To create a traffic policy by using the command line interface. . . . . . . . . . . . . . . . . . . 57To modify a traffic policy by using the command line interface. . . . . . . . . . . . . . . . . . . 57To globally bind a traffic policy by using the command line interface. . . . . . . . . . . . 57To bind a traffic policy to an authentication virtual server by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57To unbind a globally bound traffic policy by using the command line interface. . 58To unbind a traffic policy from an authentication virtual server by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58To remove a traffic policy by using the command line interface. . . . . . . . . . . . . . . . . . 58To configure and bind traffic policies by using the configuration utility. . . . . . . . . . . 59

    Form SSO Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59To create a form SSO profile by using the command line interface. . . . . . . . . . . . . . 60To modify a form SSO by using the command line interface. . . . . . . . . . . . . . . . . . . . . 60To remove a form SSO profile by using the command line interface. . . . . . . . . . . . .60

    Citrix NetScaler Application Security Guide

    v

  • To configure form SSO profiles by using the configuration utility. . . . . . . . . . . . . . . . .61SAML SSO Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    To create a SAML SSO profile by using the command line interface. . . . . . . . . . . . 61To modify a SAML SSO by using the command line interface. . . . . . . . . . . . . . . . . . . 62To remove a SAML SSO profile by using the command line interface. . . . . . . . . . . 62To configure a SAML SSO profile by using the configuration utility. . . . . . . . . . . . . . 62

    Authenticating with Client Certificates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63To configure the AAA client certificate parameters by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64To configure the AAA client certificate parameters by using the configurationutility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    Configuring AAA with Commonly Used Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Handling Authentication, Authorization and Auditing with Kerberos/NTLM. . . . . . . . . . . 65

    How NetScaler Implements Kerberos Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Kerberos Authentication - Configuration on the NetScaler Appliance. . . . . . . . . . . .69Configuration of Kerberos Authentication on a Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Offloading Kerberos Authentication from Physical Servers. . . . . . . . . . . . . . . . . . . . . . 77Kerberos Protocol Transition and Constrained Delegation. . . . . . . . . . . . . . . . . . . . . . . 80

    2 Application Firewall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

    Web Application Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Known Web Attacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Unknown Web Attacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94

    How The Application Firewall Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Application Firewall Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97The Application Firewall User Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

    Configuring the Application Firewall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98The Application Firewall Wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99The Citrix Web Interface AppExpert Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100The Citrix NetScaler Configuration Utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101The Citrix NetScaler Command Line Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101Enabling the Application Firewall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102

    To enable the application firewall by using the command line interface. . . . . . . . 102To enable the application firewall by using the configuration utility. . . . . . . . . . . . . 102

    The Application Firewall Wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103Opening the Wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103The Wizard Screens. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103To configure the Application Firewall: Initial Configuration. . . . . . . . . . . . . . . . . . . . . . 107To configure the Application Firewall: Enabling Blocking for Signatures. . . . . . . 108

    Contents

    vi

  • To configure the Application Firewall: Enabling and Configuring advancedprotection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108To configure the Application Firewall: Creating A Policy. . . . . . . . . . . . . . . . . . . . . . . . 109

    Manual Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Manual Configuration By Using the Configuration Utility. . . . . . . . . . . . . . . . . . . . . . . . 110Manual Configuration By Using the Command Line Interface. . . . . . . . . . . . . . . . . . 121

    Signatures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Manually Configuring the Signatures Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Adding a New Signatures Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125

    To create a signatures object from a template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126To create a signatures object by importing a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

    Configuring or Modifying a Signatures Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126To configure or modify a signatures object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

    Updating a Signatures Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129To update a signatures object from a Citrix format file by using theconfiguration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130To import and update signatures from a vulnerability scanning tool. . . . . . . . . . . . 130Updating a Signatures Object from a Citrix Format File. . . . . . . . . . . . . . . . . . . . . . . . .131Updating a Signatures Object from a Supported Vulnerability Scanning Tool. .132

    Exporting a Signatures Object to a File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133To export a signatures object to a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

    The Signatures Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134To add or modify a local signature rule by using the Signatures Editor. . . . . . . . .134To add a signature rule category. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136Signature Rule Patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

    Advanced Protections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141Top-Level Advanced Protections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    HTML Cross-Site Scripting Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143HTML SQL Injection Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Buffer Overflow Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Cookie Consistency Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150

    Data Leak Prevention Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153Credit Card Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153Safe Object Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154

    Advanced Form Protection Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Field Formats Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Form Field Consistency Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158CSRF Form Tagging Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161Deny URL Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

    URL Protection Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164

    Citrix NetScaler Application Security Guide

    vii

  • Start URL Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164Deny URL Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

    XML Protection Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168XML Format Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168XML Denial-of-Service Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169XML Cross-Site Scripting Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171XML SQL Injection Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173XML Attachment Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175Web Services Interoperability Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176XML Message Validation Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177XML SOAP Fault Filtering Check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

    Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178Creating Application Firewall Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

    To create an application firewall profile by using the command line interface. . 179To create an application firewall profile by using the configuration utility. . . . . . . 180

    Configuring Application Firewall Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181To configure an application firewall profile by using the command line. . . . . . . . .181To configure an application firewall profile by using the configuration utility. . . .182Managing Content Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183

    Changing an Application Firewall Profile Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187To change an application firewall profile type by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188To change an application firewall profile type by using the configurationutility.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

    Configuring and Using the Learning Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188To configure the learning settings by using the command line interface. . . . . . . .189To reset learning settings to their defaults by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190To display the learning settings for a profile by using the command lineinterface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190To display unreviewed learned rules or relaxations for a profile by using thecommand line interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190To remove specific unreviewed learned rules or relaxations from thelearning database by using the command line interface. . . . . . . . . . . . . . . . . . . . . . . . 191To remove all unreviewed learned data by using the command line interface. 191To export learning data by using the command line interface. . . . . . . . . . . . . . . . . . .191To configure the Learning feature by using the configuration utility. . . . . . . . . . . . .192To review learned rules or relaxations by using the configuration utility. . . . . . . . 192

    Supplemental Information about Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Configuration Variable Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193

    Contents

    viii

  • PCRE Character Encoding Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Inverted PCRE Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197Disallowed Names for Application Firewall Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

    Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199Firewall Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199

    Creating and Configuring Application Firewall Policies. . . . . . . . . . . . . . . . . . . . . . . . . 200Binding Application Firewall Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205Viewing a Firewall Policy's Bindings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

    Auditing Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207To create an auditing server by using the command line interface. . . . . . . . . . . . . 207To modify or remove an auditing server by using the command line interface. 208To create or configure an auditing server by using the configuration utility. . . . .208To create an auditing policy by using the command line interface. . . . . . . . . . . . . . 209To configure an auditing policy by using the command line interface. . . . . . . . . . .209To configure an auditing policy by using the configuration utility. . . . . . . . . . . . . . . .210

    Imports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210HTML Error Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210XML Error Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212XML Schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212WSDL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213Importing and Exporting Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

    To import a file or object by using the command line interface. . . . . . . . . . . . . . . . . .213To import a file or object by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . .213To export a file or object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214To edit a file or object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214

    Global Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Engine Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

    To configure engine settings by using the command line interface. . . . . . . . . . . . . 216To configure engine settings by using the configuration utility. . . . . . . . . . . . . . . . . . 217

    Confidential Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218To add a confidential field by using the command line interface. . . . . . . . . . . . . . . . 219To modify a confidential field by using the command line interface. . . . . . . . . . . . .219To remove a confidential field by using the command line interface. . . . . . . . . . . . 219To configure a confidential field by using the configuration utility. . . . . . . . . . . . . . . 220

    Field Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222To add a field type by using the command line interface. . . . . . . . . . . . . . . . . . . . . . . .222To modify a field type by using the command line interface. . . . . . . . . . . . . . . . . . . . .223To remove a field type by using the command line interface. . . . . . . . . . . . . . . . . . . .223To configure a field type by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . 223

    XML Content Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224

    Citrix NetScaler Application Security Guide

    ix

  • To add an XML content type pattern by using the command line interface. . . . .224To remove an XML content type pattern by using the command line interface 225To configure the XML content type list by using the configuration utility. . . . . . . .225

    JSON Content Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225To add a JSON content type pattern by using the command line interface. . . . .226To configure the JSON content type list by using the configuration utility. . . . . . 226

    Logs, Statistics, and Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227The Application Firewall Logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

    NetScaler Format Logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227Viewing the Application Firewall Logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

    The Application Firewall Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229The Application Firewall Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229

    The PCI DSS Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230The Application Firewall Configuration Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

    Appendices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231PCRE Character Encoding Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Whitehat WASC Signature Types for WAF Use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    WASC 1.0 Signature Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234WASC 2.0 Signature Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Best Practices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    3 Content Filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Enabling Content Filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

    To enable content filtering by using the command line interface. . . . . . . . . . . . . . . . . . . . . 238To enable content by filtering by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . .239

    Configuring a Content Filtering Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239To configure a content filtering action by using the command line interface. . . . . . . . .240To configure a content filtering action by using the configuration utility. . . . . . . . . . . . . . 240

    Configuring a Content Filtering Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241To configure a content filtering policy by using the command line interface. . . . . . . . . 242To configure a content filtering policy by using the configuration utility. . . . . . . . . . . . . . 242

    Binding a Content Filtering Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246To bind a policy to a virtual server by using the command line interface. . . . . . . . . . . . 246

    Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246To globally bind a policy by using the command line interface. . . . . . . . . . . . . . . . . . . . . . . 247

    Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247To bind a policy to a virtual server by using the configuration utility. . . . . . . . . . . . . . . . . 247To globally bind a policy by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

    Configuring Content Filtering for a Commonly Used Deployment Scenario. . . . . . . . . . . . . . 248To enable content filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

    Contents

    x

  • To configure the content filtering policy filter-CF-nimda. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248To globally bind the content filtering policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249To bind the content filtering policy to a virtual server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249To verify the content filtering configuration by using the command line interface. . . 250To verify the content filtering configuration by using the configuration utility. . . . . . . . .250

    Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251Resources for Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251Troubleshooting Content Filtering Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

    4 HTTP Denial-of-Service Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Layer 3-4 SYN Denial-of-Service Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255Enabling HTTP DoS Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255

    To enable HTTP DoS protection by using the command line interface. . . . . . . . . . . . . . 255To enable HTTP DoS protection by using the configuration utility. . . . . . . . . . . . . . . . . . . 256

    Defining an HTTP DoS Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256To configure a HTTP DoS policy by using the command line interface. . . . . . . . . . . . . . 257To configure an HTTP DoS policy by using the configuration utility. . . . . . . . . . . . . . . . . .257

    Configuring an HTTP DoS Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258To configure an HTTP DoS service by using the command line interface. . . . . . . . . . . 258To configure an HTTP DoS service by using the configuration utility. . . . . . . . . . . . . . . . 259

    Binding an HTTP DoS Monitor and Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260To bind the monitor to the service by using the command line interface. . . . . . . . . . . . .260To bind the policy to the service by using the command line interface. . . . . . . . . . . . . . .260To bind the monitor and policy to the service by using the configuration utility. . . . . . 262

    Tuning the Client Detection/JavaScript Challenge Response Rate. . . . . . . . . . . . . . . . . . . . . . . 262Guidelines for HTTP DoS Protection Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263

    5 Priority Queuing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265Enabling Priority Queuing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267

    To enable priority queuing by using the command line interface. . . . . . . . . . . . . . . . . . . . .267To enable priority queuing by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . 267

    Configuring a Priority Queuing Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268To configure a priority queuing policy by using the command line interface. . . . . . . . . 268To configure a priority queuing policy by using the configuration utility. . . . . . . . . . . . . . 268

    Binding a Priority Queuing Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270To bind a priority queuing policy by using the command line interface. . . . . . . . . . . . . . 270To bind a priority queuing policy by using the configuration utility. . . . . . . . . . . . . . . . . . . .271

    Setting Up Weighted Queuing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

    6 SureConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

    Citrix NetScaler Application Security Guide

    xi

  • Installing SureConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275Installing on UNIX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275

    To install SureConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275Installing on Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

    To install SureConnect on Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Configuring SureConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

    Configuring the Response for Alternate Server Failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Customizing the Default Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277SureConnect with In-Memory response (NS action). . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

    Configuring the SureConnect Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Configuring Exact URL Based Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Configuring Wildcard Rule-Based Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281Displaying the Configured SureConnect Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

    Customizing the Alternate Content File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282Configuring SureConnect for Citrix NetScaler Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

    Configuring SureConnect for Load Balancing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284Configuring SureConnect for Cache Redirection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284Configuring SureConnect for High Availability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284

    Activating SureConnect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284SureConnect Environments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

    Primary and Alternate Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285Configuration Checklist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

    To redirect the client to another URL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287Example Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

    Example 1 - SureConnect Progress Bar and Alternate Page . . . . . . . . . . . . . . . . . . 288Example 2 - SureConnect Progress Bar Only. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289Example 3 - SureConnect with Load Balancing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289Example 4 - SureConnect with Load Balancing (ACS Action). . . . . . . . . . . . . . . . . . 290Example 5 - SureConnect with Content Switching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

    7 Surge Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293Disabling and Reenabling Surge Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296

    To disable or reenable surge protection by using the command line interface. . . . . . 296To disable or reenable surge protection by using the configuration utility. . . . . . . . . . . 297To disable or reenable surge protection for a particular service by using theconfiguration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

    Setting Thresholds for Surge Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298Flushing the Surge Queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300

    To flush a surge queue by using the command line interface. . . . . . . . . . . . . . . . . . . . . . . . 301Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

    Contents

    xii

  • To flush a surge queue by using the configuration utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

    Citrix NetScaler Application Security Guide

    xiii

  • Contents

    xiv

  • Chapter 1

    AAA Application Traffic

    Topics: How AAA Works Enabling AAA Setting up AAA Virtual

    Servers and DNS Configuring Users and

    Groups Configuring AAA Policies Session Settings Traffic Settings Authenticating with Client

    Certificates Configuring AAA with

    Commonly Used Protocols

    Many companies restrict web site access to valid users only,and control the level of access permitted to each user. TheAAA feature allows a site administrator to manage accesscontrols with the NetScaler appliance instead of managingthese controls separately for each application. Doingauthentication on the appliance also permits sharing thisinformation across all web sites within the same domain thatare protected by the appliance.The AAA feature supports authentication, authorization, andauditing for all application traffic. To use AAA, you mustconfigure authentication virtual servers to handle theauthentication process and traffic management virtual serversto handle the traffic to web applications that requireauthentication. You also configure your DNS to assign FQDNsto each virtual server. After configuring the virtual servers,you configure a user account for each user that willauthenticate via the NetScaler appliance, and optionally youcreate groups and assign user accounts to groups. Aftercreating user accounts and groups, you configure policies thattell the appliance how to authenticate users, which resourcesto allow users to access, and how to log user sessions. To putthe policies into effect, you bind each policy globally, to aspecific virtual server, or to the appropriate user accounts orgroups. After configuring your policies, you customize usersessions by configuring session settings and binding yoursession policies to the traffic management virtual server.Finally, if your intranet uses client certs, you set up the clientcertificate configuration.Before configuring AAA, you should be familiar with andunderstand how to configure load balancing, contentswitching, and SSL on the NetScaler appliance.

    15

  • How AAA WorksAAA provides security for a distributed Internet environment by allowing any clientwith the proper credentials to connect securely to protected application servers fromanywhere on the Internet. This feature incorporates the three security features ofauthentication, authorization, and auditing. Authentication enables the NetScalerappliance to verify the clients credentials, either locally or with a third-partyauthentication server, and allow only approved users to access protected servers.Authorization enables the appliance to verify which content on a protected server itshould allow each user to access. Auditing enables the appliance to keep a record ofeach users activity on a protected server.To understand how AAA works in a distributed environment, consider an organizationwith an intranet that its employees access in the office, at home, and when traveling.The content on the intranet is confidential and requires secure access. Any user whowants to access the intranet must have a valid user name and password. To meet theserequirements, the NetScaler appliance does the following:w Redirects the user to the login page if the user accesses the intranet without having

    logged in.w Collects the users credentials, delivers them to the authentication server, and

    caches them in a directory that is accessible through LDAP.w Verifies that the user is authorized to access specific intranet content before

    delivering the users request to the application server.w Maintains a session timeout after which users must authenticate again to regain

    access to the intranet. (You can configure the timeout.)w Logs the user accesses, including invalid login attempts, in an audit log.Authentication requires that several entitiesthe client, the NetScaler appliance, theexternal authentication server if one is used, and the application serverrespond toeach other when prompted by performing a complex series of tasks in the correctorder. If you are using an external authentication server, this process can be brokendown into the following fifteen steps.w The client sends a GET request for a URL on the application server.w The NetScaler appliances traffic management virtual server redirects the request to

    the application server.w The application server determines that the client has not been authenticated, and

    therefore sends an HTTP 200 OK response via the TM vserver to the client. Theresponse contains a hidden script that causes the client to issue a POST requestfor /cgi/tm.

    w The client sends a POST request for /cgi/tm.w The NetScaler appliances authentication virtual server redirects the request to the

    authentication server.w The authentication server creates an authentication session, sets and caches a

    cookie that consists of the initial URL and the domain of the traffic management

    Chapter 1 AAA Application Traffic

    16

  • virtual server, and then sends an HTTP 302 response via the authentication virtualserver, redirecting the client to /vpn/index.html.

    w The client sends a GET request for /vpn/index.html.w The authentication virtual server redirects the client to the authentication server

    login page.w The client sends a GET request for the login page, enters credentials, and then

    sends a POST request with the credentials back to the login page.w The authentication virtual server redirects the POST request to the authentication

    server.w If the credentials are correct, the authentication server tells the authentication

    virtual server to log the client in and redirect the client to the URL that was in theinitial GET request.

    w The authentication virtual server logs the client in and sends an HTTP 302 responsethat redirects the client to the initially requested URL.

    w The client sends a GET request for their initial URL.w The traffic management virtual server redirects the GET request to the application

    server.w The application server responds via the traffic management virtual server with the

    initial URL.If you use local authentication, the process is similar, but the authentication virtualserver handles all authentication tasks instead of forwarding connections to an externalauthentication server. The following figure illustrates the authentication process.Figure 1-1. Authentication Process Traffic Flow

    Citrix NetScaler Application Security Guide

    17

  • When an authenticated client requests a resource, the NetScaler appliance, beforesending the request to the application server, checks the user and group policiesassociated with the client account, to verify that the client is authorized to access thatresource. The appliance handles all authorization on protected application servers. Youdo not need to do any special configuration of your protected application servers.AAA-TM handles password changes for users by using the protocol-specific method forthe authentication server. For most protocols, neither the user nor the administratorneeds to do anything different than they would without AAA-TM. Even when an LDAPauthentication server is in use, and that server is part of a distributed network of LDAPservers with a single designated domain administration server, password changes areusually handled seamlessly. When an authenticated client of an LDAP server changes hisor her password, the client sends a credential modify request to AAA-TM, whichforwards it to the LDAP server. If the user's LDAP server is also the domainadministration server, that server responds appropriately and AAA-TM then performsthe requested password change. Otherwise, the LDAP server sends AAA-TM anLDAP_REFERRAL response to the domain administration server. AAA-TM follows thereferral to the indicated domain administration server, authenticates to that server,and performs the password change on that server.When configuring AAA-TM with an LDAP authentication server, the system administratormust keep the following conditions and limitations in mind:w AAA-TM assumes that the domain administration server in the referral accepts the

    same bind credentials as the original server.w AAA-TM only follows LDAP referrals for password change operations. In other cases

    AAA-TM refuses to follow the referral.w AAA-TM only follows one level of LDAP referrals. If the second LDAP server also

    returns a referral, AAA-TM refuses to follow the second referral.The NetScaler appliance supports auditing of all states and status information, so youcan see the details of what each user did while logged on, in chronological order. Toprovide this information, the appliance logs each event, as it occurs, either to adesignated audit log file on the appliance or to a syslog server. Auditing requiresconfiguring the appliance and any syslog server that you use.

    Enabling AAATo use the AAA - Application Traffic feature, you must enable it. You can configure AAAentitiessuch as the authentication and traffic management virtual serversbefore youenable the AAA feature, but the entities will not function until the feature is enabled.

    To enable AAA by using the command line interfaceAt the command prompt, type the following commands to enable AAA and verify theconfiguration:w enable feature AAAw show ns feature

    Chapter 1 AAA Application Traffic

    18

  • Example

    > enable feature AAA Done

    > show ns feature

    Feature Acronym Status ------- ------- ------ 1) Web Logging WL OFF 2) Surge Protection SP ON . . . 15) AAA AAA ON . . . 23) HTML Injection HTMLInjection ON 24) NetScaler Push push OFF Done

    To enable AAA by using the configuration utility1. Navigate to System > Settings.2. In the details pane, under Modes and Features, click Change basic features.3. In the Configure Basic Features dialog box, select the Authentication,

    Authorization and Auditing check box.4. Click OK.

    Setting up AAA Virtual Servers and DNSYou can configure AAA by using the built-in wizard, or manually. To use the wizard, inthe main AAA pane of the configuration utility, you click AAA - Application Trafficwizard and follow the prompts.To configure AAA manually, you first configure an authentication virtual server, whichinvolves binding an SSL certificate-key pair. You then associate the authenticationvirtual server with a new or existing traffic management virtual server. (Either a loadbalancing virtual server or a content switching virtual server can serve as a trafficmanagement virtual server.) To complete the initial configuration, you configure DNS to

    Citrix NetScaler Application Security Guide

    19

  • assign hostnames to both the authentication virtual server and the traffic managementvirtual server, and verify that your virtual servers are UP and configured correctly.

    Caution: Both virtual servers must have hostnames in the same domain, or theAAA configuration will not work.

    Configuring the Authentication Virtual ServerTo configure AAA, first configure an authentication virtual server to handleauthentication traffic. Next, bind an SSL certificate-key pair to the virtual server toenable it to handle SSL connections.

    To configure an authentication virtual server by using thecommand line interfaceTo configure an authentication virtual server and verify the configuration, at thecommand prompt type the following commands in the order shown:w add authentication vserver ssl w show authentication vserver w bind ssl certkey w show authentication vserver w set authentication vserver -authenticationDomain w show authentication vserver

    Example

    > add authentication vserver Auth-Vserver-2 SSL 10.102.29.77 443 Done> show authentication vserver Auth-Vserver-2 Auth-Vserver-2 (10.102.29.77:443) - SSL Type: CONTENT State: DOWN[Certkey not bound] Client Idle Timeout: 180 sec Down state flush: DISABLED Disable Primary Vserver On Down : DISABLED Authentication : ON Current AAA Users: 0 Done> bind ssl certkey Auth-Vserver-2 Auth-Cert-1 Done> show authentication vserver Auth-Vserver-2 Auth-Vserver-2 (10.102.29.77:443) - SSL Type: CONTENT State: UP Client Idle Timeout: 180 sec Down state flush: DISABLED Disable Primary Vserver On Down : DISABLED

    Chapter 1 AAA Application Traffic

    20

  • Authentication : ON Current AAA Users: 0 Authentication Domain: myCompany.employee.com Done> set authentication vserver Auth-Vserver-2 -AuthenticationDomain myCompany.employee.com Done> show authentication vserver Auth-Vserver-2 Auth-Vserver-2 (10.102.29.77:443) - SSL Type: CONTENT State: DOWN[Certkey not bound] Client Idle Timeout: 180 sec Down state flush: DISABLED Disable Primary Vserver On Down : DISABLED Authentication : ON Current AAA Users: 0 Authentication Domain: myCompany.employee.com Done

    To configure an authentication virtual server by using theconfiguration utility1. Navigate to Security > AAA - Application Traffic > Virtual Servers.2. In the details pane, do one of the following:

    To create a new authentication virtual server, click Add. To modify an existing authentication virtual server, select the virtual server, and

    then click Open.3. In the Create Virtual Server (Authentication) or Configure Virtual Server

    (Authentication) dialog box as follows (asterisk indicates a required parameter): Name*name (Cannot be changed for a previously created virtual server) IP Address*ipaddress Domain*authenticationDomain

    Note: The authentication virtual server uses only the SSL protocol and port 443,so those options are greyed out.

    4. On the Certificates tab, in the Available list, select the SSL certificate you want toassociate with this authentication virtual server, and click the Add button.If your configuration requires CA certs and you will use this SSL certificate as theCA server certificate, you click the Add as CA button instead. The certificatemoves from the Available to the Configured list.

    5. Click Create or OK, and then click Close.If you created a new authentication virtual server, it now appears in theAuthentication Virtual Servers pane.

    Citrix NetScaler Application Security Guide

    21

  • Configuring a Traffic Management Virtual ServerAfter you have created and configured your authentication virtual server, you nextcreate or configure a traffic management virtual server and associate yourauthentication virtual sever with it. You can use either a load balancing or contentswitching virtual server for a traffic management virtual server.

    Note: The FQDN of the traffic management virtual server must be in the same domainas the FQDN of the authentication virtual server for the domain session cookie tofunction correctly.

    You configure a traffic management virtual server for AAA by enabling authenticationand then assigning the FQDN of the authentication server to the traffic managementvirtual server. You can also configure the authentication domain on the trafficmanagement virtual server at this time. If you do not configure this option, theNetScaler appliance assigns the traffic management virtual server an FQDN thatconsists of the FQDN of the authentication virtual server without the hostname portion.For example, if domain name of the authentication vserver is tm.xyz.bar.com, theappliance assigns xyz.bar.com. as the authentication domain.

    To configure a TM virtual server for AAA by using thecommand line interfaceAt the command prompt, type one of the following sets of commands to configure a TMvirtual server and verify the configuration:w set lb vserver authentication ON -authenticationhost [-

    authenticationdomain ]w show lb vserver w set cs vserver authentication ON -authenticationhost [-

    authenticationdomain ]w show cs vserver

    Example

    > set lb vserver vs-cont-sw -Authentication ON -AuthenticationHost mywiki.index.com Done> show lb vserver vs-cont-sw vs-cont-sw (0.0.0.0:0) - TCP Type: ADDRESS State: DOWN Last state change was at Wed Aug 19 10:03:15 2009 (+410 ms) Time since last state change: 5 days, 20:00:40.290 Effective State: DOWN Client Idle Timeout: 9000 sec Down state flush: ENABLED

    Chapter 1 AAA Application Traffic

    22

  • Disable Primary Vserver On Down : DISABLED No. of Bound Services : 0 (Total) 0 (Active) Configured Method: LEASTCONNECTION Mode: IP Persistence: NONE Connection Failover: DISABLED Authentication: ON Host: mywiki.index.com Done

    To configure a TM virtual server for AAA by using theconfiguration utility1. In the navigation pane, do one of the following.

    Navigate to Traffic Management > Load Balancing > Virtual Servers. Navigate to Traffic Management > Content Switching > Virtual Servers

    The AAA configuration process for either type of virtual server is identical.2. In the details pane, select the virtual server on which you want to enable

    authentication, and then click Open.3. In the Domain text box, type the authentication domain.4. On the Advanced tab, select the Authentication check box.5. In the Authentication Host text box, type the fully qualified domain name of the

    authentication virtual server.6. Click OK.

    A message appears in the status bar, stating that the vserver has been configuredsuccessfully.

    Configuring DNSFor the domain session cookie used in the authentication process to function correctly,you must configure DNS to assign both the authentication and the traffic managementvirtual servers to FQDNs in the same domain.

    Verifying Your Setup for AAAAfter you configure authentication and traffic management virtual servers and beforeyou create user accounts, you should verify that both virtual servers are configuredcorrectly and are in the UP state.

    To verify authentication virtual server setup by using thecommand line interfaceAt the command prompt, type the following command:

    Citrix NetScaler Application Security Guide

    23

  • show authentication vserver

    Example

    > show authentication vserver Auth-Vserver-2 Auth-Vserver-2 (10.102.29.77:443) - SSL Type: CONTENT State: UP Client Idle Timeout: 180 sec Down state flush: DISABLED Disable Primary Vserver On Down : DISABLED Authentication : ON Current AAA Users: 0 Authentication Domain: myCompany.employee.com Done

    To verify your AAA virtual server setup by using theconfiguration utility1. Navigate to Security > AAA - Application Traffic > Virtual Servers.2. Review the information in the AAA Virtual Servers pane to verify that your

    configuration is correct and your authentication virtual server is accepting traffic.You can select a specific virtual server to view detailed information in the detailspane.

    Configuring Users and GroupsAfter configuring the AAA basic setup, you create users and groups. You first create auser account for each person who will authenticate via the NetScaler appliance. If youare using local authentication controlled by the NetScaler appliance itself, you createlocal user accounts and assign passwords to each of those accounts.You also create user accounts on the NetScaler appliance if you are using an externalauthentication server. In this case, however, each user account must exactly match anaccount for that user on the external authentication server, and you do not assignpasswords to the user accounts that you create on the NetScaler. The externalauthentication server manages the passwords for users that authenticate with theexternal authentication server.If you are using an external authentication server, you can still create local useraccounts on the NetScaler appliance if, for example, you want to allow temporaryusers (such as visitors) to log in but do not want to create entries for those users on theauthentication server. You assign a password to each local user account, just as youwould if you were using local authentication for all user accounts.Each user account must be bound to policies for authentication and authorization. Tosimplify this task, you can create one or more groups and assign user accounts to them.You can then bind policies to groups instead of individual user accounts.

    Chapter 1 AAA Application Traffic

    24

  • To create a local AAA user account by using thecommand line interface

    At the command prompt, type the following commands to create a local AAA useraccount and verify the configuration:w add aaa user [password ]w show aaa user

    Example

    > add aaa user user-2 -password emptybag Done> show aaa user1) UserName: user-12) UserName: user-2 Done

    To change the password for an existing AAA localuser account by using the command line interface

    At the command prompt, type the following command and, when prompted, type thenew password:set aaa user

    Example

    > set aaa user user-2 Enter password: Done

    To configure AAA local users by using theconfiguration utility

    1. Navigate to Security > AAA - Application Traffic > Users2. In the details pane, do one of the following:

    To create a new user account, click Add. To modify an existing user account, select the user account, and then click

    Open.

    Citrix NetScaler Application Security Guide

    25

  • 3. In the Create AAA User dialog box, in the User Name text box, type a name forthe user.

    4. If creating a locally authenticated user account, clear the External Authenticationcheck box and provide a local password that the user will use to log on.

    5. Click Create or OK, and then click Close.A message appears in the status bar, stating that the user has been configuredsuccessfully.

    To create AAA local groups and add users to themby using the command line interface

    At the command prompt, type the following commands. Type the first command onetime, and type the second command once for each user:w add aaa group w show aaa group

    Example

    > add aaa group group-2 Done > show aaa group 1) GroupName: group-1 2) GroupName: group-2 Done

    w bind aaa group -username Example

    > bind aaa group group-2 -username user-2 Done> show aaa group group-2 GroupName: group-2

    UserName: user-2 Done

    To remove users from an AAA group by using thecommand line interface

    At the command prompt, unbind users from the group by typing the following commandonce for each user account that is bound to the group:unbind aaa group -username

    Chapter 1 AAA Application Traffic

    26

  • Example

    > unbind aaa group group-hr -username user-hr-1 Done

    To remove an AAA group by using the commandline interface

    First remove all users from the group. Then, at the command prompt, type thefollowing command to remove an AAA group and verify the configuration:w rm aaa group w show aaa group

    Example

    > rm aaa group group-hr Done> show aaa group1) GroupName: group-12) GroupName: group-finance Done

    To configure AAA local groups and add users tothem by using the configuration utility

    1. Navigate to Security > AAA - Application Traffic > Groups2. In the details pane, do one of the following:

    To create a new group, click Add. To modify an existing group, select the group, and then click Open.

    3. If you are creating a new group, in the Create AAA Group dialog box, in the GroupName text box, type a name for the group.

    4. On the Users tab, configure the users assigned to the group.a. To add a user to the group, in the Available Users list, select the user, and

    then click Add.b. To remove a user from the group, in the Configured Users list, select the user,

    and then click Remove.

    Citrix NetScaler Application Security Guide

    27

  • c. To create a new user account and add it to the group, click New, and thenfollow the instructions in To configure AAA local users by using theconfiguration utility.

    5. Click Create or OK, and then click Close.The group that you created appears in the AAA Groups page.

    Configuring AAA PoliciesAfter you set up your users and groups, you next configure authentication policies,authorization policies, and audit policies to define which users are allowed to accessyour intranet, which resources each user or group is allowed to access, and what levelof detail AAA will preserve in the audit logs. An authentication policy defines the typeof authentication to apply when a user attempts to log on. If external authentication isused, the policy also specifies the external authentication server. Authorization policiesspecify the network resources that users and groups can access after they log on.Auditing policies define the audit log type and location.You must bind each policy to put it into effect. You bind authentication policies toauthentication virtual servers, authorization policies to one or more user accounts orgroups, and auditing policies both globally and to one or more user accounts or groups.When you bind a policy, you assign a priority to it. The priority determines the order inwhich the policies you define are evaluated. You can set the priority to any positiveinteger. In the NetScaler operating system, policy priorities work in reverse order: thehigher the number, the lower the priority. For example, if you have three policies withpriorities of 10, 100, and 1000, the policy assigned a priority of 10 is performed first,then the policy assigned a priority of 100, and finally the policy assigned an order of1000. The AAA feature implements only the first of each type of policy that a requestmatches, not any additional policies of that type that a request might also match, sopolicy priority is important for getting the results you intend.You can leave yourself plenty of room to add other policies in any order, and still setthem to evaluate in the order you want, by setting priorities with intervals of 50 or 100between each policy when you bind the policies. You can then add additional policiesat any time without having to reassign the priority of an existing policy.

    Authentication PoliciesThe NetScaler appliance can authenticate users with local user accounts or by using anexternal authentication server. The appliance supports the following authenticationtypes:LOCAL

    Authenticates to the NetScaler by using a password, without reference to an externalauthentication server. User data is stored locally on the NetScaler appliance.

    RADIUSAuthenticate to an external Radius server.

    Chapter 1 AAA Application Traffic

    28

  • LDAPAuthenticates to an external LDAP authentication server.

    TACACSAuthenticates to an external Terminal Access Controller Access-Control System(TACACS) authentication server.

    Note: When authenticating through a TACACS server, AAA-TM logs onlysuccessfully executed TACACS commands, to prevent the logs from showingTACACS commands that were entered by users who were not authorized to executethem.

    CERTAuthenticates to the NetScaler appliance by using a client certificate, withoutreference to an external authentication server.

    NEGOTIATEAuthenticates to a Kerberos authentication server. If there is an error in Kerberosauthentication, NetScaler uses NTLM authentication.

    SAMLAuthenticates to a server that supports the Security Assertion Markup Language(SAML).

    An authentication policy is comprised of an expression and an action.After creating an authentication action and an authentication policy, bind it to anauthentication virtual server and assign a priority to it. When binding it, also designateit as either a primary or a secondary policy. Primary policies are evaluated beforesecondary policies. In configurations that use both types of policy, primary policies arenormally more specific policies while secondary policies are normally more generalpolicies intended to handle authentication for any user accounts that do not meet themore specific criteria.

    To add an authentication action by using the command lineinterfaceIf you do not use LOCAL authentication, you need to add an explicit authenticationaction. To do this, at the command prompt, type the following command:add authentication -serverip [-serverPort ] [-authTimeout ] [ ... ]

    Example

    > add authentication tacacsaction Authn-Act-1 -serverip 10.218.24.65 -serverport 1812 -authtimeout 15 -tacacsSecret "minotaur" -authorization OFF -accounting ON -auditFailedCmds OFF -

    Citrix NetScaler Application Security Guide

    29

  • defaultAuthenticationGroup "users"Done

    To configure an authentication action by using thecommand line interfaceTo configure an existing authentication action, at the command prompt, type thefollowing command:set authentication -serverip [-serverPort ] [-authTimeout ] [ ... ]

    Example

    > set authentication tacacsaction Authn-Act-1 -serverip 10.218.24.65 -serverport 1812 -authtimeout 15 -tacacsSecret "minotaur" -authorization OFF -accounting ON -auditFailedCmds OFF -defaultAuthenticationGroup "users"Done

    To remove an authentication action by using the commandline interfaceTo remove an existing RADIUS action, at the command prompt, type the followingcommand:rm authentication radiusaction

    Example

    > rm authentication tacacsaction Authn-Act-1Done

    To configure an authentication server by using theconfiguration utility

    Note: In the configuration utility, the term server is used instead of action, but refers tothe same task.

    1. Navigate to Security > AAA - Application Traffic > Policies > Authentication.2. In the details pane, on the Servers tab, do one of the following:

    To create a new authentication server, click Add. To modify an existing authentication server, select the server, and then click

    Open.

    Chapter 1 AAA Application Traffic

    30

  • 3. In the Create Authentication Server or Configure Authentication Server dialogbox, type or select values for the parameters. Name*radiusActionName (Cannot be changed for a previously configured

    action) Authentication Type*authtype (Set to RADIUS, cannot be changed) IP Address*serverip IPV6*Select the checkbox if the server IP is an IPv6 IP. (No command line

    equivalent.) Port*serverPort Time-out (seconds)*authTimeout

    4. Click Create or OK, and then click Close.The policy that you created appears in the Authentication Policies and Serverspage.

    To create and bind an authentication policy by using thecommand line interfaceAt the command prompt, type the following commands in the order shown to createand bind an authentication policy and verify the configuration:w add authentication negotiatePolicy w show authentication policy w bind authentication vserver -policy [-priority

    ] [-secondary]]w show authentication vserver

    Example

    > add authentication localPolicy Authn-Pol-1 ns_true Done

    > show authentication localPolicy1) Name: Authn-Pol-1 Rule: ns_true Request action: LOCAL Done> bind authentication vserver Auth-Vserver-2 -policy Authn-Pol-1 Done> show authentication vserver Auth-Vserver-2 Auth-Vserver-2 (10.102.29.77:443) - SSL Type: CONTENT State: UP Client Idle Timeout: 180 sec Down state flush: DISABLED Disable Primary Vserver On Down : DISABLED Authentication : ON

    Citrix NetScaler Application Security Guide

    31

  • Current AAA Users: 0 Authentication Domain: myCompany.employee.com

    1) Primary authentication policy name: Authn-Pol-1 Priority: 0 Done

    To modify an existing authentication policy by using thecommand line interfaceAt the command prompt, type the following commands to modify an existingauthentication policy:set authentication [-reqaction ]

    Example

    > set authentication localPolicy Authn-Pol-1 'ns_true'Done

    To remove an authentication policy by using the commandline interfaceAt the command prompt, type the following command to remove an authenticationpolicy:rm authentication

    Example

    > rm authentication localPolicy Authn-Pol-1Done

    To configure and bind authentication policies by using theconfiguration utility1. Navigate to Security > AAA - Application Traffic > Policies > Authentication, and

    then select the type of policy that you want to create.2. In the details pane, on the Policies tab, do one of the following:

    To create a new policy, click Add. To modify an existing policy, select the action, and then click Open.

    3. In the Create Authentication Policy or Configure Authentication Policy dialogbox, type or select values for the parameters.

    Chapter 1 AAA Application Traffic

    32

  • Name*policyname (Cannot be changed for a previously configured action) Authentication Type*authtype Server*authVsName Expression*rule (You enter expressions by first choosing the type of

    expression in the leftmost drop-down list beneath the Expression window, andthen by typing your expression directly into the expression text area, or byclicking Add to open Add Expression dialog box and using the drop-down lists init to construct your expression.)

    4. Click Create or OK, and then click Close.The policy that you created appears in the Authentication Policies and Serverspage.

    5. Click the Servers tab, and in the details pane do one of the following: To use an existing server, select it, and then click Open. To create a new server, click Add, and follow the instructions in "Configuring

    the Authentication Virtual Server on page 20." If you are configuring a RADIUSauthentication server, follow the instructions in "RADIUS Authentication Policieson page 35" If you are configuring a SAML authentication server, follow theinstructions in "SAML Authentication Policies on page 37."

    6. If you want to designate this policy as a secondary authentication policy, on theAuthentication tab, click Secondary.If you want to designate this policy as a primary authentication policy, skip thisstep.

    7. Click Insert Policy.8. Choose the policy you want to bind to the authentication virtual server from the

    drop-down list.9. In the Priority column to the left, modify the default priority as needed to ensure

    that the policy is evaluated in the proper order.10. Click OK.

    A message appears in the status bar, stating that the policy has been configuredsuccessfully.

    LDAP Authentication PoliciesAs with other types of authentication policies, a Lightweight Directory Access Protocol(LDAP) authentication policy is comprised of an expression and an action. Aftercreating an authentication policy, you bind it to an au