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/v4/configuration-guide/configuration.md
+78-25Lines changed: 78 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,8 @@ When configuring NGINX App Protect WAF, `app_protect_enable` should always be en
38
38
|[Deny and Allow IP lists](#deny-and-allow-ip-lists)| Manually define denied & allowed IP addresses as well as IP addresses to never log. |
39
39
|[XFF headers & trust](#xff-headers-and-trust)| Disabled by default. User can enable it and optionally add a list of custom XFF headers. |
40
40
|[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.|
41
-
|[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
+
|[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.|
42
+
|[IP Groups](#ip-address-lists)| Configure IP Groups feature to organize lists of allowed and forbidden IP addresses across several lists with common attributes.|
42
43
43
44
### Disallowed File Types
44
45
{{< include "nap-waf/config/common/disallowed-file-types.md" >}}
To prevent brute force attacks, NGINX App Protect WAF monitors IP addresses, usernames, and the number of failed login attempts beyond a maximum threshold.
674
675
When brute force patterns are detected, the NGINX App Protect WAF policy either trigger an alarm or block the attack if the failed
675
676
login attempts reached a maximum threshold for a specific username or coming from a specific IP address.
676
-
To enable brute force protection, at least one login page must be created.
677
-
The login page entity is created separately and is not included in the brute force configuration block.
677
+
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.
678
678
679
679
---
680
+
### The User-Defined URL example
680
681
681
-
### Login page policy example
682
+
```json
683
+
"urls": [
684
+
{
685
+
"method": "*",
686
+
"name": "/html_login",
687
+
"protocol": "http",
688
+
"type": "explicit"
689
+
}
690
+
],
691
+
```
692
+
693
+
### Login pages example
682
694
683
695
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)
684
696
```json
@@ -703,18 +715,10 @@ A login page specifies the login URL that users must pass through to get authent
703
715
{{< note >}} For further configuration details, see NGINX App Protect WAF Declarative Policy Guide [Declarative Policy guide]({{< ref "/nap-waf/v4/declarative-policy/policy/#policy/login-pages" >}}). {{< /note >}}
704
716
705
717
---
706
-
### Brute force policy example
718
+
### Brute force prevention example
707
719
708
720
Example1: A single brute force configuration is applied universally to all login pages.
709
721
```json
710
-
{
711
-
"policy": {
712
-
"name": "BruteForcePolicy",
713
-
"template": {
714
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
715
-
},
716
-
"applicationLanguage": "utf-8",
717
-
"enforcementMode": "blocking",
718
722
"brute-force-attack-preventions" : [
719
723
{
720
724
"bruteForceProtectionForAllLoginPages" : true,
@@ -732,21 +736,11 @@ Example1: A single brute force configuration is applied universally to all login
732
736
"sourceBasedProtectionDetectionPeriod" : 3600
733
737
}
734
738
]
735
-
}
736
-
}
737
739
```
738
740
739
741
Example2: Different brute force configurations can be defined for individual login pages,
740
742
with each configuration referencing a specific login page.
741
743
```json
742
-
{
743
-
"policy": {
744
-
"name": "BruteForcePolicySpec",
745
-
"template": {
746
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
747
-
},
748
-
"applicationLanguage": "utf-8",
749
-
"enforcementMode": "blocking",
750
744
"brute-force-attack-preventions" : [
751
745
{
752
746
"bruteForceProtectionForAllLoginPages" : false,
@@ -766,13 +760,72 @@ Example2: Different brute force configurations can be defined for individual log
766
760
"method": "*",
767
761
"name": "/html_login",
768
762
"protocol": "http"
769
-
}
763
+
}
770
764
}
771
765
],
766
+
```
772
767
773
-
}
768
+
The following example adds all three of the pieces for a complete example policy.
769
+
770
+
```json
771
+
{
772
+
"policy": {
773
+
"name": "BruteForcePolicy",
774
+
"template": {
775
+
"name": "POLICY_TEMPLATE_NGINX_BASE"
776
+
},
777
+
"applicationLanguage": "utf-8",
778
+
"enforcementMode": "blocking",
779
+
"urls": [
780
+
{
781
+
"method": "*",
782
+
"name": "/html_login",
783
+
"protocol": "http",
784
+
"type": "explicit"
785
+
}
786
+
],
787
+
"login-pages": [
788
+
{
789
+
"accessValidation": {
790
+
"responseContains": "Success"
791
+
},
792
+
"authenticationType": "form",
793
+
"url": {
794
+
"method": "*",
795
+
"name": "/html_login",
796
+
"protocol": "http",
797
+
"type": "explicit"
798
+
},
799
+
"usernameParameterName": "username",
800
+
"passwordParameterName": "password"
801
+
}
802
+
],
803
+
"brute-force-attack-preventions": [
804
+
{
805
+
"bruteForceProtectionForAllLoginPages": false,
806
+
"loginAttemptsFromTheSameIp": {
807
+
"action": "alarm",
808
+
"enabled": true,
809
+
"threshold": 20
810
+
},
811
+
"loginAttemptsFromTheSameUser": {
812
+
"action": "alarm",
813
+
"enabled": true,
814
+
"threshold": 3
815
+
},
816
+
"reEnableLoginAfter": 3600,
817
+
"sourceBasedProtectionDetectionPeriod": 3600,
818
+
"url": {
819
+
"method": "*",
820
+
"name": "/html_login",
821
+
"protocol": "http"
822
+
}
823
+
}
824
+
]
825
+
}
774
826
}
775
827
```
828
+
776
829
{{< note >}} For further configuration details, see NGINX App Protect WAF Declarative Policy Guide [Declarative Policy guide]({{< ref "/nap-waf/v4/declarative-policy/policy/#policy/brute-force-attack-preventions" >}}). {{< /note >}}
Copy file name to clipboardExpand all lines: content/nap-waf/v5/configuration-guide/configuration.md
+79-25Lines changed: 79 additions & 25 deletions
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.
813
814
When brute force patterns are detected, the NGINX App Protect WAF policy either trigger an alarm or block the attack if the failed
814
815
login attempts reached a maximum threshold for a specific username or coming from a specific IP address.
815
-
To enable brute force protection, at least one login page must be created.
816
-
The login page entity is created separately and is not included in the brute force configuration block
816
+
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.
817
+
817
818
818
819
---
819
820
820
-
### Login page policy example
821
+
### The User-Defined URL example
822
+
823
+
```json
824
+
"urls": [
825
+
{
826
+
"method": "*",
827
+
"name": "/html_login",
828
+
"protocol": "http",
829
+
"type": "explicit"
830
+
}
831
+
],
832
+
```
833
+
834
+
### Login pages example
821
835
822
836
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)
823
837
```json
@@ -843,18 +857,10 @@ A login page specifies the login URL that users must pass through to get authent
843
857
844
858
---
845
859
846
-
### Brute force policy example
860
+
### Brute force prevention example
847
861
848
862
Example1: A single brute force configuration is applied universally to all login pages.
849
863
```json
850
-
{
851
-
"policy": {
852
-
"name": "BruteForcePolicy",
853
-
"template": {
854
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
855
-
},
856
-
"applicationLanguage": "utf-8",
857
-
"enforcementMode": "blocking",
858
864
"brute-force-attack-preventions" : [
859
865
{
860
866
"bruteForceProtectionForAllLoginPages" : true,
@@ -872,21 +878,11 @@ Example1: A single brute force configuration is applied universally to all login
872
878
"sourceBasedProtectionDetectionPeriod" : 3600
873
879
}
874
880
]
875
-
}
876
-
}
877
881
```
878
882
879
883
Example2: Different brute force configurations can be defined for individual login pages,
880
884
with each configuration referencing a specific login page.
881
885
```json
882
-
{
883
-
"policy": {
884
-
"name": "BruteForcePolicySpec",
885
-
"template": {
886
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
887
-
},
888
-
"applicationLanguage": "utf-8",
889
-
"enforcementMode": "blocking",
890
886
"brute-force-attack-preventions" : [
891
887
{
892
888
"bruteForceProtectionForAllLoginPages" : false,
@@ -906,13 +902,71 @@ Example2: Different brute force configurations can be defined for individual log
906
902
"method": "*",
907
903
"name": "/html_login",
908
904
"protocol": "http"
909
-
}
905
+
}
910
906
}
911
-
],
907
+
]
908
+
```
912
909
913
-
}
910
+
The following example adds all three of the pieces for a complete example policy.
911
+
```json
912
+
{
913
+
"policy": {
914
+
"name": "BruteForcePolicy",
915
+
"template": {
916
+
"name": "POLICY_TEMPLATE_NGINX_BASE"
917
+
},
918
+
"applicationLanguage": "utf-8",
919
+
"enforcementMode": "blocking",
920
+
"urls": [
921
+
{
922
+
"method": "*",
923
+
"name": "/html_login",
924
+
"protocol": "http",
925
+
"type": "explicit"
926
+
}
927
+
],
928
+
"login-pages": [
929
+
{
930
+
"accessValidation": {
931
+
"responseContains": "Success"
932
+
},
933
+
"authenticationType": "form",
934
+
"url": {
935
+
"method": "*",
936
+
"name": "/html_login",
937
+
"protocol": "http",
938
+
"type": "explicit"
939
+
},
940
+
"usernameParameterName": "username",
941
+
"passwordParameterName": "password"
942
+
}
943
+
],
944
+
"brute-force-attack-preventions": [
945
+
{
946
+
"bruteForceProtectionForAllLoginPages": false,
947
+
"loginAttemptsFromTheSameIp": {
948
+
"action": "alarm",
949
+
"enabled": true,
950
+
"threshold": 20
951
+
},
952
+
"loginAttemptsFromTheSameUser": {
953
+
"action": "alarm",
954
+
"enabled": true,
955
+
"threshold": 3
956
+
},
957
+
"reEnableLoginAfter": 3600,
958
+
"sourceBasedProtectionDetectionPeriod": 3600,
959
+
"url": {
960
+
"method": "*",
961
+
"name": "/html_login",
962
+
"protocol": "http"
963
+
}
964
+
}
965
+
]
966
+
}
914
967
}
915
968
```
969
+
916
970
{{< 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