Skip to content

Commit 158b464

Browse files
committed
fix: clarifications
1 parent 2d74801 commit 158b464

File tree

1 file changed

+124
-15
lines changed

1 file changed

+124
-15
lines changed

content/nap-waf/v5/admin-guide/policy-lifecycle-management.md

Lines changed: 124 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,9 @@ Policy Lifecycle Management is deployed as part of the NGINX App Protect Helm ch
4141

4242
### Policy Controller Configuration
4343

44-
#### Enable/Disable the Policy Controller
45-
46-
The Policy Controller option is enabled by default (`appprotect.policyController.enable: true`). Helm will also install the required custom resource definitions (CRDs) required by the policy controller pod.
47-
48-
**Important**: Before applying the Policy Controller, the required Custom Resource Definitions (CRDs) must be installed first. If the CRDs are not installed, the Policy Controller pod will fail to start and show CRD-related errors in the logs.
49-
50-
If you do not use the custom resources that require those CRDs (with `appprotect.policyController.enable` set to false), the installation of the CRDs can be skipped by specifying `--skip-crds` in your helm install command. Please also note that when upgrading helm charts, the current CRDs will need to be deleted and the new ones will be created as part of the helm install of the new version.
44+
#### Helm Configuration (values.yaml)
5145

52-
If you wish to pull security updates from the NGINX repository (with APSignatures CRD), you should set the `appprotect.nginxRepo` value in values.yaml file.
53-
54-
**Helm Configuration (values.yaml):**
46+
The following is the complete Helm configuration required for Policy Lifecycle Management. The Policy Controller option is enabled by default (`appprotect.policyController.enable: true`).
5547

5648
```yaml
5749
# Specify the target namespace for your deployment
@@ -313,7 +305,17 @@ appprotect:
313305
dockerConfigJson: ""
314306
```
315307
316-
**NGINX Configuration:**
308+
#### Enable/Disable the Policy Controller
309+
310+
The Policy Controller option is enabled by default (`appprotect.policyController.enable: true`). Helm will also install the required custom resource definitions (CRDs) required by the policy controller pod.
311+
312+
**Important**: Before applying the Policy Controller, the required Custom Resource Definitions (CRDs) must be installed first. If the CRDs are not installed, the Policy Controller pod will fail to start and show CRD-related errors in the logs.
313+
314+
If you do not use the custom resources that require those CRDs (with `appprotect.policyController.enable` set to false), the installation of the CRDs can be skipped by specifying `--skip-crds` in your helm install command. Please also note that when upgrading helm charts, the current CRDs will need to be deleted and the new ones will be created as part of the helm install of the new version.
315+
316+
If you wish to pull security updates from the NGINX repository (with APSignatures CRD), you should set the `appprotect.nginxRepo` value in values.yaml file.
317+
318+
#### NGINX Configuration
317319

318320
When Policy Controller is enabled in Helm, you must also enable it in your NGINX configuration using the `app_protect_default_config_source` directive:
319321

@@ -734,12 +736,119 @@ Check the status of your policy resources:
734736
```bash
735737
kubectl get appolicy -n <namespace>
736738
kubectl describe appolicy <policy-name> -n <namespace>
739+
kubectl get appolicy <policy-name> -n <namespace> -o yaml
740+
```
741+
742+
**Using kubectl describe for human-readable output:**
743+
744+
```bash
745+
kubectl describe appolicy dataguard-blocking -n <namespace>
746+
```
747+
748+
**Sample describe output:**
749+
```
750+
Name: dataguard-blocking
751+
Namespace: localenv-plm
752+
Labels: <none>
753+
Annotations: <none>
754+
API Version: appprotect.f5.com/v1
755+
Kind: APPolicy
756+
Metadata:
757+
Creation Timestamp: 2025-09-10T11:17:07Z
758+
Finalizers:
759+
appprotect.f5.com/finalizer
760+
Generation: 3
761+
# ... other metadata fields
762+
Spec:
763+
Policy:
764+
Application Language: utf-8
765+
Blocking - Settings:
766+
Violations:
767+
Alarm: true
768+
Block: true
769+
Name: VIOL_DATA_GUARD
770+
Data - Guard:
771+
Credit Card Numbers: true
772+
Enabled: true
773+
Enforcement Mode: ignore-urls-in-list
774+
# ... other policy settings
775+
Status:
776+
Bundle:
777+
Compiler Version: 11.553.0
778+
Location: /etc/app_protect/bundles/dataguard-blocking-policy/dataguard-blocking_policy20250914102339.tgz
779+
Signatures:
780+
Attack Signatures: 2025-09-03T08:36:25Z
781+
Bot Signatures: 2025-09-03T10:50:19Z
782+
Threat Campaigns: 2025-09-02T07:28:43Z
783+
State: ready
784+
Processing:
785+
Datetime: 2025-09-14T10:23:48Z
786+
Is Compiled: true
787+
Events: <none>
737788
```
738789
739-
The Policy Controller will show status information including:
740-
- Bundle location
741-
- Compilation status
742-
- Signature update timestamps
790+
**Using kubectl get for YAML output:**
791+
792+
```bash
793+
kubectl get appolicy dataguard-blocking -n <namespace> -o yaml
794+
```
795+
796+
**Sample YAML output:**
797+
798+
```yaml
799+
apiVersion: appprotect.f5.com/v1
800+
kind: APPolicy
801+
metadata:
802+
name: dataguard-blocking
803+
namespace: localenv-plm
804+
# ... other metadata fields
805+
spec:
806+
policy:
807+
# ... policy configuration
808+
status:
809+
bundle:
810+
compilerVersion: 11.553.0
811+
location: /etc/app_protect/bundles/dataguard-blocking-policy/dataguard-blocking_policy20250914102339.tgz
812+
signatures:
813+
attackSignatures: "2025-09-03T08:36:25Z"
814+
botSignatures: "2025-09-03T10:50:19Z"
815+
threatCampaigns: "2025-09-02T07:28:43Z"
816+
state: ready
817+
processing:
818+
datetime: "2025-09-14T10:23:48Z"
819+
isCompiled: true
820+
```
821+
822+
**Key Status Fields to Monitor:**
823+
824+
- **`Status.Bundle.State`**: Policy compilation state
825+
- `ready` - Policy successfully compiled and available
826+
- `processing` - Policy is being compiled
827+
- `error` - Compilation failed (check Policy Controller logs)
828+
829+
- **`Status.Bundle.Location`**: File path where the compiled policy bundle is stored
830+
831+
- **`Status.Bundle.Compiler Version`**: Version of the WAF compiler used for compilation
832+
833+
- **`Status.Bundle.Signatures`**: Timestamps showing when security signatures were last updated
834+
- `Attack Signatures` - Attack signature update timestamp
835+
- `Bot Signatures` - Bot signature update timestamp
836+
- `Threat Campaigns` - Threat campaign signature update timestamp
837+
838+
- **`Status.Processing.Is Compiled`**: Boolean indicating if compilation completed successfully
839+
840+
- **`Status.Processing.Datetime`**: Timestamp of the last compilation attempt
841+
842+
- **`Events`**: Shows any Kubernetes events related to the policy (usually none for successful policies)
843+
844+
- **`status.bundle.signatures`**: Timestamps showing when security signatures were last updated
845+
- `attackSignatures` - Attack signature update timestamp
846+
- `botSignatures` - Bot signature update timestamp
847+
- `threatCampaigns` - Threat campaign signature update timestamp
848+
849+
- **`status.processing.isCompiled`**: Boolean indicating if compilation completed successfully
850+
851+
- **`status.processing.datetime`**: Timestamp of the last compilation attempt
743852

744853
## Confirming Setup is Functioning
745854

0 commit comments

Comments
 (0)