ADC

Configuring users, user groups, and command policies

Define your users by configuring accounts for them. To simplify the management of user accounts, you can organize them into groups. You can create command policies, or use built-in command policies, to regulate user access to commands.

You can also customize the command-line prompt for a user. Prompts can be defined in a user’s configuration, in a user-group configuration, and in the global system configuration settings. The prompt displayed for a given user is determined by the following order of precedence:

  1. Display the prompt as defined in the user’s configuration.
  2. Display the prompt as defined in the group configuration for the user’s group.
  3. Display the prompt as defined in the system global configuration settings.

You can now specify a timeout value for inactive CLI sessions for a system user. If a user’s CLI session is idle for a time that exceeds the timeout value, the Citrix ADC appliance terminates the connection. The timeout can be defined in a user’s configuration, in a user-group configuration, and in the global system configuration settings. The timeout for inactive CLI sessions for a user is determined by the following order of precedence:

  1. User’s configuration.
  2. TGroup configuration for the user’s group.
  3. Global system configuration settings.

A Citrix ADC root administrator can configure the maximum concurrent session limit for system users. By restricting the limit, you can reduce the number of open connections and improve server performance. As long as the CLI count is within the configured limit, concurrent users can log on the GUI any number of times. However, if the number of CLI sessions reaches the configured limit, users can no longer logon to the GUI. For example, if the number of concurrent sessions is configured to 20, concurrent users can log on to 19 CLI sessions. But if the user is logged on to the 20th CLI session, any attempt to log on to the GUI, CLI, or NITRO results in an error message ((ERROR: Connection limit to CFE exceeded).

Note:

The default the number of concurrent sessions is configured to 20 and the maximum number of concurrent sessions is configured to 40.

Configuring user accounts

To configure user accounts, you simply specify user names and passwords. You can change passwords and remove user accounts at any time.

Note:

All characters in a password are not accepted. However, it works if you type the characters within quotes.

Also, the string must not exceed a maximum length of 127 characters.

To create a user account by using the command line interface

At the command prompt, type the following commands to create a user account and verify the configuration:

  • add system user <username> [-externalAuth ( ENABLED | DISABLED )] [-promptString <string>] [-timeout \<secs>] [-logging ( ENABLED | DISABLED )] [-maxsession <positive_integer>]
  • show system user <userName>

External users can configure the “logging” parameter to collect external logs using the web logging or audit logging mechanism. If the parameter is enabled, the auditing client authenticates itself with the Citrix ADC appliance to collect logs.

Example:

> add system user johnd -promptString user-%u-at-%T

Enter password:

Confirm password:

> show system user johnd

user name: john

     Timeout:900 Timeout Inherited From: Global

     External Authentication: ENABLED

     Logging: DISABLED

     Maximum Client Sessions: 20
<!--NeedCopy-->

To configure a user account by using the GUI

Navigate to System > User Administration > Users, and create the user.

Configuring user groups

After configuring a user group, you can easily grant the same access rights to everyone in the group. To configure a group, you create the group and bind users to the group. You can bind each user account to more than one group. Binding user accounts to multiple groups might allow more flexibility when applying command policies.

To create a user group by using the command line interface

At the command prompt, type the following commands to create a user group and verify the configuration:

  • add system group <groupName> [-promptString <string>] [-timeout <secs>]
  • show system group <groupName>

Example:

> add system group Managers -promptString Group-Managers-at-%h

To bind a user to a group by using the command line interface

At the command prompt, type the following commands to bind a user account to a group and verify the configuration:

  • bind system group <groupName> -userName <userName>
  • show system group <groupName>

Example:

bind system group Managers -userName user1

To configure a user group by using the GUI

Navigate to System > User Administration > Groups, and create the user group.

Note:

To add members to the group, in the Members section, click Add. Select users from the available list and add them to the configured list.

Configuring command policies

Command policies regulate which commands, command groups, virtual servers, and other entities that users and user groups are permitted to use.

The appliance provides a set of built-in command policies, and you can configure custom policies. To apply the policies, you bind them either to users or to groups.

Here are the key points to keep in mind when defining and applying command policies.

  • You cannot create global command policies. Command policies must be bound directly to the users and groups on the appliance.
  • Users or groups with no associated command policies are subject to the default (DENY-ALL) command policy, and are therefore unable to run any configuration commands until the proper command policies are bound to their accounts.
  • All users inherit the policies of the groups to which they belong.
  • You must assign a priority to a command policy when you bind it to a user account or group account. It enables the appliance to determine which policy has priority when two or more conflicting policies apply to the same user or group.
  • The following commands are available by default to any user and are unaffected by any command you specify:
  • help, show CLI attribute, set CLI prompt, clear CLI prompt, show CLI prompt, alias, unalias, history, quit, exit, whoami, config, set CLI mode, unset CLI mode, and show CLI mode.

Built-in Command Policies

The following table describes the built-in policies.

Policy name Allows
read-only Read-only access to all show commands except show ns runningConfig, show ns ns.conf, and the show commands for the Citrix ADC command group.
operator Read-only access and access to commands to enable and disable services and servers.
network Full access, except to the set and unset SSL commands, show ns ns.conf, show ns runningConfig, and show gslb runningConfig commands.
sysadmin [Included in Citrix ADC 12.0 and later] A sysadmin is lower than a superuser in terms of access allowed on the appliance. A sysadmin user can perform all Citrix ADC operations with the following exceptions: no access to the Citrix ADC shell, cannot perform user configurations, cannot perform partition configurations, and some other configurations as stated in the sysadmin command policy.
superuser Full access. Same privileges as the administrator.

Creating custom command policies

Regular expression support is offered for users with the resources to maintain more customized expressions, and for those deployments that require the flexibility that regular expressions offer. For most users, the built-in command policies are sufficient. Users who need more levels of control but are unfamiliar with regular expressions might want to use only simple expressions. You can see the examples provided in this section, to maintain policy readability.

When you use a regular expression to create a command policy, keep the following in mind.

  • When you use regular expressions to define commands that is affected by a command policy, you must enclose the commands in double quotation marks. For example, to create a command policy that includes all commands that begin with show, type the following:
  • “^show .*$”
  • To create a command policy that includes all commands that begin with rm, type the following:
  • “^rm .*$”
  • Regular expressions used in command policies are not case sensitive.

The following table lists examples of regular expressions:

Command specification Matches these commands
“^rm\s+.*$” All remove actions, because all remove actions begin with the rm string, followed by a space and more parameters such as command groups, command object types, and arguments.
“^show\s+.*$” All show commands, because all show actions begin with the show string, followed by a space and more parameters such as command groups, command object types, and arguments.
“^shell$” The shell command alone, but not combined with any additional parameters such as command groups, command object types, and arguments.
“^add\s+vserver\s+.*$” All create virtual server actions, which consist of add virtual server command followed by a space and more parameters such as command groups, command object types, and arguments.
“^add\s+(lb\s+vserver)\s+.*” All create lb virtual server actions, which consist of the add lb virtual server command followed by a space and more parameters such as command groups, command object types, and arguments.

For information about built-in command policies, see table Built-in command policy table.

To create a command policy by using the command line interface

At the command prompt, type the following commands to create a command policy and verify the configuration:

  • add system cmdPolicy <policyname> <action> <cmdspec>
  • show system cmdPolicy <policyName>

Example

Example:

add system cmdPolicy USER-POLICY ALLOW (server )|(service(Group)* )|( vserver )|(policy)|(policylabel )|(limitIdentifier)|(^show (?!(system|ns (ns.conf|runningConfig))))|(save)|(stat .*serv)

To configure a command policy by using the GUI

Navigate to System > User AdministrationCommand Policies, and create the command policy.

Binding command policies to users and groups

Once you have defined your command policies, you must bind them to the appropriate user accounts and groups. When you bind a policy, you must assign it a priority so that the appliance can determine which command policy to follow when two or more applicable command policies are in conflict.

Command policies are evaluated in the following order:

  • Command policies bound directly to users and the corresponding groups are evaluated according to priority number. A command policy with a lower priority number is evaluated before one with a higher priority number. Therefore, any privileges the lower-numbered command policy explicitly grants or denies are not overridden by a higher-numbered command policy.
  • When two command policies, one bound to a user account and the other to a group, have the same priority number, the command policy bound directly to the user account is evaluated first.

To bind command policies to a user by using the command line interface

At the command prompt, type the following commands to bind a command policy to a user and verify the configuration:

  • bind system user <userName> -policyName <policyName> <priority>
  • show system user <userName>

Example:

bind system user user1 -policyName read_all 1

To bind command policies to a user by using the GUI

Navigate to SystemUser Administration > Users, select the user and bind command policies.

Optionally, you can modify the default priority to ensure that the policy is evaluated in the proper order.

To bind command policies to a group by using the command line interface

At the command prompt, type the following commands to bind a command policy to a user group and verify the configuration:

  • bind system group <groupName> -policyName <policyName> <priority>
  • show system group <groupName>

Example:

bind system group Managers -policyName read_all 1

To bind command policies to a group by using the GUI

Navigate to SystemUser AdministrationGroups, select the group and bind command policies.

Optionally, you can modify the default priority to ensure that the policy is evaluated in the proper order.

Configuring users, user groups, and command policies