Skip to content
Latest (currently 2026.10.2) has the newest features, bug fixes, and CVE patches of Solo Enterprise for agentgateway.

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Debug WAF

Verified : Automated tests passed for: End-to-end run: Every step ran in a fresh test environment and the results were checked.
Page as Markdown

Explore options to troubleshoot WAFPolicy configurations to find out why requests are blocked unexpectedly, are not blocked when expected, and WAF-related 500 errors are returned.

Step 1: Inspect WAFPolicy status

Get the details of the WAFPolicy to verify whether the policy is accepted and attached to the correct HTTPRoute.

kubectl describe wafpolicy <name> -n <namespace>

Look for the following information:

  • status.conditions[type=Ready]:
    • True: The waf-server accepted the policy.
    • False: The policy compilation failed. Review the message field to find more details about the error.
  • status.ancestors: Confirm that the policy is attached to the expected EnterpriseAgentgatewayPolicy.

Invalid policies are handled fail-closed and cause 500 HTTP response errors on the affected route.

If the WAFPolicy is ready but matching requests return 500 responses, check the status of the EnterpriseAgentgatewayPolicy that applies WAF to your Gateway or route. When the controller cannot find the WAF server Service, the policy reports Accepted=True with reason: PartiallyValid and has no Attached condition. Requests fail closed until the Service exists.

kubectl get enterpriseagentgatewaypolicy <name> -n <namespace> -o yaml

Example output when the default WAF server Service is missing:

status:
  ancestors:
  - conditions:
    - type: Accepted
      status: "True"
      reason: PartiallyValid
      message: 'failed to translate WAF for agw-enterprise-policy/<namespace>/<name>:
        default WAF service agentgateway-system/waf-server-<gatewayclass> not found:
        unable to find the Service agentgateway-system/waf-server-<gatewayclass>'

To fix the error, check the WAF server reference in the policy:

  • No wafServerRef: The policy uses the default waf-server-<gatewayclass> Service in the agentgateway-system namespace. The controller creates this Service only when the EnterpriseAgentgatewayParameters that the GatewayClass references sets spec.sharedExtensions.waf.enabled: true. For more information, see Enable WAF.
  • wafServerRef is set: Make sure that the Service in the reference exists. The message field contains invalid wafServerRef and names the reference that the controller cannot resolve.

Step 2: Inspect waf-server logs

Use these logs for policy sync errors, rule compilation failures, and blocked-request details.

kubectl logs deploy/waf-server-enterprise-agentgateway -n agentgateway-system

You can optionally increase the log verbosity to get more detailed logs by setting logLevel: debug in the EnterpriseAgentgatewayParameters resource as shown in the following example configuration.

kubectl apply -f- <<EOF
apiVersion: enterpriseagentgateway.solo.io/v1alpha1
kind: EnterpriseAgentgatewayParameters
metadata:
  name: enterprise-agentgateway-params
  namespace: agentgateway-system
spec:
  sharedExtensions:
    waf:
      enabled: true
      logLevel: debug
EOF

Step 3: Inspect controller logs

Inspect the Solo Enterprise for agentgateway controller logs when the WAFPolicy does not seem to take effect. Common issues include a missing or unresolved wafPolicyRef.

kubectl logs deploy/enterprise-agentgateway -n agentgateway-system

Step 4: Enable waf-server pprof

If you experience performance-related issues with your waf-server, such as unexpected CPU and memory consumption or slow requests, you can use the profiling tools that are built into Go. These tools look at runtime data, such as CPU and memory allocation, goroutine stacks, and execution traces.

  1. Enable the WAF admin server.

    kubectl apply -f- <<EOF
    apiVersion: enterpriseagentgateway.solo.io/v1alpha1
    kind: EnterpriseAgentgatewayParameters
    metadata:
      name: enterprise-agentgateway-params
      namespace: agentgateway-system
    spec:
      sharedExtensions:
        waf:
          enabled: true
          admin:
            enabled: true
    EOF
  2. Port-forward to the waf-server pod on port 9095.

    kubectl port-forward -n agentgateway-system deploy/waf-server-enterprise-agentgateway 9095:9095
  3. Choose between the following endpoints to capture your profile.

    http://127.0.0.1:9095/debug/pprof/
    http://127.0.0.1:9095/debug/pprof/profile
    http://127.0.0.1:9095/debug/pprof/trace
  4. Use Go profiling tools to analyze your output.

    go tool pprof