ADC

SMS-OTP für die Webauthentifizierung konfigurieren

NetScaler ADC kann jetzt in einen SMS-Anbieter eines Drittanbieters integriert werden, um eine zusätzliche Authentifizierungsebene bereitzustellen.

Die NetScaler ADC-Appliance kann so konfiguriert werden, dass ein OTP auf dem Handy des Benutzers als zweiten Authentifizierungsfaktor gesendet wird. Die Appliance legt dem Benutzer ein Anmeldeformular zur Eingabe des OTP nach erfolgreicher AD-Anmeldung vor. Erst nach der erfolgreichen Validierung der SMS-OTP-Authentifizierung wird dem Benutzer die angeforderte Ressource angezeigt.

Um die SMS-OTP-Authentifizierung zu erreichen, stützt sich die NetScaler ADC-Appliance auf die folgenden Faktoren im Backend.

  1. Authentifizieren Sie den Benutzer über die LDAP-Authentifizierung und extrahieren Sie die Handynummer des Benutzers.
  2. Erstellen Sie OTP und speichern Sie es in der NS-Variablen. Konfiguration und Verwendung von Variablen.
  3. Senden Sie das OTP über die WebAuth-Authentifizierungsmethode an die aus LDAP extrahierte Handynummer.
  4. Validieren Sie das OTP.

Voraussetzungen

OTP Store konfigurieren

Administratoren richten eine Datenbank/einen Store ein, um OTPs zu speichern, die für die SMS-Authentifizierung verwendet werden, indem sie den folgenden CLI-Befehl verwenden.

add ns variable otp_store -type "map(text(65),text(6),100000)" -ifValueTooBig undef -ifNoValue undef -expires 5
<!--NeedCopy-->

Generieren Sie zufälliges OTP pro Benutzersitzung

Verwenden Sie den folgenden Befehl, um ein 6-stelliges zufälliges OTP pro Benutzersitzung zu generieren und im OTP-Store zu speichern.

add ns assignment generate_otp -variable "$otp_store[AAA.USER.SESSIONID]" -set ("000000" + SYS.RANDOM.MUL(1000000).TYPECAST_UNSIGNED_LONG_AT.TYPECAST_TEXT_T).SUFFIX(6)
<!--NeedCopy-->

Konfigurieren Sie die SMS-OTP-Authentifizierung mit NetScaler ADC

  • Bevor Sie die Funktion zur Zwei-Faktor-Authentifizierung von SMS-Zwei-Faktor-Authentifizierung konfigurieren, müssen Sie eine LDAP-Authentifizierung auf einer NetScaler ADC-Appliance als ersten Faktor bei aktivierter Authentifizierung konfiguriert haben. Anweisungen zum Konfigurieren der LDAP-Authentifizierung finden Sie unter So konfigurieren Sie die LDAP-Authentifizierung mit dem Konfigurationsdienstprogramm.

  • Konfigurieren Sie LDAP und extrahieren Sie die Handynummer, die für die SMS-OTP-Authentifizierung verwendet werden soll.

Beispielkonfiguration für den ersten Faktor

add authentication ldapAction ldap_action -serverIP 1.1.1.1 -serverPort 3268 -authTimeout 30 -ldapBase "dc=nsi-test,dc=com" -ldapBindDn Administrator@nsi-test.com -ldapBindDnPassword freebsd -ldapLoginName samaccountname -groupAttrName memberOf -ssoNameAttribute samaccountname  -Attribute1 mobile -email mail

add authentication Policy ldap_policy -rule true -action ldap_action
<!--NeedCopy-->

Hinweis

Die Handynummer kann mit AAA.USER.ATTRIBUTE (1) extrahiert und beim Senden an den Backend-Server einbezogen werden.

Beispielkonfiguration für den zweiten Faktor

Mit der folgenden Beispielkonfiguration wird ein OTP generiert, das an den Endbenutzer gesendet werden soll.

add authentication policylabel set_otp -loginSchema LSCHEMA_INT

add authentication Policy set_otp -rule true -action test

add authentication policy cascade_noauth -rule true -action NO_AUTHN

add authentication Policy check_otp -rule "$test.valueExists(AAA.USER.SESSIONID)" -action NO_AUTHN

add authentication policylabel check_otp -loginSchema LSCHEMA_INTbind authentication policylabel set_otp -policyName set_otp -priority 1 -gotoPriorityExpression NEXT

bind authentication policylabel set_otp -policyName cascade_noauth -priority 2 -gotoPriorityExpression NEXT -nextFactor check_otpbind authentication policylabel check_otp -policyName wpp -priority 1 -gotoPriorityExpression NEXT

bind authentication policylabel check_otp -policyName wpp_cascade_noauth -priority 2 -gotoPriorityExpression NEXT -nextFactor otp_verifyadd authentication Policy wpp -rule true -action webAuth_POST

add authentication Policy wpp_cascade_noauth -rule true -action NO_AUTHNadd authentication Policy otp_verify -rule "AAA.LOGIN.PASSWORD.EQ($test[AAA.USER.SESSIONID])" -action NO_AUTHN

add authentication policylabel otp_verify -loginSchema onlyPassword

bind authentication policylabel otp_verify -policyName otp_verify -priority 1 -gotoPriorityExpression NEXTadd authentication vserver avs SSL 10.106.40.121 443

bind authentication vserver avs -policy ldap_policy  -priority 1 -nextFactor set_otp -gotoPriorityExpression NEXT
<!--NeedCopy-->

Beispielkonfiguration für einen dritten Faktor

Unter Verwendung der folgenden Beispielkonfiguration wird das in der Konfiguration des zweiten Faktors generierte OTP mithilfe der Webauthentifizierungsmethode an den Endbenutzer gesendet. Einzelheiten zur Webauthentifizierung finden Sie unter Webauthentifizierung.

  • Beispiel einer Webauthentifizierungskonfiguration, wenn der SMS-Server die API über die GET-Methode verfügbar

     add policy expression otp_exp_get ""method=sendMessage&send_to=" + AAA.USER.ATTRIBUTE(1) + "&msg=OTP is " + $otp_store[AAA.USER.SESSIONID] + "for login into secure access  gateway. Valid till EXPIRE_TIME. Do not share the OTP with anyone for security reasons.&userid=#####&password=###=1.0""
    
     add authentication webAuthAction webAuth_Get -serverIP 10.106.168.210 -serverPort 8080 -fullReqExpr q{"GET /GatewayAPI/rest?" + otp_exp_get + "HTTP/" + http.req.version.major + "." + http.req.version.minor.sub(1) + "\r\nAccept:\*/\*\r\nHost: <FQDN>\r\n"} -successRule "http.res.status.eq(200)" -scheme http
     <!--NeedCopy-->
    
  • Beispiel einer Webauthentifizierungskonfiguration, wenn der SMS-Server die API über die GET-Methode verfügbar

     add policy expression otp_exp_post ""Message: OTP is " + $otp_store[AAA.USER.SESSIONID] + "for login into secure access  gateway. Valid till EXPIRE_TIME. Do not share the OTP with anyone for security reasons&Mobile:" + AAA.USER.ATTRIBUTE(1)"
    
     add authentication webAuthAction webAuth_POST -serverIP 10.106.168.210 -serverPort 8080 -fullReqExpr q{"POST /MyPHP/auth.php HTTP/" + http.req.version.major + "." + http.req.version.major + "\r\nAccept:\*/\*\r\nHost: 10.106.168.210 \r\nContent-Length: 10\r\n\r\n" + otp_exp_post} -scheme http -successRule true
     <!--NeedCopy-->
    
     add authentication webAuthAction webAuth_Get -serverIP 10.106.168.210 -serverPort 8080 -fullReqExpr q{"GET /GatewayAPI/rest?" + otp_exp_get + "HTTP/" + http.req.version.major + "." + http.req.version.minor.sub(1) + "\r\nAccept:/\r\nHost: <FQDN>\r\n"} -successRule "http.res.status.eq(200)" -scheme http
    
     add policy expression otp_exp_post "$otp_store[AAA.USER.SESSIONID]"
     <!--NeedCopy-->
    
  • Senden Sie abschließend das OTP.

     add authentication Policy wpp -rule true -action webAuth_POST
    
     add authentication policylabel send_otp -loginSchema LSCHEMA_INT
     bind authentication policylabel send_otp -policyName wpp -priority 1 -gotoPriorityExpression NEXT
     <!--NeedCopy-->
    

Beispielkonfiguration für den vierten Faktor

Überprüfen Sie anhand der folgenden Beispielkonfiguration das an den Endbenutzer gesendete OTP.

In dieser Konfiguration wird eine Richtlinienregel verwendet, um das OTP anhand des OTP zu validieren, das an den Endbenutzer gesendet wird.

add authentication Policy otp_verify -rule "AAA.LOGIN.PASSWORD.EQ($otp_store[AAA.USER.SESSIONID])" -action NO_AUTHN

add authentication policylabel otp_verify -loginSchema onlyPassword

bind authentication policylabel otp_verify -policyName otp_verify -priority 1 -gotoPriorityExpression NEXT

<!--NeedCopy-->

Verwenden Sie den folgenden Befehl, um das OnlyPassword-Anmeldeschema hinzuzufügen:

add authentication loginSchema onlypassword -authenticationschema /nsconfig/loginschema/LoginSchema/OnlyPassword.xml"
<!--NeedCopy-->

Verknüpfen Sie alle Faktoren für eine erfolgreiche SMS-OTP-Authentifizierung

Verwenden Sie die folgenden CLI-Befehle, um alle Faktoren miteinander zu verknüpfen.

bind authentication policylabel send_otp -policyName wpp -priority 1 -gotoPriorityExpression NEXT -nextFactor otp_verify
<!--NeedCopy-->

Hinweis:

Die Richtlinie für die kaskadierende Authentifizierung wurde hinzugefügt, um eine zuverlässige und kontinuierliche Authentifizierung für die Endbenutzer zu ermöglichen. Wenn der aktuelle Faktor ausfällt, wird der nächste Faktor so bewertet, dass das Benutzererlebnis nicht beeinträchtigt wird.

SMS-OTP für die Webauthentifizierung konfigurieren