You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/nap-waf/v5/configuration-guide/configuration.md
+79-25Lines changed: 79 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ For more information on the NGINX App Protect WAF security features, see [NGINX
38
38
|[gRPC Protection](#grpc-protection-for-unary-traffic)| gRPC content profile detects malformed content, parses well-formed content, and extracts the text fields for detecting attack signatures and disallowed meta-characters. In addition, it enforces size restrictions and prohibition of unknown fields. The Interface Definition Language (IDL) files for the gRPC API must be attached to the profile. gRPC protection can be on [unary](#grpc-protection-for-unary-traffic) or [bidirectional](#grpc-protection-for-bidirectional-streaming) traffic.|
39
39
|[Secure Traffic Between NGINX and App Protect Enforcer using mTLS](#secure-traffic-between-nginx-and-app-protect-enforcer-using-mtls)| Disabled by default. You can manually configure mTLS to secure the traffic between NGINX and App Protect Enforcer.|
40
40
|[Brute Force Attack Preventions](#brute-force-attack-preventions)| Configure brute-force-attack-preventions parameters to secured areas of a web application from brute force attacks.|
41
+
|[IP Groups](#ip-address-lists)| Configure IP Groups feature to organize lists of allowed and forbidden IP addresses across several lists with common attributes.|
To prevent brute force attacks, NGINX App Protect WAF monitors IP addresses, usernames, and the number of failed login attempts beyond a maximum threshold.
809
810
When brute force patterns are detected, the NGINX App Protect WAF policy either trigger an alarm or block the attack if the failed
810
811
login attempts reached a maximum threshold for a specific username or coming from a specific IP address.
811
-
To enable brute force protection, at least one login page must be created.
812
-
The login page entity is created separately and is not included in the brute force configuration block
812
+
In order to create a brute force configuration for a specific URL in Nginx App Protect you must first create a User-Defined URL, then a Login Page and finally define the URL element in the Brute Force configuration section.
813
+
813
814
814
815
---
815
816
816
-
### Login page policy example
817
+
### The User-Defined URL example
818
+
819
+
```json
820
+
"urls": [
821
+
{
822
+
"method": "*",
823
+
"name": "/html_login",
824
+
"protocol": "http",
825
+
"type": "explicit"
826
+
}
827
+
],
828
+
```
829
+
830
+
### Login pages example
817
831
818
832
A login page specifies the login URL that users must pass through to get authenticated. The configuration of a login URL includes the URL itself, the username and passwords parameters and the validation criteria (how we know that a login was successful or failed)
819
833
```json
@@ -839,18 +853,10 @@ A login page specifies the login URL that users must pass through to get authent
839
853
840
854
---
841
855
842
-
### Brute force policy example
856
+
### Brute force prevention example
843
857
844
858
Example1: A single brute force configuration is applied universally to all login pages.
845
859
```json
846
-
{
847
-
"policy": {
848
-
"name": "BruteForcePolicy",
849
-
"template": {
850
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
851
-
},
852
-
"applicationLanguage": "utf-8",
853
-
"enforcementMode": "blocking",
854
860
"brute-force-attack-preventions" : [
855
861
{
856
862
"bruteForceProtectionForAllLoginPages" : true,
@@ -868,21 +874,11 @@ Example1: A single brute force configuration is applied universally to all login
868
874
"sourceBasedProtectionDetectionPeriod" : 3600
869
875
}
870
876
]
871
-
}
872
-
}
873
877
```
874
878
875
879
Example2: Different brute force configurations can be defined for individual login pages,
876
880
with each configuration referencing a specific login page.
877
881
```json
878
-
{
879
-
"policy": {
880
-
"name": "BruteForcePolicySpec",
881
-
"template": {
882
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
883
-
},
884
-
"applicationLanguage": "utf-8",
885
-
"enforcementMode": "blocking",
886
882
"brute-force-attack-preventions" : [
887
883
{
888
884
"bruteForceProtectionForAllLoginPages" : false,
@@ -902,13 +898,71 @@ Example2: Different brute force configurations can be defined for individual log
902
898
"method": "*",
903
899
"name": "/html_login",
904
900
"protocol": "http"
905
-
}
901
+
}
906
902
}
907
-
],
903
+
]
904
+
```
908
905
909
-
}
906
+
The following example adds all three of the pieces for a complete example policy.
907
+
```json
908
+
{
909
+
"policy": {
910
+
"name": "BruteForcePolicy",
911
+
"template": {
912
+
"name": "POLICY_TEMPLATE_NGINX_BASE"
913
+
},
914
+
"applicationLanguage": "utf-8",
915
+
"enforcementMode": "blocking",
916
+
"urls": [
917
+
{
918
+
"method": "*",
919
+
"name": "/html_login",
920
+
"protocol": "http",
921
+
"type": "explicit"
922
+
}
923
+
],
924
+
"login-pages": [
925
+
{
926
+
"accessValidation": {
927
+
"responseContains": "Success"
928
+
},
929
+
"authenticationType": "form",
930
+
"url": {
931
+
"method": "*",
932
+
"name": "/html_login",
933
+
"protocol": "http",
934
+
"type": "explicit"
935
+
},
936
+
"usernameParameterName": "username",
937
+
"passwordParameterName": "password"
938
+
}
939
+
],
940
+
"brute-force-attack-preventions": [
941
+
{
942
+
"bruteForceProtectionForAllLoginPages": false,
943
+
"loginAttemptsFromTheSameIp": {
944
+
"action": "alarm",
945
+
"enabled": true,
946
+
"threshold": 20
947
+
},
948
+
"loginAttemptsFromTheSameUser": {
949
+
"action": "alarm",
950
+
"enabled": true,
951
+
"threshold": 3
952
+
},
953
+
"reEnableLoginAfter": 3600,
954
+
"sourceBasedProtectionDetectionPeriod": 3600,
955
+
"url": {
956
+
"method": "*",
957
+
"name": "/html_login",
958
+
"protocol": "http"
959
+
}
960
+
}
961
+
]
962
+
}
910
963
}
911
964
```
965
+
912
966
{{< note >}} For further configuration details, see NGINX App Protect WAF Declarative Policy Guide [Declarative Policy guide]({{< ref "/nap-waf/v5/declarative-policy/policy/#policy/brute-force-attack-preventions" >}}). {{< /note >}}
0 commit comments