Skip to content

E2E gating test red: turn trafficprotectionpolicy-enforce-serves-traffic green #263

Description

@ecv

Summary

The E2E gating test chainsaw/trafficprotectionpolicy-enforce-serves-traffic (added in #245) went red on main — failing on every open PR, so the whole E2E Tests workflow was red across the board. This ticket tracks turning it green.

Update 2026-07-13 (post-#252). The E2E Tests run on the #252 merge commit (411d117c, run 29267425732) shows the gating test is still red, and #252 is not the unblock. The e2e runs in-cluster from the merged code with a pinned coraza image, so that run already contained #252 — yet:

The remaining blocker is #242 (core Enforce filter defect), now marked as a blocked_by dependency. #252 still matters for prod (stops tenant inverted-paranoia policies 500ing), but it is orthogonal to greening this e2e.

Failure signature

The downstream Gateway never reaches Programmed=True; Envoy rejects the Coraza WAF Enforce listener:

status.(conditions[?type == 'Programmed'])[0].status: Invalid value: "Unknown": Expected value: "True"
--- expected
-  - status: "True"
+status: {}

Two independent TPP-Enforce paths produced the same "500 / broken listener" family that reddens this test:

  1. Coraza filter defect (TrafficProtectionPolicy Enforce mode: 500 with truncated/empty body on all traffic #242) — the WAF Enforce filter breaks the listener, so the Gateway never programs (the current, remaining blocker).
  2. Inverted paranoia (TrafficProtectionPolicy: blocking paranoia level > detection triggers CRS 901500 → 100% of traffic gets HTTP 500 #250) — blocking paranoia level > detection level trips CRS rule 901500, fail-closed 500 at phase 1. Fixed and now guarded (below).

What's landed

NSO:

Edge coraza-waf (infra repo):

  • datum-cloud/infra#3319 — pin coraza-waf to v1.3.0-alpha8 — MERGED (e2e + staging now on v1.3.0-alpha10)
  • datum-cloud/infra#3324 — response-phase SendLocalReply(empty body) dropped by Envoy 1.37.x — CLOSED
  • datum-cloud/infra#3329 — nil-pointer panic in EncodeData (shadowed err) on response-phase block — CLOSED

e2e config:

  • coraza-waf pin in config/dev/downstream_resources/downstream-gateway.yaml:66 bumped v1.1.1-dev2v1.3.0-alpha10.

Remaining to turn green

Blocked by #242. Even with all of the above landed, run 411d117c proves the Enforce WAF listener still fails to program (status: {}). The coraza v1.3.0-alpha10 runtime fixes (#3324/#3329) addressed response-phase 500s but not this listener-programming failure.

  1. Resolve TrafficProtectionPolicy Enforce mode: 500 with truncated/empty body on all traffic #242 — the Gateway must reach Programmed=True with a WAF policy in Enforce.
  2. Re-run E2E Tests on main and confirm trafficprotectionpolicy-enforce-serves-traffic passes.

Acceptance criteria

  • E2E Tests workflow green on main
  • chainsaw/trafficprotectionpolicy-enforce-serves-traffic passes with the WAF in Enforce mode (Programmed=True on the downstream Gateway)
  • coraza-waf image pin in e2e config no longer v1.1.1-dev2 (now v1.3.0-alpha10)
  • inverted-paranoia guard verified in e2e (trafficprotectionpolicy-paranoia-validation PASS)

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions