ext_authz: support for buffering request body#5824
Conversation
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
|
Please merge master to pick up #5827. |
Signed-off-by: Gabriel <gsagula@gmail.com>
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
source/extensions/filters/common/ext_authz/ext_authz_http_impl.cc
Outdated
Show resolved
Hide resolved
|
@lizan Thank you for looking at the PR. I had to work on some other things, but I will work on this by next week. |
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
Sorry, another busy week. I will take a look at this later today or Monday. |
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
|
@lizan I've addressed all your comments. Thanks for reviewing it. |
| const Buffer::Instance* buffer = sdfc->decodingBuffer(); | ||
| if (max_request_bytes > 0 && buffer != nullptr) { | ||
| const uint64_t len = std::min(buffer->length(), max_request_bytes); | ||
| std::unique_ptr<char[]> data(new char[len]); |
There was a problem hiding this comment.
I think I could use an std::string and then just move it. Not sure.
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
…fered_authz Signed-off-by: Gabriel <gsagula@gmail.com>
|
@gsagula Any update/ETA on this? Seems all comments were addressed. |
|
Same! I would love for this to be merged, am also waiting on it as it will help me a lot, trying to do HMAC in ext-authz :) |
…fered_authz Signed-off-by: Gabriel <gsagula@gmail.com>
lizan
left a comment
There was a problem hiding this comment.
sorry for the delay, one last question.
|
@lizan No worries, I've been pretty busy lately too. I found a couple of issues with the partial message feature, but I need to fix the broken tests now. I will try to get it out tomorrow. Thanks! |
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
…fered_authz Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
Signed-off-by: Gabriel <gsagula@gmail.com>
…fered_authz Signed-off-by: Gabriel <gsagula@gmail.com>
…fered_authz Signed-off-by: Gabriel <gsagula@gmail.com>
|
Build failures seem unrelated. I will merge master and retry. |
…fered_authz Signed-off-by: Gabriel <gsagula@gmail.com>
| buffer_data_ = config_->withRequestBody() && | ||
| !(end_stream || (method && isHeaderOnlyMethod(method->value().getStringView()))); | ||
|
|
||
| !(end_stream || Http::Utility::isWebSocketUpgradeRequest(headers) || |
There was a problem hiding this comment.
Do filters get upgrade requests? I roughly remember this is handled by HCM now? cc @alyssawilk
There was a problem hiding this comment.
Apparently, they do but would be nice to hear from @alyssawilk. If this is ok, the same logic ^^ should be applied to the buffer filter.
There was a problem hiding this comment.
Ah nvm I was in the old impression before we have new style websocket.
This PR adds support to
ext_authzfilter for buffering the request data. This is useful when the authorization server needs to check the request body, e.g. HMAC validation.Fixes #5676
Risk Level: low
Testing: unit
Docs Changes: yes
Release Notes: yes