re-Captcha configuration for nFactor authentication
captchaAction that simplifies re-Captcha configuration. As re-Captcha is a first-class action, it can be a factor of its own. You can inject re-Captcha anywhere in the nFactor flow.
captchaAction, you do not have to modify the JavaScript.
-
re-Captcha v2 for Admin console
-
re-Captcha v3 for Admin console
-
re-Captcha v3 for Enterprise console
re-Captcha configuration
-
Configuration on Google for registering re-Captcha.
-
Configuration on NetScaler to use re-Captcha as part of the login flow.
re-Captcha configuration on Google
re-Captcha configuration for Admin Console (re-Captcha v2 and v3)
<https://www.google.com/recaptcha/admin#llist>.
-
When you navigate to this page, the following screen appears.
NoteFor NetScaler release 14.1 build 47.x and later, select either reCAPTCHA v2 or reCAPTCHA v3 as required. Previous releases support reCAPTCHA v2 only. -
After a domain is registered, the “SiteKey” and “SecretKey” are displayed. Note the displayed “SiteKey” and “SecretKey”.
NoteThe “SiteKey” and “SecretKey” are grayed out for security reasons. “SecretKey” must be kept safe.
re-Captcha configuration for Enterprise Console (re-Captcha v3)
-
Sign in to
<https://console.cloud.google.com/>by using a gmail account and create a project. -
Go to
<https://console.cloud.google.com/security/recaptcha>and create the site key. Note the created site key. For more information, see the Google re-Captcha document. -
Go to
<https://console.cloud.google.com/apis/>and create an API key. Note the created API key. For more information, see the Google re-Captcha document. -
Go to
<https://console.cloud.google.com/security/recaptcha>and copy the server URL from the assessment API (copy till the term "assessments"). Save the copied server URL.For example, if the assessment API is "https://recaptchaenterprise.googleapis.com/v1/projects/tactile-reason-455709-p6/assessments?key=API_KEY", you must copy the portion up to "assessments", which is "https://recaptchaenterprise.googleapis.com/v1/projects/tactile-reason-455709-p6/assessments". This extracted URL is used as the server URL in thecaptchaActioncommand.
re-Captcha configuration on NetScaler
-
Display re-Captcha screen
-
Post the re-Captcha response to the Google server
-
Configure LDAP as the second factor for user logon
Display re-Captcha screen
-
SingleAuthCaptcha.xmlfor re-Captcha v2 for Admin console -
SingleAuthCaptchav3.xmlfor re-Captcha v3 for Admin console -
SingleAuthReCaptchav3Enterprise.xmlfor re-Captcha v3 for Enterprise console
/nsconfig/loginSchema/LoginSchema directory on NetScaler.
-
The login schema can be used when LDAP is configured as the second factor.
-
You can customize the existing schema based on your use case. For example, you can modify it to include only the re-Captcha factor (without user name or password) or dual authentication with re-Captcha.
-
If any custom modifications are done or the file is renamed, we recommend copying all the loginSchemas from the
/nsconfig/loginschema/LoginSchemadirectory to the parent directory,/nsconfig/loginschema.
To configure display of re-Captcha by using the CLI
add authentication loginSchema singleauthcaptcha -authenticationSchema /nsconfig/loginschema/SingleAuthCaptcha.xml
add authentication loginSchemaPolicy singleauthcaptcha -rule true -action singleauthcaptcha
add authentication vserver auth SSL <IP> <Port>
add ssl certkey vserver-cert -cert <path-to-cert-file> -key <path-to-key-file>
bind ssl vserver auth -certkey vserver-cert
bind authentication vserver auth -policy singleauthcaptcha -priority 5 -gotoPriorityExpression END
add authentication loginSchema singleauthcaptcha -authenticationSchema /nsconfig/loginschema/SingleAuthCaptchav3.xml
add authentication loginSchemaPolicy singleauthcaptcha -rule true -action singleauthcaptcha
add authentication vserver auth SSL <IP> <Port>
add ssl certkey vserver-cert -cert <path-to-cert-file> -key <path-to-key-file>
bind ssl vserver auth -certkey vserver-cert
bind authentication vserver auth -policy singleauthcaptcha -priority 5 -gotoPriorityExpression END
<login_schema> parameter:
-
SingleAuthCaptcha.xmlfor re-Captcha v2 for Admin console -
SingleAuthCaptchav3.xmlfor re-Captcha v3 for Admin console -
SingleAuthReCaptchav3Enterprise.xmlfor re-Captcha v3 for Enterprise console
Post the re-Captcha response to the Google server
<https://www.google.com/recaptcha/api/siteverify> to validate the Captcha information. So, ensure that the site is reachable from NetScaler.
curl -vvv https://www.google.com/recaptcha/api/siteverify
<https://www.google.com/recaptcha/api/siteverify> to validate the Captcha information.
To verify re-Captcha response from the browser for the Admin console
add authentication captchaAction myrecaptcha -sitekey <sitekey-copied-from-google> -secretkey <secretkey-from-google>
add authentication policy myrecaptcha -rule true -action myrecaptcha
bind authentication vserver auth -policy myrecaptcha -priority 1
add authentication captchaAction -siteKey <sitekey> -secretKey <secretKey> -scoreThreshold <0 to 10>
add authentication policy myrecaptcha -rule true -action myrecaptcha
bind authentication vserver auth -policy myrecaptcha -priority 1
scoreThreshold is 5.
To verify re-Captcha response from the browser for the Enterprise console
add authentication captchaAction -siteKey <sitekey> -secretKey <APIkey> -scoreThreshold<0 - 10> -serverurl <serverURL>
add authentication policy myrecaptcha -rule true -action myrecaptcha
bind authentication vserver auth -policy myrecaptcha -priority 1
scoreThreshold is 5.
Configure LDAP as the second factor for user logon
-
SingleAuthCaptcha.xmlfor re-Captcha v2 for Admin console -
SingleAuthCaptchav3.xmlfor re-Captcha v3 for Admin console -
SingleAuthReCaptchav3Enterprise.xmlfor re-Captcha v3 for Enterprise console
add authentication ldapAction ldap-new -serverIP x.x.x.x -serverPort 636 -ldapBase "cn=users,dc=aaatm,dc=com" -ldapBindDn adminuser@aaatm.com -ldapBindDnPassword <password> -encrypted -encryptmethod ENCMTHD_3 -ldapLoginName sAMAccountName -groupAttrName memberof -subAttributeName CN -secType SSL -passwdChange ENABLED -defaultAuthenticationGroup ldapGroup
add authenticationpolicy ldap-new -rule true -action ldap-new
add authentication policylabel second-factor
bind authentication policylabel second-factor -policy ldap-new -priority 10
bind authentication vserver auth -policy myrecaptcha -priority 1 -nextFactor second-factor
add lb vserver lbtest HTTP <IP> <Port> -authentication ON -authenticationHost nssp.aaatm.com
**nssp.aaatm.com** – Resolves to authentication virtual server.
User validation of re-Captcha
-
Once the authentication virtual server loads the login page, the logon screen is displayed. Log On is disabled until re-Captcha is complete.

-
Select I’m not a robot. The re-Captcha widget is displayed.

-
You are navigated through a series of re-Captcha images, before the completion page is displayed.
-
Enter the AD credentials, select I'm not a robot, and click Log On. If authentication succeeds, you are redirected to the desired resource.
Notes:-
If re-Captcha is used with AD authentication, the Submit button for credentials is disabled until re-Captcha is complete.
-
The re-Captcha happens in a factor of its own. Therefore, any subsequent validations like AD must happen in the
nextfactorof re-Captcha.
-