Native Otp Authentication With Netscaler
Native Otp Authentication With Netscaler
Deployment Guide
This guide focuses on defining the process for deploying native OTP (One time
Password) with NetScaler
Citrix.com 1
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Table of Contents
Introduction 3
Prerequisites 4
Current Limitations 5
Deployment Environment 4
Active Directory Configuration 5
Using existing attributes 5
Device Registration and Management Page UI Flow 6
Netscaler Configuration 8
Troubleshooting 13
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 2
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Introduction
The NetScaler One Time Password (OTP) feature is introduced with NetScaler 12.0 FR1. This feature offers OTP
authentication capabilities without having to use a third party server, thus greatly reducing capex and opex for
customers. In addition, it consolidates configuration within the NetScaler, thus offering great control to adminis-
trators.
For end users to take advantage of NetScaler OTP, they must first be registered on the NetScaler Gateway
vserver. Registration is required only once per unique device. Once registration is complete, validation of OTP is
as simple as configuring an additional authentication policy.
Since NetScaler OTP eliminates the need for third party servers, the gateway has the additional capability for
offering an interface to manage user devices along with being able to validate those devices.
This document describes guidelines for deploying the management interface and also provides an example con-
figuration. In addition, this document also describes the policy required for validating OTPs from end users.
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 3
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Prerequisites
NetScaler
• Version 12.0 Feature Release 1 or above
• Available in nFactor authentication flow only
• Advanced policies is required to configure it.
• For more details, refer to https://support.citrix.com/article/CTX222713
Active Directory
• Supported versions are 2012 and 2008 Active Directory domain function level
• Netscaler ldapBind username needs to have write access to the user’s AD path
• Current supported logon and registration rate is at 300 devices per minute for single AD server.
TOTP Client
• Netscaler supports RFC6238 TOTP generation i.e., any TOTP client which complies with RFC 6238 TOTP
generation will be supported (https://tools.ietf.org/html/rfc6238)
• TOTP supported length is 6
• Tested client: Google Authenticator
Time Sync
• Both Netscaler and user’s device have to be in-sync
• It is recommended that both entities are synced to a common Network Time Server.
Current Limitations
There are limitations to this feature:
• Number of register device is depending on the AD attribute selected by the AD admin (Please see Active
Directory Configuration).
• Web based only: all the major browsers on major platforms (desktop or mobile) should be supported.
• Native clients do not support nFactor configuration fully. Please refer to: https://support.citrix.com/article/
CTX223386
Deployment Environment
The following diagram shows a typical deployment for Netscaler OTP:
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 4
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
We are assuming that this is an existing two-factor deployment, and the system would have a third party OTP
provider. The following sections will explain the detail on how to retire the mentioned OTP provider by replacing
it with Active Directory server.
This indicates that the attribute is not being used at the moment.
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 5
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Accessing via url e.g., https://otpauth.server.com/manageotp (alternatively, you can use https://alt.server.com
if you have configured host-based management page), we will be presented with initial logon page that only
requires ldap logon credential:
After login with valid credential, we will see the manage device page as follow:
After click ‘+’, type in the device name, click ‘go’, and click ‘done’, we will see a QR code generated. This indicates
the device has been registered:
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 6
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 7
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Netscaler Configuration
The Netscaler OTP solution requires configuration of two parts: device registration and OTP validation.
To setup device registration and management page, all we required is authentication vserver. The logical flow
looks as follow:
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 8
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
In this example, we create an instance of authentication vserver named “authvs”. It is recommended that
“RFWebUI” portal theme to be used by the authentication Vserver. We will have to bind server certificate to it
as well. Please note that the server ip ‘1.2.3.5’ will have to have a corresponding FQDN i.e., otpauth.server.com,
which we will need for later.
Syntax:
add authentication ldapAction <LDAP ACTION NAME> -serverIP <SERVER IP>
-serverPort <SERVER PORT> -ldapBase <BASE> -ldapBindDn <AD USER> -ldapBindDn-
Password <PASSWORD> -ldapLoginName <USER FORMAT>
Example:
add authentication ldapAction ldap _ logon _ action -serverIP 1.2.3.4 -serverPort
636 -ldapBase "OU=Users,DC=server,DC=com" -ldapBindDn administrator@ctxnsdev.
com -ldapBindDnPassword PASSWORD -ldapLoginName userprincipalname
add authentication Policy auth _ pol _ ldap _ logon -rule true -action ldap _ log-
on _ action
We recommend two ways of showing the device registration and management page: ‘by url’ or ‘by hostname’
By URL
When the url contains ‘/manageotp’ e.g., https://otpauth.server.com/manageotp, we will provide an ldap logon
add authentication loginSchemaPolicy lpol _ single _ auth _ manage _ otp _ by _ url
-rule "http.req.cookie.value(\"NSC _ TASS\").eq(\"manageotp\")" -action lschema _
single _ auth _ manage _ otp
bind authentication vserver authvs -policy lpol _ single _ auth _ manage _ otp _
by _ url -priority 10 -gotoPriorityExpression END
By Host
When the hostname is ‘alt.server.com’
add authentication loginSchemaPolicy lpol _ single _ auth _ manage _ otp _ by _
host -rule "http.req.header(\"host\").eq(\"alt.server.com\")" -action lschema _
single _ auth _ manage _ otp
bind authentication vserver authvs -policy lpol _ single _ auth _ manage _ otp _
by _ host -priority 20 -gotoPriorityExpression END
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 9
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Please note that we will be re-using the existing authentication vserver (authvs) for multi-factor authentication
as well.
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 10
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
add lb vserver lbvs _ https SSL 1.2.3.162 443 -persistenceType NONE -cltTime-
out 180 -AuthenticationHost otpauth.server.com -Authentication ON -authnVsName
authvs
bind ssl vserver lbvs _ https –certkeyname lbvs _ server _ cert
Example:
add authentication ldapAction ldap _ otp _ action -serverIP 1.2.3.4 -serverPort
636 -ldapBase "OU=Users,DC=server,DC=com" -ldapBindDn administrator@ctxnsdev.
com -ldapBindDnPassword PASSWORD -ldapLoginName userprincipalname -authentica-
tion DISABLED -OTPSecret userParameters
The differences between LDAP logon and OTP action are the need to disable the authentication (authentica-
tion = Disable) and introduction for new argument OTPSecret, which the value has to be an unused AD attribute
(Please see Active Directory Configuration)
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 11
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 12
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
Troubleshooting
OTP Counters
We introduced new counters for OTP. To show the OTP related counters, please type the following:
nsconmsg -g otp -d stats
Example output:
root@ns# nsconmsg -g otp -d stats
Displaying current counter value information
NetScaler V20 Performance Data
reltime:mili second between two records Thu Jun 15 21:00:38 2017
Index reltime counter-value symbol-name&device-no
1 2883995 1 mem _ tot _ slotpages _ allocated
3 0 0 mem _ tot _ slotpages _ freed
5 0 0 mem _ err _ slotpages _ allocfailed
7 0 22 aaa _ otp _ tot _ verify _ success
9 0 3 aaa _ otp _ tot _ verify _ fail
11 0 158 aaa _ otp _ tot _ manage _ success
13 0 0 aaa _ otp _ tot _ manage _ fail
15 0 0 dns _ totpipelined _ request
Done.
NS Log
Before analyzing the log, it is better to set the log level to debug like this:
> set syslogparams -loglevel DEBUG
Manage Device
Registration
The following entries will indicate a successful device registration:
"OTP registration succeeded, next factor: , for user: [email protected] "
Passcode Validation
"AAAD sent success while managing otp, operation: 5, user: <aaa1@ctxnsdev.
com>"
Delete Device
"AAAD sent success while managing otp, operation: 2, user: <aaa1@ctxnsdev.
com>"
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 13
Native OTP (One Time Password) Authentication with NetScaler Deployment Guide
User Logon
Successful Logon
extracted OTP secret from aaad, current factor: manage _ otp _ flow _ label, for
user: [email protected], verifying incoming otp "
"(0-311) Authentication succeeded, current factor: manage _ otp _ flow _ label, for
user: [email protected] "
Enterprise Sales
North America | 800-424-8749
Worldwide | +1 408-790-8000
Locations
Corporate Headquarters | 851 Cypress Creek Road Fort Lauderdale, FL 33309 United States
Silicon Valley | 4988 Great America Parkway Santa Clara, CA 95054 United States
Copyright© Inc. All rights reserved. Citrix, the Citrix logo, and other marks appearing herein are property of
Citrix Systems, Inc. and/or one or more of its subsidiaries, and may be registered with the U.S. Patent and Trademark
Office and in other countries. All other marks are the property of their respective owner/s.
Citrix.com | Deployment Guide | Native OTP (One Time Password) Authentication with NetScaler 14