-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-batch-reload
- Loading branch information
Showing
21 changed files
with
690 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: Policy | ||
metadata: | ||
name: waf-policy | ||
spec: | ||
waf: | ||
enable: true | ||
apBundle: "wafv5.tgz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server | ||
spec: | ||
host: virtual-server.example.com | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: "/backend1" | ||
action: | ||
pass: backend1 | ||
- path: "/backend2" | ||
action: | ||
pass: backend2 |
22 changes: 22 additions & 0 deletions
22
tests/data/ap-waf-v5/virtual-server-route-waf-subroute.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServerRoute | ||
metadata: | ||
name: backends | ||
spec: | ||
host: virtual-server-route.example.com | ||
upstreams: | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
- name: backend3 | ||
service: backend3-svc | ||
port: 80 | ||
subroutes: | ||
- path: "/backends/backend1" | ||
policies: | ||
- name: waf-policy | ||
action: | ||
pass: backend1 | ||
- path: "/backends/backend3" | ||
action: | ||
pass: backend3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server | ||
spec: | ||
host: virtual-server.example.com | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: "/backend1" | ||
policies: | ||
- name: waf-policy | ||
action: | ||
pass: backend1 | ||
- path: "/backend2" | ||
action: | ||
pass: backend2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server | ||
spec: | ||
host: virtual-server.example.com | ||
policies: | ||
- name: waf-policy | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: "/backend1" | ||
action: | ||
pass: backend1 | ||
- path: "/backend2" | ||
action: | ||
pass: backend2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"policy": { | ||
"name": "app_protect_api_security_policy", | ||
"description": "NGINX App Protect API Security Policy. The policy is intended to be used with an OpenAPI file", | ||
"template": { | ||
"name": "POLICY_TEMPLATE_NGINX_BASE" | ||
}, | ||
"open-api-files": [], | ||
"blocking-settings": { | ||
"violations": [ | ||
{ | ||
"block": true, | ||
"description": "Mandatory request body is missing", | ||
"name": "VIOL_MANDATORY_REQUEST_BODY" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal parameter location", | ||
"name": "VIOL_PARAMETER_LOCATION" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Mandatory parameter is missing", | ||
"name": "VIOL_MANDATORY_PARAMETER" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "JSON data does not comply with JSON schema", | ||
"name": "VIOL_JSON_SCHEMA" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal parameter array value", | ||
"name": "VIOL_PARAMETER_ARRAY_VALUE" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal Base64 value", | ||
"name": "VIOL_PARAMETER_VALUE_BASE64" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal request content type", | ||
"name": "VIOL_URL_CONTENT_TYPE" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal static parameter value", | ||
"name": "VIOL_PARAMETER_STATIC_VALUE" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal parameter value length", | ||
"name": "VIOL_PARAMETER_VALUE_LENGTH" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal parameter data type", | ||
"name": "VIOL_PARAMETER_DATA_TYPE" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal parameter numeric value", | ||
"name": "VIOL_PARAMETER_NUMERIC_VALUE" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Parameter value does not comply with regular expression", | ||
"name": "VIOL_PARAMETER_VALUE_REGEXP" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal URL", | ||
"name": "VIOL_URL" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal parameter", | ||
"name": "VIOL_PARAMETER" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal empty parameter value", | ||
"name": "VIOL_PARAMETER_EMPTY_VALUE" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal repeated parameter name", | ||
"name": "VIOL_PARAMETER_REPEATED" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal method", | ||
"name": "VIOL_METHOD" | ||
}, | ||
{ | ||
"block": true, | ||
"description": "Illegal gRPC method", | ||
"name": "VIOL_GRPC_METHOD" | ||
} | ||
] | ||
}, | ||
"xml-profiles": [ | ||
{ | ||
"name": "Default", | ||
"defenseAttributes": { | ||
"maximumNameLength": 1024 | ||
} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.