ext_authz: respect keep_empty_value in HeaderValueOption#45103
ext_authz: respect keep_empty_value in HeaderValueOption#45103404SkillNotFound wants to merge 14 commits into
Conversation
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
|
Hi @404SkillNotFound, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
wbpcode
left a comment
There was a problem hiding this comment.
thanks for the contribution. This requires a test case to cover the new code.
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
|
Added test cases covering both branches, when keep_empty_value is false (header dropped) and when it's true (header kept). Let me know if anything else is needed! |
|
So even though this is a bugfix, it's also a behavior change, and needs to be protected by a runtime flag please. |
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
|
Done, guarded behind a runtime flag. |
wbpcode
left a comment
There was a problem hiding this comment.
LGTM overall with only single comment.
| // TODO(404SkillNotFound): Flip to true to enforce keep_empty_value in ext_authz by default. | ||
| FALSE_RUNTIME_GUARD(envoy_reloadable_features_ext_authz_respect_keep_empty_value); |
There was a problem hiding this comment.
The change is pretty safe and only affects the empty header value. I inclined you can use the normal runtime guard rather than the false runtime guard. Thanks.
There was a problem hiding this comment.
Done, switched to RUNTIME_GUARD. Also added a changelog entry.
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Signed-off-by: Shivang Upadhyay <shivang.upadhyay1@gmail.com>
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
…04SkillNotFound/envoy into fix/ext-authz-keep-empty-value Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
| HMAC secret validity. | ||
|
|
||
| - area: ext_authz | ||
| change: | |
There was a problem hiding this comment.
needs to use new changelog layout - see #45095
/wait
…ntry layout Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
…on timeouts Signed-off-by: 404SkillNotFound <shivang.upadhyay1@gmail.com>
Commit Message: ext_authz: respect keep_empty_value in HeaderValueOption
Additional Description:
ext_authz was ignoring the keep_empty_value field in HeaderValueOption
and blindly adding all headers from auth responses, including empty-valued
ones. Added a check in copyHeaderFieldIntoResponse and copyOkResponseMutations
to skip empty-valued headers when keep_empty_value is false (default).
Risk Level: low
Testing: CI
Docs Changes: none
Release Notes: added changelog entry for ext_authz keep_empty_value fix
I used AI to help navigate the codebase for this change. I own the change.
Fixes #45003