Product Documentation

Managing XenMobile NetScaler Connector

Mar 30, 2015

You can use XenMobile NetScaler Connector to build access control rules to either allow or block access to ActiveSync connection requests from managed devices based on device status, app blacklists or whitelists and a host of other compliance conditions. Using the XenMobile NetScaler Connector utility, you can build dynamic and static rules that enforce corporate email policies, allowing you to block those users in violation of compliance standards. You can also set up email attachment encryption so that all attachments that pass through your Exchange server to managed devices are encrypted and only viewable on managed devices by authorized users.

Configuring XenMobile NetScaler Connector

You can configure XenMobile NetScaler Connector to selectively block or allow ActiveSync requests based on the following properties: Active Sync Service ID, Device type, User Agent (device operating system), Authorized user, and ActiveSync Command.

The default configuration supports a combination of static and dynamic groups. You maintain Static groups by using the SMG Controller Configuration utility. The static groups may consist of known categories of devices, such as all devices using a given user agent. Dynamic groups are maintained by an external source called a Gateway Configuration Provider and collected by XenMobile NetScaler Connector on a periodic basis. XenMobile Device Manager is Gateway Configuration Provider and can export groups of allowed and blocked devices and users to XenMobile NetScaler Connector.

A policy is an ordered list of groups where each group has an associated action (allow or block) and a list of group members. A policy may have any number of groups. Group ordering within a policy is important because when a match is found the action of the group is taken, and subsequent groups are not evaluated.

A member defines a way to match the properties of a request. It can match a single property (such as device ID), or multiple properties (such as device type and user agent).

Choosing a Security Model for XenMobile NetScaler Connector

Establishing a security model is essential to a successful mobile device deployment for organizations of any size. Although it is not uncommon to allow access to a user, computer, or device by default, using some form of protected or quarantined network control, it is not always a good practice. Every organization that manages IT security may have a slightly different or tailored approach to security for mobile devices.

The same logic applies to mobile device security. The vast numbers of mobile devices and types, quantities of mobile devices per user, and the array of operating system platforms and applications available make the very idea of using a permissive model a weak choice. In most organizations the restrictive model will be the most logical choice. However, it will involve some thinking to successfully roll-out the XenMobile NetScaler Connector security model. Although it is not uncommon to allow access to a user, computer, or device by default, using some form of protected or quarantined network control, it is not always a good practice

The configuration scenarios that Citrix allows for integrating XenMobile NetScaler Connector with XenMobile Device Manager is as follows:

Permissive Model (Permit Mode)

The permissive security model operates on the premise that everything is either allowed or granted access by default. Only in the case of rules and filtering will something be blocked and a restriction applied. The permissive security model is good for organizations that have a relatively loose security concern about mobile devices and only applies restrictive controls to deny access where appropriate (when a policy rule is failed).

The Restrictive Model (Block Mode)

The restrictive security model is based on the premise that nothing is allowed or granted access by default. Everything passing through the security check point is filtered and inspected, and is denied access unless the rules allowing access are passed. The restrictive security model is good for organizations that have a relatively tight security criterion about mobile devices. The mode only grants access for use and functionality with the network services when all rules to allow access have passed.

Configuring XenMobile NetScaler Connector Policy Modes

XenMobile NetScaler Connector can run in the following six modes:

  • Allow All. This policy mode grants access for all traffic passing through XenMobile NetScaler Connector. No other filtering rules are used.
  • Deny All. This policy mode blocks access for all traffic passing through XenMobile NetScaler Connector. No other filtering rules are used.
  • Static Rules: Block Mode. This policy mode executes static rules with an implicit deny or block statement at the end. Devices that are not allowed or permitted via other filter rules are blocked by XenMobile NetScaler Connector.
  • Static Rules: Permit Mode. This policy mode executes static rules with an implicit permit or allow statement at the end. Devices that are not blocked or denied via other filter rules are allowed through XenMobile NetScaler Connector.
  • Static + ZDM Rules: Block Mode. This policy mode executes static rules first, followed by dynamic rules from Device Manager with an implicit deny or block statement at the end. Devices are permitted or denied based on defined filters and Device Manager rules. Any devices that do not match on defined filters and rules are blocked.
  • Static + ZDM Rules: Permit Mode. This policy mode executes static rules first, followed by dynamic rules from Device Manager with an implicit permit or allow statement at the end. Devices are permitted or denied based on defined filters and Device Manager rules. Any devices that do not match on defined filters and rules are allowed.

The XenMobile NetScaler Connector process permits or blocks for dynamic rules based on unique ActiveSync IDs for iOS and Windows-based mobile devices received from Device Manager. Android devices differ in their behavior based on the manufacturer and some do not readily expose a unique ActiveSync ID. To compensate, Device Manager sends user ID information for Android devices to make a permit or block decision. As a result, if a user has only one Android device, permits and blocks function normally. If the user has multiple Android devices, all the devices are allowed because Android devices cannot be definitively differentiated. The gateway can still be configured to statically block these devices by ActiveSyncID, if they are known, and can also be configured to block based on device type or user agent.

To specify the policy mode, in the SMG Controller Configuration utility, do the following:
  1. Click the Path Filters tab and then click Add.
  2. In the Path Properties dialog box, select a policy mode from the Policy drop-down list and then click Save.

You can review rules on the Policies tab of the configuration utility. The rules are processed on XenMobile NetScaler Connector from top to bottom. The Allow policies are displayed with green checkmark. The Deny policies are shown as a red circle with a line through it. To refresh the screen and see the most updated rules, click Refresh. You can also modify the ordering of rules in the config.xml file.

To test rules, click the Simulator tab. Specify values in the fields. These can also be obtained from the logs. A result message will appear specifying Allow or Block.

Configuring static rules

You must enter static rules with values that are read by the ISAPI filtering of the ActiveSync connection HTTP request. Static rules enable XenMobile NetScaler Connector to permit or block traffic by the following criteria:

  • User. XenMobile NetScaler Connector uses the authorized user value and name structure that was captured during device enrollment. This is commonly found as domain\username as referenced by the server running XenMobile Device Manager connected to Active Directory via LDAP. The Log tab within the XenMobile NetScaler Connector configuration utility will show the values that are passed through XenMobile NetScaler Connector if the value structure needs to be determined or is different.
  • Deviceid (ActiveSyncID). Also known as the ActiveSyncID of the connected device. This value is commonly found within the specific device properties page in the Device Manager web console. This value can also be screened from the Log tab in the XenMobile NetScaler Connector configuration utility.
  • DeviceType. XenMobile NetScaler Connector can determine if a device is an iPhone, iPad or other device type and permit or block based on that criteria. As with other values, the XenMobile NetScaler Connector utility can reveal all connected device types being processed for the ActiveSync connection.
  • UserAgent. Contains information on the ActiveSync client that is utilized. In most cases, the value specified corresponds to a specific operating system build and version for the mobile device platform.

The XenMobile NetScaler Connector utility running on the server always manages the static rules.

  1. In the SMG Controller Configuration utility, click the Static Rules tab and then click Add.
  2. In the Static Rule Properties dialog box, specify the values that you want to use as criteria. For example, you can enter a user to allow access by entering the user name (for example, AllowedUser, and clearing the Disabled check box.
  3. Click Save. The static rule is now in effect. Additionally, you can use regular expressions to define values, but you must enable the rule processing mode in the config.xml file.

Configuring dynamic rules

Dynamic rules are defined by device policies and properties in XenMobile Device Manager and can trigger a dynamic XenMobile NetScaler Connector filter based on the presence of a policy violation or property setting. The XenMobile NetScaler Connector filters work by analyzing a device for a given policy violation or property setting and if the device meets the criteria, the device is placed in a Device List. This Device List is neither an allow list or a block list. It is a list of devices that meet the criteria defined. The following configuration options enable you to define whether you want to allow or deny the devices in the Device List by using XenMobile NetScaler Connector.

Note: These dynamic rules must be configured on the Device Manager web console.
  1. Open the Device Manager web console and then click Options from the console banner.
  2. In the left-hand navigation, click Mobile Configuration and then click XenMobile NetScaler Connector.
  3. In the Enable column, select the check boxes for the filters that you want to enable and then select either the Allow or Deny check box.

Configuring custom policies by editing the XenMobile NetsScaler Connector XML file

You can view the basic policies in the default configuration on the Policies tab of the configuration tool. If you want to create custom policies, you can edit the XML configuration file (config\config.xml).

  1. Find the PolicyList section in the file and add a new Policy element.
  2. If a new Group is also required, such as an additional static group or to support an additional GCP, add the new Group element to the GroupList section.
  3. Optionally, you can change the ordering of Groups within an existing Policy by rearranging the GroupRef elements.

Configuring the XenMobile NetScaler Connector XML File

XenMobile NetScaler Connector uses an XML configuration file to guide its actions. Among other entries, the file specifies the group files and associated actions the filter will take when evaluating HTTP requests. By default, the file is named config.xml and can be found at the following location: ..\Program Files\Citrix\XenMobile NetScaler Connector\config\.

GroupRef Nodes

The GroupRef nodes define the logical group names - by default, the AllowGroup and the DenyGroup.
Note: The order of the GroupRef nodes as they appear in the GroupRefList node is significant.

The id value of a GroupRef node identifies a logical container or collection of members that are used for matching specific user accounts or devices. The action attributes specifies how the filter will treat a member that matches a rule in the collection. For example, a user account or device that matches a rule in the AllowGroup set will "pass" (be allowed to access the Exchange CAS), while a user account or device that matches a rule in the DenyGroup set will be "rejected" (not allowed to access the Exchange CAS).

When a particular user account/device or combination meets rules in both groups, a precedence convention is used to direct the request's outcome. Precedence is embodied in the order of the GroupRef nodes in the config.xml file from top to bottom. The GroupRef nodes are ranked in priority order. Thus, the nodes shown in the figure above (which depicts the default order) are such that rules for a given condition in the Allow group will always take precedence over rules for the same condition in the Deny group.

Group Nodes

Additionally, the config.xml defines Group nodes. These nodes link the logical containers AllowGroup and DenyGroup to external XML files. Entries stored in the external files form the basis of the filter rules.
Note: In this release, only external XML files are supported.

The default installation implements two XML file in the configuration - allow.xml and deny.xml.

Importing a policy from Device Manager

  1. In the XenMobile NetScaler Configuration utility, click the Config Providers tab and then click Add.
  2. In the Config Providers dialog box, in Name, enter a user name that will be used for basic HTTP authorization with the Device Manager web server and that has administrative privileges.
  3. In Url, enter the Web address of the XenMobile Device Manager Gateway Configuration Service (GCP), typically in the format https://xdmHost/xdm/services/MagConfigService. The MagConfigService name is case sensitive.
  4. In Password, enter the password that will be used for basic HTTP authorization with the Device Manager web server.
  5. Click Test Connectivity to test gateway to configuration provider connectivity . If the connection fails, check that your local firewall settings allow the connection, or check with your administrator.
  6. When a connection is successfully made, clear the Disabled check box and then click Save.
  7. In Managing Host, leave the default DNS name of the local host computer. This setting used to coordinate communication with Device Manager when multiple Forefront Threat Management Gateway (TMG) servers are configured in an array.

After you save the settings, open the GCS.

Configuring a connection to XenMobile NetsScaler Connector

XenMobile NetScaler Connector communicates with XenMobile Device Manager and other remote configuration providers through secure web services.

  1. In the XenMobile NetScaler Connector utility, click the Config Providers tab and then click Add.
  2. In the Config Providers dialog box, in Name, enter a user name that will be used for basic HTTP authorization with the Device Manager web server and has administrative privileges.
  3. In Url, enter the Web address of the Device Manager GCP, typically in the format https://ZdmHost/zdm/services/MagConfigService. The MagConfigService name is case sensitive.
  4. In Password, enter the password that will be used for basic HTTP authorization with the Device Manager web server.
  5. In Managing Host, enter the XenMobile NetScaler Connector server name.
  6. In Baseline Interval, specify a time period for when a new refreshed dynamic ruleset is pulled from Device Manager.
  7. In Delta interval, specify a time period for when an update of dynamic rules is pulled.
  8. In Request Timeout, specify the server request timeout interval.
  9. In Config Provider, select if the config provider server instance is providing the policy configuration.
  10. In Events Enabled, enable this option if you want XenMobile NetScaler Connector to notify Device Manager when a device is blocked. This option is required if you are using XenMobile NetScaler Connector rules in any of your Device Manager Automated Actions.
  11. Click Save and then click Test Connectivity to test gateway to configuration provider connectivity . If the connection fails, check that the local firewall settings allow the connection or contact the Device Manager administrator.
  12. When the connection succeeds, clear the Disabled check box and then click Save.

When you add a new configuration provider, XenMobile NetScaler Connector automatically creates one or more policies associated with the provider. These policies are defined by a template definition contained in config\policyTemplates.xml in the NewPolicyTemplate> section. For each Policy element defined within this section, a new policy is created. The operator may add, remove, or modify policy elements provided that the policy element conforms to the schema definition, and that the standard substitution strings (enclosed in braces) are mot modified. Next, add new groups for the provider and update the policy to include the new groups.

Choosing Filters for XenMobile NetScaler Connector

XenMobile NetScaler Connector filters work by analyzing a device for a given policy violation or property setting. If the device meets the criteria, the device is placed in a Device List. This Device List is neither an allow list or a block list. It is a list of devices that meet the criteria defined. The following filters are available for XenMobile NetScaler Connector within XenMobile Device Manager.
  • Blacklisted Apps. Allows or denies devices based on the Device List defined by Blacklist policies and the presence of blacklisted apps.
  • Whitelisted Apps only. Allows or denies devices based on the Device List defined by Whitelist policies and the presence of non-whitelisted apps.
  • Unmanaged Devices. Creates a Device List of all devices in the Device Manager database. The Mobile Application Gateway needs to be deployed in a Block Mode.
  • Rooted Android /Jailbroken iOS Devices. Creates a Device List of all devices flagged as rooted and allows or denies based on rooted status.
  • Out of Compliance Devices. Allows you to deny or allow devices that meet your own internal IT compliance criteria. Compliance is an arbitrary setting defined by the device property named Out of Compliance, which is a Boolean flag that can be either True or False. (You can create this property manually and set the value, or you can use Automated Actions to create this property on a device if the device does or does not meet specific criteria.)
    • Out of Compliance = True. If a device does not meet the compliance standards and policy definitions set by your IT department, the device is out of compliance.
    • Out of Compliance = False. If a device does meet the compliance standards and policy definitions set by your IT department, the device is compliant.
  • Noncompliant password. Creates a Device List of all devices that do not have a passcode on the device.
  • Revoked Status. Creates a Device List of all revoked devices and allows or denies based on revoked status.
  • Inactive devices. Creates a Device List of devices that have not communicated with Device Manager within a specified period of time and are thus considered inactive and allows or denies the devices accordingly.
  • Anonymous Devices. Allows or denies those devices that are enrolled in Device Manager but the user's identity is unknown. For example, this could be a user who was enrolled but their Active Directory password is expired, or a user who enrolled with unknown credentials.
  • Implicit Allow / Deny. Creates a Device List of all devices that do not meet any of the other filter rule criteria and allows or denies based on that list. The Implicit Allow/Deny option ensures that the XenMobile NetScaler Connector status in the Devices tab is enabled and shows XenMobile NetScaler Connector status for your devices. The Implicit Allow/Deny option also controls all of the other XenMobile NetScaler Connector filters that have not been selected. For example, Blacklists Apps will be denied (blocked) by XenMobile NetScaler Connector, whereas all other filters will be allowed because the Implicit Allow/Deny option is selected to Allow.

Simulating ActiveSync traffic

You can use the XenMobile NetScaler Connector to simulate what ActiveSync traffic will look like in conjunction with your policies to test your configurations.
  1. In the XenMobile NetScaler Configuration utility, select the Simulations tab.
    • The results show you how you policies will apply according to the rules you have configured.

Monitoring XenMobile NetScaler Connector

The XenMobile NetScaler Connector utility provides detailed logging that you can use to view all traffic passing through your Exchange sever that is either allowed or blocked by Secure mobile Gateway.

Use the Log tab to view history of the ActiveSync requests forwarded to XenMobile NetScaler Connector by NetScaler for authorization.

Also, to make sure the XNC web service is running, ou can load the following URL into a browser on the XNC server http://<host:port>/services/ActiveSync/Version, and if this returns the product version as a string then this is an indication that the web service is responsive.