Native OTP support for authentication
Citrix ADC appliance supports one-time passwords (OTPs) without having to use a third-party server. One-time password is a highly secure option for authenticating to secure servers as the number or passcode generated is random. Previously, OTPs are offered by specialized firms, such as RSA with specific devices that generate random numbers. This system must be in constant communication with client to generate a number expected by the server.
In addition to reducing capital and operating expenses, this feature enhances the administrator’s control by keeping the entire configuration on the Citrix ADC appliance.
Since third-party servers are no longer needed, the Citrix ADC administrator has to configure an interface to manage and validate user devices.
User must be registered with a Citrix ADC appliance virtual server to use the OTP solution. Registration is required only once per unique device, and can be restricted to certain environments. Configuring and validation of a registered user is similar to configuring an extra authentication policy.
Advantages of having Native OTP support
- Reduces operating cost by eliminating the need to have an extra infrastructure on an authenticating server in addition to the Active Directory.
- Consolidates configuration only to Citrix ADC appliance thus offering great control to administrators.
- Eliminates client’s dependence on an extra authentication server for generating a number expected by clients.
Native OTP workflow
The native OTP solution is a two-fold process and the workflow is classified as following:
- Device registration
- End user login
You can skip the registration process if you are using third-party solutions or managing other devices apart from Citrix ADC appliance. The final string that you add must be in the Citrix ADC specified format.
The following figure depicts the device registration flow to register a new device to receive OTP.
The device registration can be done using any number of factors. The single factor (as specified in the previous figure) is used as an example to explain the device registration process.
The following figure depicts the verification of OTP through the registered device.
To use the native OTP feature, make sure the following prerequisites are met.
- Citrix ADC feature release version is 12.0 build 53.13 and later.
- Citrix ADC appliance is configured with management IP and the management console is accessible both using a browser and command line.
- Appropriate license is installed on Citrix ADC appliance.
- Citrix ADC is configured with authentication, authorization, and auditing virtual server to authenticate users.
- Citrix ADC appliance is configured with Unified Gateway and the authentication, authorization, and auditing profile is assigned to the Gateway virtual server.
- Native OTP solution is restricted to nFactor authentication flow. Advanced policies are required to configure the solution. For more details, see article CTX222713.
Also ensure the following for Active Directory:
- A minimum attribute length of 256 characters.
- Attribute type must be ‘DirectoryString’ such as UserParameters. These attributes can hold string values.
- Attribute string type must be Unicode, if device name is in non-English characters.
- Citrix ADC LDAP administrator must have write access to the selected AD attribute.
- Citrix ADC appliance and client machine must be synced to a common Network Time Server.
Configure Native OTP using the GUI
The native OTP registration is not just a single factor authentication. The following sections help you to configure the single and second factor authentication.
Create Login Schema for first factor
- Navigate to Security AAA > Application Traffic > Login Schema.
- Go to Profiles and click Add.
- On the Create Authentication Login Schema page, enter lschema_first_factor under Name field and click Edit next to noschema.
- Click the LoginSchema folder.
- Scroll down to select SingleAuth.xml and click Select.
- Click Create.
- Click Policies and Click Add.
On the Create Authentication Login Schema Policy screen, enter the following values.
Name: lschema_first_factor Profile: select lschema_first_factor from the drop-down. Rule: HTTP.REQ.COOKIE.VALUE(“NSC_TASS”).EQ(“manageotp”)
Configure authentication, authorization, and auditing virtual server
- Navigate to Security > AAA – Application Traffic > Authentication Virtual Servers. Click to edit the existing vServer.
- Click the + icon next to Login Schemas under Advanced Settings in the right pane.
- Select No Login Schema.
- Click the arrow and select the lschema_first_factor Policy.
- Select the lschema_first_factor policy and Click Select.
- Click Bind.
- Scroll up and select 1 Authentication Policy under Advanced Authentication Policy.
- Right click the nFactor Policy and select Edit Binding.
- Click the + icon present under Select Next Factor, create a Next Factor, and click Bind.
On the Create Authentication PolicyLabel screen, enter the following, and click Continue:
Login Schema: Lschema_Int
On the Authentication PolicyLabel screen, click the + icon to create a Policy.
On the Create Authentication Policy screen, enter the following:
- Select the Action type using the Action Type drop-down.
- In the Action field, click the + icon to create an Action.
In the Create Authentication LDAP server page, select Server IP radio button, deselect the checkbox next to Authentication, enter the following values, and select Test Connection.
IP Address: 192.168.10.11
Base DN: DC=training, DC=lab
Scroll down to the Other Settings section. Use the drop-down menu to select the following options.
Server Logon Name Attribute as New and type userprincipalname.
- Use the drop-down menu to select SSO Name Attribute as New and type userprincipalname.
- Enter “UserParameters” in the OTP Secret field and click More.
Enter the following Attributes.
Attribute 1 = mail Attribute 2 = objectGUID Attribute 3 = immutableID
- Click OK.
- On the Create Authentication Policy page, set the Expression to true and click Create.
- On the Create Authentication Policylabel page, click Bind, and click Done.
- On the Policy Binding page, click Bind.
- On the Authentication policy page, click Close and click Done.
The authentication virtual server must be bound to RFWebUI portal theme. Bind a server certificate to the server. The server IP ‘184.108.40.206’ must have a corresponding FQDN that is, otpauth.server.com, for later use.
Create login schema for second factor OTP
- Navigate to Security > AAA- Application Traffic > Virtual Servers. Select the virtual server to be edited.
- Scroll down and select 1 Login Schema.
- Click Add Binding.
- Under Policy Binding section, click the + icon to add a policy.
- On the Create Authentication Login Schema Policy page, enter Name as OTP, and click the + icon to create a profile.
- On the Create Authentication Login Schema page, enter Name as OTP, and click the icon next to noschema.
- Click the LoginSchema folder, select DualAuth.xml, and then click Select.
- Click Create.
- In the Rule section, enter True. Click Create.
- Click Bind.
- Notice the two factors of authentication. Click Close and click Done.
Configure content switching policy for manage OTP
The following configurations are required if you are using Unified Gateway.
Navigate to Traffic Management > Content Switching > Policies. Select the content switching policy, right click, and select Edit.
Edit the expression to evaluate the following OR statement and click OK:
Configure Native OTP using the CLI
You must have the following information to configure the OTP device management page:
- IP assigned to authentication virtual server
- FQDN corresponding to the assigned IP
- Server certificate for authentication virtual server
Native OTP is a web-based solution only.
To configure the OTP device registration and management page
Create authentication virtual server
add authentication vserver authvs SSL 220.127.116.11 443
bind authentication vserver authvs -portaltheme RFWebUI
bind ssl vserver authvs -certkeyname otpauthcert
The authentication virtual server must be bound to RFWebUI portal theme. You must bind a server certificate to the server. The server IP ‘18.104.22.168’ must have a corresponding FQDN that is, otpauth.server.com, for later use.
To create LDAP logon action
add authentication ldapAction <LDAP ACTION NAME> -serverIP <SERVER IP> - serverPort <SERVER PORT> -ldapBase <BASE> -ldapBindDn <AD USER> -ldapBindDnPassword <PASSWO> -ldapLoginName <USER FORMAT>
add authentication ldapAction ldap_logon_action -serverIP 22.214.171.124 -serverPort 636 -ldapBase "OU=Users,DC=server,DC=com" -ldapBindDn email@example.com -ldapBindDnPassword PASSWORD -ldapLoginName userprincipalname
To add authentication policy for LDAP Logon
add authentication Policy auth_pol_ldap_logon -rule true -action ldap_logon_action
To present UI via LoginSchema
Show username field and password field to users upon logon
add authentication loginSchema lschema_single_auth_manage_otp -authenticationSchema "/nsconfig/loginschema/LoginSchema/SingleAuthManageOTP.xml"
Display device registration and management page
Citrix recommends two ways of displaying the device registration and management screen: URL or hostname.
When the URL contains ‘/manageotp’
add authentication loginSchemaPolicy lpol_single_auth_manage_otp_by_url -rule "http.req.cookie.value(\"NSC_TASS\").contains(\"manageotp\")" -action lschema_single_auth_manage_otp
bind authentication vserver authvs -policy lpol_single_auth_manage_otp_by_url -priority 10 -gotoPriorityExpression END
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
To configure the user login page using the CLI
You must have the following information to configure the User Logon page:
- IP for a load balancing virtual server
- Corresponding FQDN for the load balancing virtual server
- Server certificate for the load balancing virtual server
Reuse the existing authentication virtual server (authvs) for the two-factor authentication.
To create load balancing virtual server
add lb vserver lbvs_https SSL 126.96.36.199 443 -persistenceType NONE -cltTimeout 180 - AuthenticationHost otpauth.server.com -Authentication ON -authnVsName authvs
bind ssl vserver lbvs_https -certkeyname lbvs_server_cert
Back-end service in load balancing is represented as follows:
add service iis_backendsso_server_com 188.8.131.52 HTTP 80
bind lb vserver lbvs_https iis_backendsso_server_com
To create OTP passcode validation action
add authentication ldapAction <LDAP ACTION NAME> -serverIP <SERVER IP> -serverPort <SERVER PORT> -ldapBase <BASE> -ldapBindDn <AD USER> -ldapBindDnPassword <PASSWORD> -ldapLoginName <USER FORMAT> -authentication DISABLED -OTPSecret <LDAP ATTRIBUTE>
add authentication ldapAction ldap_otp_action -serverIP 184.108.40.206 -serverPort
636 -ldapBase "OU=Users,DC=server,DC=com" -ldapBindDn administrator@ctxnsdev.
com -ldapBindDnPassword PASSWORD -ldapLoginName userprincipalname -authentication
DISABLED -OTPSecret userParameters
The difference between LDAP logon and OTP action is the need to disable the authentication and introduce a new parameter “OTPSecret.” The AD attribute value must not be used.
To add authentication policy for OTP passcode validation
add authentication Policy auth_pol_otp_validation -rule true -action ldap_otp_action
To present the two-factor authentication through LoginSchema
Add the UI for two factor authentication.
add authentication loginSchema lscheme_dual_factor -authenticationSchema "/nsconfig/loginschema/LoginSchema/DualAuth.xml"
add authentication loginSchemaPolicy lpol_dual_factor -rule true -action lscheme_dual_factor
To create passcode validation factor via policy label
Create a manage OTP flow policy label for next factor (first factor is LDAP logon)
add authentication loginSchema lschema_noschema -authenticationSchema noschema
add authentication policylabel manage_otp_flow_label -loginSchema lschema_noschema
To bind the OTP policy to the policy label
bind authentication policylabel manage_otp_flow_label -policyName auth_pol_otp_validation -priority 10 -gotoPriorityExpression NEXT
To bind the UI flow
Bind the LDAP logon followed by the OTP validation with authentication virtual server.
bind authentication vserver authvs -policy auth_pol_ldap_logon -priority 10 -nextFactor manage_otp_flow_label -gotoPriorityExpression NEXT
bind authentication vserver authvs -policy lpol_dual_factor -priority 30 -gotoPriorityExpression END
Register your device with Citrix ADC
- Navigate to your Citrix ADC FQDN (first public facing IP), with a /manageotp suffix. For example, https://otpauth.server.com/manageotp Login with user credentials.
Click the + icon to add a device.
- Enter a device name and press Go. A barcode appears on screen.
- Click Begin Setup and then click Scan Barcode.
Hover the device camera over the QR code. You can optionally enter the 16 digit code.
Upon successful scan, you are presented with a 6 digit time sensitive code that can be used to login.
- To test, click Done on the QR screen, then click the green check mark on the right.
- Select your device from the drop-down menu and enter the code from Google Authenticator (must be blue, not red) and click Go.
- Make sure to log out using the list at the top right corner of the page.
Log in to Citrix ADC using the OTP
- Navigate to your first public facing URL and enter your OTP from Google Authenticator to log on.
Authenticate to the Citrix ADC splash page.
OTP integration with third-party solutions using hardware tokens
- You don’t have to register the Citrix ADC appliance to use it as hardware token support.
- This feature is supported from Citrix ADC version 12.1 build 51.16 and later.
Citrix ADC OTP system now conforms the TOTP RFC 6238. That means, Citrix ADC uses current time in seconds along with a shared secret to compute TOTP code. Citrix ADC uses a time slice of 30 seconds and HMAC-SHA1 algorithm.
Starting from Citrix ADC version 12.1 build 51.16, ADC supports third-party solutions that use extended key size or SHA2 algorithm. Users can now configure the active directory object with larger seed value and different algorithm.
Citrix ADC stores the information on user object in active directory in the following format:
The text in capitals is the seed for TOTP. The algorithm is assumed to be HMAC-SHA1 and time slice is assumed to be 30 seconds.
For interoperability with Citrix ADC using hardware tokens or third party solutions, you can customize the string as follows:
#@mobile1=<variable length seed>&alg=sha2&,
The ‘sha2’ seed must be base32 encoded secret.
You can provide a variable length seed value. Also, you can specify “alg=sha2&,” towards the end, preceding the comma. That is, “alg=sha2” should be added after “&” but before “,.” End delimiter must always be “&,.”
Any misconfiguration apart from what is described might result in unexpected results.
Configuring the number of end-user devices for receiving OTP notifications
Administrators can now configure the number of devices that an end user can register to receive OTP notification or authentication.
To configure the number of devices in OTP by using the CLI
At the command prompt, type:
set aaa otpparameter [-maxOTPDevices <positive_integer>]
Where, ‘maxOTPDevices’ is the maximum number of end user devices that can be registered to receive OTP for authentication. Default value is 4 and maximum value is 255.
set aaa otpparameter -maxOTPDevices 4
To view the OTP parameter at the command prompt, type:
show otpparameter configured AAA OTP parameters Max otp device Configured: 4
To configure the number of devices by using the GUI
Navigate to Security > AAA – Application Traffic, click Change authentication AAA OTP Parameter under Authentication Settings section.
On the Configure AAA OTP Parameter page, enter the values for Max OTP device Configured.
Native OTP support for authentication
In this article
- Advantages of having Native OTP support
- Native OTP workflow
- Configure Native OTP using the GUI
- Configure Native OTP using the CLI
- Display device registration and management page
- Register your device with Citrix ADC
- Log in to Citrix ADC using the OTP
- OTP integration with third-party solutions using hardware tokens
- Configuring the number of end-user devices for receiving OTP notifications