Skip to content

Full logging, masking and the traffic log ​

Problems with event and traffic records, the values they keep, masking for viewers and PCI, exports, and the traffic log.

Events disappear before their retention (pruned by size) ​

  • Symptom: old events are gone although retention has not passed. There are fewer events than max_events.
  • Cause: with full values, events are larger. The oldest are deleted when events exceed events.max_bytes (default 2 GiB).
  • Check: waap settings get events, and the size of the event database in the data directory.
  • Fix: raise max_bytes (up to 16 TiB), lower capture_body or an application's limits.request_body, or export what you need first with waap events export.

A viewer sees masked values ([REDACTED], ****, masked: role) ​

  • Symptom: a user sees masked snippets, cookies and tokens where an operator sees full values.
  • Cause: by design, the viewer role always reads values masked. Or the application uses policy.logging.mask: pci, which masks for everyone. The record then says masked: pci.
  • Check: waap apps get -app NAME (policy.logging.mask), and the user's role.
  • Fix: give the user the operator role if they must see values. Or change policy.logging.mask to off for an application that is not in PCI DSS scope. The change applies to new events only; stored events keep their masking.

A value ends with …[truncated: N bytes] ​

  • Symptom: a snippet, header or body in an event or traffic record is cut.
  • Cause: values are kept only up to what the WAF inspected: the body up to the application's limits.request_body, and a header up to limits.header_bytes. capture_body or the traffic body setting may be smaller, or an explicit events.capture_body (at most 64 KiB) applies. N is the full length.
  • Check: the capture's body_truncated, headers_truncated and headers_omitted fields, and a reason's truncated and full_bytes. Also waap settings get events and waap settings get traffic.
  • Fix: raise the application's limit (this also raises what is inspected). Clear events.capture_body and the traffic body setting so they follow the limit. Or accept the cut, which bounds the disk use.

SIEM messages carry cut values ​

  • Symptom: a SIEM message has a long path, snippet or body ending with …[truncated: N bytes].
  • Cause: a message over 64 KiB is sent with its long values cut and marked, so the collector accepts it. Only a message that is still too large is dropped (waap_siem_dropped_total).
  • Check: the full event with waap events show ID, and waap siem status.
  • Fix: read the full value from the event store or an export. Leave include_capture off unless the collector needs the request and trace.

An export is refused: "max must be 1 to 100000" ​

  • Symptom: waap events export or waap traffic export (or the UI button) answers 400.
  • Cause: -max or max is 0 or above 100000. The default is 10000.
  • Fix: export in slices with filters (-since, -until, -app), using at most -max 100000.

The username shows in full in events ​

  • Symptom: events of an application show the username, not its first character and a hash.
  • Cause: policy.logging.mask: off (the default) shows the username in full whenever session attribution is on. Under pci it is hashed. With attribution: off, no one is named.
  • Check: waap apps get -app NAME (for policy.logging.mask), and waap sessions get -app NAME.
  • Fix: set policy.logging.mask=pci, or run waap sessions set -app NAME attribution=off.

Traffic records are partial: missing: data_plane ​

  • Symptom: records have no upstream part (no pool member and no upstream times), partial: true, and waap_traffic_records_partial_total rises.
  • Cause: Envoy's access log half never reached the inspection service within 30 seconds. Possible reasons: the socket is not connected, Envoy was not given the log (the waap-access-log cluster is missing from its configuration), or Envoy and inspection run from different runtime directories.
  • Check: ls <runtime-dir>/access-log.sock. Check Envoy's clusters with curl --unix-socket <runtime-dir>/envoy-admin.sock http://x/clusters | grep waap-access-log. waap_xds_in_sync must be 1, and waap_traffic_joiner_entries should not stay high.
  • Fix: restart the node, so the socket and Envoy's configuration are created together. Make sure the control process and the inspection service share the runtime and data directories. missing: inspection on a record means a request matched no route, so Envoy answered it without inspection. That is expected.

waap_traffic_records_dropped_total rises ​

  • Symptom: the counter grows, and some requests have no traffic record.
  • Cause: the write queue was full, because the disk is too slow for the request rate, or a write failed. Requests are never delayed. Records are dropped.
  • Check: the node's log for traffic write errors. Check the free disk space and the disk speed of the data directory.
  • Fix: use mode: sample (or an application's policy.logging.traffic=sample), lower body, move the data directory to faster storage, or free disk space.

Events have no upstream part ​

  • Symptom: an event's flow lacks the pool member and timings. waap_events_upstream_dropped_total rises.
  • Cause: the data-plane half arrived, but its event was never stored (it was allowed without an event), the write queue was full, or the node is a high-availability peer. upstream is not copied between nodes, so an event received from the peer has none.
  • Check: the node named in the event, and waap_events_upstream_added_total against waap_events_upstream_dropped_total.
  • Fix: read the event on the node that inspected the request. SIEM messages usually omit upstream, because they are exported as soon as the event is stored.

traffic.db is large and does not shrink ​

  • Symptom: the file in the data directory stays large after retention deleted records.
  • Cause: SQLite reuses freed space instead of returning it to the system. Growth is bounded by traffic.max_bytes (default 5 GiB), max_records and retention.
  • Check: ls -l <data-dir>/traffic.db, and waap settings get traffic.
  • Fix: lower max_bytes, retention or body to bound the size. To return the space, stop the node and remove traffic.db. The history is lost, and the file is not included in backups.

The traffic log shows nothing (mode off or sampled) ​

  • Symptom: the Traffic log is empty, or it has only some requests.
  • Cause: traffic.mode is off, or sample (10 percent by default). The application may also override it with policy.logging.traffic. Records are kept per node, and the page shows the node you are connected to.
  • Check: waap settings get traffic, waap apps get -app NAME (policy.logging.traffic), and retention (default 7 days).
  • Fix: run waap settings set traffic mode=all, and waap apps set -app NAME policy.logging.traffic=inherit.