8000 App Policy Bundle by jjngx · Pull Request #3560 · nginx/kubernetes-ingress · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deployments/common/crds/k8s.nginx.org_policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ spec:
description: WAF defines an WAF policy.
type: object
properties:
apBundle:
type: string
apPolicy:
type: string
enable:
Expand Down
2 changes: 2 additions & 0 deletions deployments/helm-chart/crds/k8s.nginx.org_policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ spec:
description: WAF defines an WAF policy.
type: object
properties:
apBundle:
type: string
apPolicy:
type: string
enable:
Expand Down
1 change: 1 addition & 0 deletions internal/configs/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (

const (
pemFileNameForWildcardTLSSecret = "/etc/nginx/secrets/wildcard" // #nosec G101
appProtectBundleFolder = "/etc/nginx/waf/bundles/"
appProtectPolicyFolder = "/etc/nginx/waf/nac-policies/"
appProtectLogConfFolder = "/etc/nginx/waf/nac-logconfs/"
appProtectUserSigFolder = "/etc/nginx/waf/nac-usersigs/"
Expand Down
1 change: 1 addition & 0 deletions internal/configs/version2/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ type OIDC struct {
type WAF struct {
Enable string
ApPolicy string
ApBundle string
ApSecurityLogEnable bool
ApLogConf []string
}
Expand Down
8 changes: 8 additions & 0 deletions internal/configs/version2/nginx-plus.virtualserver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ server {
app_protect_policy_file {{ .ApPolicy }};
{{ end }}

{{ if .ApBundle }}
app_protect_policy_file {{ .ApBundle }};
{{ end }}

{{ if .ApSecurityLogEnable }}
app_protect_security_log_enable on;
{{ range $logconf := .ApLogConf }}
Expand Down Expand Up @@ -429,6 +433,10 @@ server {
app_protect_policy_file {{ .ApPolicy }};
{{ end }}

{{ if .ApBundle }}
app_protect_policy_file {{ .ApBundle }};
{{ end }}

{{ if .ApSecurityLogEnable }}
app_protect_security_log_enable on;
{{ range $logconf := .ApLogConf }}
Expand Down
Loading
0