Commit eef470f
authored
ext_authz: send local reply on failed response header mutations (#41844)
Commit Message: ext_authz: send local reply on failed response header
mutations
Additional Description:
Without this PR, the ext authz filter will silently (to the downstream
client) fail to add headers if it would violate the response header map
limits. This is bad because the app being proxied could rely on the
headers added by ext authz.
Instead it is better if the ext authz filter just sent a local reply the
same way ext_proc does. This way it will be clear that something went
wrong. If this behavior is undesirable, the filter can always be
configured with these check disabled.
Since we are now sending a local reply instead of an incomplete reply,
we can now do the simpler thing and just add headers and do a
post-check, which means we can also using the existing
headersWithinLimits function.
Risk Level: low
Testing: unit tested and integration tests updated
Docs Changes: config comments updated
Release Notes: changelog updated
---------
Signed-off-by: antoniovleonti <[email protected]>
Signed-off-by: Antonio V. Leonti <[email protected]>1 parent 89fe56f commit eef470f
File tree
7 files changed
+132
-241
lines changed- api/envoy/extensions/filters/http/ext_authz/v3
- changelogs
- docs/root/configuration/http/http_filters
- source/extensions/filters/http/ext_authz
- test/extensions/filters/http/ext_authz
7 files changed
+132
-241
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
| 327 | + | |
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | 491 | | |
493 | 492 | | |
494 | 493 | | |
495 | 494 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 495 | | |
501 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
502 | 501 | | |
503 | 502 | | |
504 | 503 | | |
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | 507 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | 508 | | |
517 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
518 | 514 | | |
519 | 515 | | |
520 | 516 | | |
521 | 517 | | |
522 | 518 | | |
523 | 519 | | |
524 | 520 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | 521 | | |
530 | 522 | | |
531 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
532 | 528 | | |
533 | 529 | | |
534 | 530 | | |
| |||
540 | 536 | | |
541 | 537 | | |
542 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | 547 | | |
554 | 548 | | |
555 | 549 | | |
| |||
1052 | 1046 | | |
1053 | 1047 | | |
1054 | 1048 | | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1055 | 1063 | | |
1056 | 1064 | | |
1057 | 1065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| 429 | + | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| |||
Lines changed: 3 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2131 | 2131 | | |
2132 | 2132 | | |
2133 | 2133 | | |
2134 | | - | |
2135 | | - | |
2136 | | - | |
2137 | | - | |
2138 | | - | |
2139 | | - | |
| 2134 | + | |
2140 | 2135 | | |
2141 | 2136 | | |
2142 | 2137 | | |
| |||
2180 | 2175 | | |
2181 | 2176 | | |
2182 | 2177 | | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
| 2178 | + | |
2193 | 2179 | | |
2194 | 2180 | | |
2195 | 2181 | | |
| |||
2231 | 2217 | | |
2232 | 2218 | | |
2233 | 2219 | | |
2234 | | - | |
2235 | | - | |
2236 | | - | |
2237 | | - | |
| 2220 | + | |
2238 | 2221 | | |
2239 | 2222 | | |
2240 | 2223 | | |
| |||
0 commit comments