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
+77-25Lines changed: 77 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ When configuring NGINX App Protect WAF, `app_protect_enable` should always be en
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
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.
670
671
When brute force patterns are detected, the NGINX App Protect WAF policy either trigger an alarm or block the attack if the failed
671
672
login attempts reached a maximum threshold for a specific username or coming from a specific IP address.
672
-
To enable brute force protection, at least one login page must be created.
673
-
The login page entity is created separately and is not included in the brute force configuration block.
673
+
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.
674
674
675
675
---
676
+
### The User-Defined URL example
676
677
677
-
### Login page policy example
678
+
```json
679
+
"urls": [
680
+
{
681
+
"method": "*",
682
+
"name": "/html_login",
683
+
"protocol": "http",
684
+
"type": "explicit"
685
+
}
686
+
],
687
+
```
688
+
689
+
### Login pages example
678
690
679
691
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)
680
692
```json
@@ -699,18 +711,10 @@ A login page specifies the login URL that users must pass through to get authent
699
711
{{< 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 >}}
700
712
701
713
---
702
-
### Brute force policy example
714
+
### Brute force prevention example
703
715
704
716
Example1: A single brute force configuration is applied universally to all login pages.
705
717
```json
706
-
{
707
-
"policy": {
708
-
"name": "BruteForcePolicy",
709
-
"template": {
710
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
711
-
},
712
-
"applicationLanguage": "utf-8",
713
-
"enforcementMode": "blocking",
714
718
"brute-force-attack-preventions" : [
715
719
{
716
720
"bruteForceProtectionForAllLoginPages" : true,
@@ -728,21 +732,11 @@ Example1: A single brute force configuration is applied universally to all login
728
732
"sourceBasedProtectionDetectionPeriod" : 3600
729
733
}
730
734
]
731
-
}
732
-
}
733
735
```
734
736
735
737
Example2: Different brute force configurations can be defined for individual login pages,
736
738
with each configuration referencing a specific login page.
737
739
```json
738
-
{
739
-
"policy": {
740
-
"name": "BruteForcePolicySpec",
741
-
"template": {
742
-
"name": "POLICY_TEMPLATE_NGINX_BASE"
743
-
},
744
-
"applicationLanguage": "utf-8",
745
-
"enforcementMode": "blocking",
746
740
"brute-force-attack-preventions" : [
747
741
{
748
742
"bruteForceProtectionForAllLoginPages" : false,
@@ -762,14 +756,72 @@ Example2: Different brute force configurations can be defined for individual log
762
756
"method": "*",
763
757
"name": "/html_login",
764
758
"protocol": "http"
765
-
}
759
+
}
766
760
}
767
761
],
762
+
```
763
+
{{< 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 >}}
768
764
769
-
}
765
+
The following example adds all three of the pieces for a complete example policy.
766
+
767
+
```json
768
+
{
769
+
"policy": {
770
+
"name": "BruteForcePolicy",
771
+
"template": {
772
+
"name": "POLICY_TEMPLATE_NGINX_BASE"
773
+
},
774
+
"applicationLanguage": "utf-8",
775
+
"enforcementMode": "blocking",
776
+
"urls": [
777
+
{
778
+
"method": "*",
779
+
"name": "/html_login",
780
+
"protocol": "http",
781
+
"type": "explicit"
782
+
}
783
+
],
784
+
"login-pages": [
785
+
{
786
+
"accessValidation": {
787
+
"responseContains": "Success"
788
+
},
789
+
"authenticationType": "form",
790
+
"url": {
791
+
"method": "*",
792
+
"name": "/html_login",
793
+
"protocol": "http",
794
+
"type": "explicit"
795
+
},
796
+
"usernameParameterName": "username",
797
+
"passwordParameterName": "password"
798
+
}
799
+
],
800
+
"brute-force-attack-preventions": [
801
+
{
802
+
"bruteForceProtectionForAllLoginPages": false,
803
+
"loginAttemptsFromTheSameIp": {
804
+
"action": "alarm",
805
+
"enabled": true,
806
+
"threshold": 20
807
+
},
808
+
"loginAttemptsFromTheSameUser": {
809
+
"action": "alarm",
810
+
"enabled": true,
811
+
"threshold": 3
812
+
},
813
+
"reEnableLoginAfter": 3600,
814
+
"sourceBasedProtectionDetectionPeriod": 3600,
815
+
"url": {
816
+
"method": "*",
817
+
"name": "/html_login",
818
+
"protocol": "http"
819
+
}
820
+
}
821
+
]
822
+
}
770
823
}
771
824
```
772
-
{{< 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 >}}
0 commit comments