Skip to content

Return 503 from ext_authz on network failures#6148

Closed
hanyu-liu wants to merge 1 commit intoenvoyproxy:masterfrom
hanyu-liu:503_for_gRPC_network_issue
Closed

Return 503 from ext_authz on network failures#6148
hanyu-liu wants to merge 1 commit intoenvoyproxy:masterfrom
hanyu-liu:503_for_gRPC_network_issue

Conversation

@hanyu-liu
Copy link

Description: Return 503 from ext_authz on network failures

Risk Level: Low
Testing: CI
Docs Changes: n/a
Release Notes: n/a

Discussion thread: #6119

@hanyu-liu hanyu-liu force-pushed the 503_for_gRPC_network_issue branch 3 times, most recently from 5e403c4 to 854cf21 Compare March 1, 2019 22:07
@hanyu-liu hanyu-liu force-pushed the 503_for_gRPC_network_issue branch from 854cf21 to 4828588 Compare March 1, 2019 22:49
Return 503 from ext_authz on network failures

Risk Level: Low
Testing: CI
Docs Changes: n/a
Release Notes: n/a

envoyproxy#6119
Signed-off-by: Hanyu Liu <hanyu.liu@sendgrid.com>
@hanyu-liu hanyu-liu force-pushed the 503_for_gRPC_network_issue branch from 4828588 to 0c6097d Compare March 1, 2019 23:03
@dio
Copy link
Member

dio commented Mar 3, 2019

@hanyu-liu thanks for this, but I think you need to put this in the doc too? WDYT @gsagula?

@dio dio requested a review from gsagula March 3, 2019 14:20
@gsagula
Copy link
Member

gsagula commented Mar 3, 2019

@hanyu-liu Thanks for this contribution. It looks good overall.

Copy link
Member

@gsagula gsagula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor comment based on our conversation in GH issues.

Response response{};
response.status = CheckStatus::Error;
response.status_code = Http::Code::Forbidden;
response.status_code = Http::Code::ServiceUnavailable;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per our conversation in GH, please make ServiceUnavailable configurable and default it to false. This way we avoid breaking changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I thought you said it's okay to hard code 502 as the response :) Seems it's getting more complex than what I thought.

Any idea on the name of the configuration? Any guidance/docs on introducing new configs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I misread your last comment about hardcode the status. Unfortunatelly, we can't do that. I think something like status_code_on_error, and then let the user decide which status they want would be sufficient.
Normally, the filter config is done here:

Copy link
Author

@hanyu-liu hanyu-liu Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pointer. I searched for the code of "use_alpha" in "ext_authz" - seems a little bit complex. Do you mind working on top of the current change? I'm more than happy to code review your change. @gsagula

Copy link
Member

@gsagula gsagula Mar 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind doing it, but I can't promise when I will have time.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! We are blocked by this while integrating Envoy with our (Twilio) gateway. Your help is greatly appreciated!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsagula do you actually think an enum can work well for status_code_on_error? Don't want users to abuse the system by returning like 200, when the ext_authz is down.

@enbohm
Copy link

enbohm commented Mar 14, 2019

Does this only apply for gRPC authorization servers? I kind of have the same issue but for HTTP authorization servers, would really like to have a proper error code when auth. requests are failing and not a 403 (this issue/question is related to this #5974)

@hanyu-liu
Copy link
Author

Does this only apply for gRPC authorization servers? I kind of have the same issue but for HTTP authorization servers, would really like to have a proper error code when auth. requests are failing and not a 403 (this issue/question is related to this #5974)

This fix only applies to gRPC. But I can see the same issue for http.

@gsagula
Copy link
Member

gsagula commented Mar 15, 2019

@dio It seems that the contributor is not able to finish the PR. I'm not sure what is the procedure here. I can look into this issue when I finish some other Datawire priorities, but it's hard to tell when.

@stale
Copy link

stale bot commented Mar 22, 2019

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!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Mar 22, 2019
@hanyu-liu
Copy link
Author

@dio @gsagula any updates on it?

@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Mar 26, 2019
@stale
Copy link

stale bot commented Apr 2, 2019

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!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Apr 2, 2019
@stale
Copy link

stale bot commented Apr 9, 2019

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants