Skip to content

Commit d87d893

Browse files
authored
Update configuration.md v5
brute-force, login-pages improvement
1 parent ceef3f4 commit d87d893

File tree

1 file changed

+79
-25
lines changed

1 file changed

+79
-25
lines changed

content/nap-waf/v5/configuration-guide/configuration.md

Lines changed: 79 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ For more information on the NGINX App Protect WAF security features, see [NGINX
3838
|[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.|
3939
|[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.|
4040
|[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.|
4142

4243
### Disallowed File Types
4344

@@ -808,12 +809,25 @@ systematic, username/password combinations to discover legitimate authentication
808809
To prevent brute force attacks, NGINX App Protect WAF monitors IP addresses, usernames, and the number of failed login attempts beyond a maximum threshold.
809810
When brute force patterns are detected, the NGINX App Protect WAF policy either trigger an alarm or block the attack if the failed
810811
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+
813814

814815
---
815816

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
817831

818832
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)
819833
```json
@@ -839,18 +853,10 @@ A login page specifies the login URL that users must pass through to get authent
839853

840854
---
841855

842-
### Brute force policy example
856+
### Brute force prevention example
843857

844858
Example1: A single brute force configuration is applied universally to all login pages.
845859
```json
846-
{
847-
"policy": {
848-
"name": "BruteForcePolicy",
849-
"template": {
850-
"name": "POLICY_TEMPLATE_NGINX_BASE"
851-
},
852-
"applicationLanguage": "utf-8",
853-
"enforcementMode": "blocking",
854860
"brute-force-attack-preventions" : [
855861
{
856862
"bruteForceProtectionForAllLoginPages" : true,
@@ -868,21 +874,11 @@ Example1: A single brute force configuration is applied universally to all login
868874
"sourceBasedProtectionDetectionPeriod" : 3600
869875
}
870876
]
871-
}
872-
}
873877
```
874878

875879
Example2: Different brute force configurations can be defined for individual login pages,
876880
with each configuration referencing a specific login page.
877881
```json
878-
{
879-
"policy": {
880-
"name": "BruteForcePolicySpec",
881-
"template": {
882-
"name": "POLICY_TEMPLATE_NGINX_BASE"
883-
},
884-
"applicationLanguage": "utf-8",
885-
"enforcementMode": "blocking",
886882
"brute-force-attack-preventions" : [
887883
{
888884
"bruteForceProtectionForAllLoginPages" : false,
@@ -902,13 +898,71 @@ Example2: Different brute force configurations can be defined for individual log
902898
"method": "*",
903899
"name": "/html_login",
904900
"protocol": "http"
905-
}
901+
}
906902
}
907-
],
903+
]
904+
```
908905

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+
}
910963
}
911964
```
965+
912966
{{< 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 >}}
913967

914968
## Custom Dimensions Log Entries

0 commit comments

Comments
 (0)