-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Policy:3scale_batcher: Fix issues when caching policy is active. #1216
Conversation
t/apicast-policy-3scale-batcher.t
Outdated
@@ -615,3 +615,79 @@ my $jwt = encode_jwt(payload => { | |||
["Authorization: Bearer $jwt", "Authorization: Bearer $jwt", "" , ""] | |||
--- no_error_log | |||
[error] | |||
|
|||
|
|||
=== TEST 6: with caching policy (allow mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong test number.
t/apicast-policy-3scale-batcher.t
Outdated
In this case, the caching policy is configured as "allow". We define a | ||
backend that returns 500 | ||
The caching policy will allow all request to the Upstream API. | ||
down. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this line is misplaced.
@@ -143,6 +143,14 @@ local function handle_backend_denied(self, service, transaction, status, headers | |||
return error(service, rejection_reason) | |||
end | |||
|
|||
local function handle_backend_response_using_cache_handler(cache, transaction, backend_status, cache_handler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost the same as the existing update_downtime_cache
function.
66d7665
to
79c9627
Compare
A user reported that when the caching mode is enabled, in allow mode, and 3scale-batcher is active, the handler for allowing all calls is no working as expected, and users got 403 response. This commit allows users to get a correct authz when allow mode is enabled. Fix THREESCALE-5753 Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
79c9627
to
4511ed3
Compare
A user reported that when the caching mode is enabled, in allow mode, and 3scale-batcher is active, the handler for allowing all calls is no working as expected, and users got 403 response.
This commit allows users to get a correct authz when allow mode is enabled.
Fix THREESCALE-5753
Signed-off-by: Eloy Coto eloy.coto@acalustra.com