@@ -791,15 +791,40 @@ To enable mTLS in NGINX, you need to perform the following steps:
791791
792792## Brute Force Attack Preventions
793793
794- Brute force attacks are attempts to break in to secured areas of a web application by trying exhaustive,
794+ ### Overview
795+
796+ Brute force attacks are attempts to break in to secured areas of a web application by trying exhaustive,
795797systematic, username/password combinations to discover legitimate authentication credentials.
796- To prevent brute force attacks, WAF tracks the number of failed attempts to reach login pages
797- with enforced brute force protection. When brute force patterns are detected,
798- the WAF policy considers it to be an attack if the failed logon rate increased significantly or
799- if failed logins reached a maximum threshold.
798+ To prevent brute force attacks, NGINX App Protect WAF monitors both IP addresses and/or usernames and tracks the number of
799+ failed login attempts reached a maximum threshold.
800+ When brute force patterns are detected, the NGINX App Protect WAF policy either trigger an alarm or block the attack if the failed
801+ login attempts reached a maximum threshold for a specific username or coming from a specific IP address.
802+ To enable brute force protection, at least one login page must be created.
800803
804+ ### Login page policy example
805+ ``` json
806+ "login-pages" : [
807+ {
808+ "accessValidation" : {
809+ "responseContains" : " Success"
810+ },
811+ "authenticationType" : " form" ,
812+ "url" : {
813+ "method" : " *" ,
814+ "name" : " /html_login" ,
815+ "protocol" : " http" ,
816+ "type" : " explicit"
817+ },
818+ "usernameParameterName" : " username" ,
819+ "passwordParameterName" : " password"
820+ }
821+ ]
822+ ```
823+
824+ {{< note >}} For further configuration details, see NGINX App Protect WAF Declarative Policy Guide [ Declarative Policy guide] ({{< relref "/nap-waf/v5/declarative-policy/policy/#policy/login-pages" >}}). {{< /note >}}
801825### Brute force policy example
802826
827+ Example1: A single brute force configuration is applied universally to all login pages.
803828``` json
804829{
805830 "policy" : {
@@ -812,11 +837,6 @@ if failed logins reached a maximum threshold.
812837 "brute-force-attack-preventions" : [
813838 {
814839 "bruteForceProtectionForAllLoginPages" : true ,
815- "detectionCriteria" : {
816- "action" : " alarm" ,
817- "detectDistributedBruteForceAttack" : true ,
818- "failedLoginAttemptsRateReached" : 100
819- },
820840 "loginAttemptsFromTheSameIp" : {
821841 "action" : " alarm" ,
822842 "enabled" : true ,
@@ -827,16 +847,51 @@ if failed logins reached a maximum threshold.
827847 "enabled" : true ,
828848 "threshold" : 3
829849 },
830- "measurementPeriod" : 900 ,
831- "preventionDuration" : " 3600" ,
832850 "reEnableLoginAfter" : 3600 ,
833851 "sourceBasedProtectionDetectionPeriod" : 3600
834852 }
835853 ]
836854 }
837855}
856+ ```
838857
858+ Example2: Different brute force configurations can be defined for individual login page.
859+ ``` json
860+ {
861+ "policy" : {
862+ "name" : " BruteForcePolicySpec" ,
863+ "template" : {
864+ "name" : " POLICY_TEMPLATE_NGINX_BASE"
865+ },
866+ "applicationLanguage" : " utf-8" ,
867+ "enforcementMode" : " blocking" ,
868+ "brute-force-attack-preventions" : [
869+ {
870+ "bruteForceProtectionForAllLoginPages" : false ,
871+ "loginAttemptsFromTheSameIp" : {
872+ "action" : " alarm" ,
873+ "enabled" : true ,
874+ "threshold" : 20
875+ },
876+ "loginAttemptsFromTheSameUser" : {
877+ "action" : " alarm" ,
878+ "enabled" : true ,
879+ "threshold" : 3
880+ },
881+ "reEnableLoginAfter" : 3600 ,
882+ "sourceBasedProtectionDetectionPeriod" : 3600 ,
883+ "url" : {
884+ "method" : " *" ,
885+ "name" : " /html_login" ,
886+ "protocol" : " http"
887+ }
888+ }
889+ ],
890+
891+ }
892+ }
839893```
894+ {{< note >}} For further configuration details, see NGINX App Protect WAF Declarative Policy Guide [ Declarative Policy guide] ({{< relref "/nap-waf/v5/declarative-policy/policy/#policy/brute-force-attack-preventions" >}}). {{< /note >}}
840895
841896## Custom Dimensions Log Entries
842897
0 commit comments