Fix: Limit grpcio version in flytekit-identity-aware-proxy due to regression#2156
Merged
Merged
Conversation
Signed-off-by: Fabio Grätz <fabiogratz@googlemail.com>
Signed-off-by: Fabio Grätz <fabiogratz@googlemail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2156 +/- ##
==========================================
+ Coverage 82.78% 84.56% +1.78%
==========================================
Files 313 313
Lines 23630 23630
Branches 3541 3541
==========================================
+ Hits 19561 19982 +421
+ Misses 3481 3024 -457
- Partials 588 624 +36 ☔ View full report in Codecov by Sentry. |
pingsutw
approved these changes
Feb 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
This only affects Flyte users who protect flyteadmin with GCP Identity Aware Proxy.
In this PR I limit the
grpcioversion required byflytekit-identity-aware-proxy.There is a regression in
grpciowhere a channel breaks if the server doesn't respond with the content-typeapplication/grpc.The same problem was fixed for the nginx ingress recently by including the
accept=application/grpcheader in requests to flyteadmin from flytekit (see #1841). (The grpc go client doesn't have this issue so flytectl is not affected.)When flyteadmin is protected with GCP Identity Aware Proxy, this
acceptheader doesn't help - unauthenticated requests still get atext/htmlresponse by the proxy.Lazy authentication works with
grpcio<1.55even if the first 401 response is of content typetext/html. I described the details in this issue in the grpcio repository. This issue is closed because the grpcio maintainers acknowledged the problem and reopened the original issue.For now, let's restrict the grpcio version users can use when protecting flyteadmin with GCP Identity Aware Proxy.
Prospect:
If this regression wouldn't be fixed in grpcio (despite the fact that the maintainers reopened the issue), the following would allow us to circumvent this problem for GCP Identity Aware Proxy Users:
When upgrading a channel to proxy authenticated, not use the
AuthUnaryInterceptorthat is also used for flytekit's normal authentication but introduce a new interceptor for proxy authentication.This new interceptor for proxy auth wouldn't do
but
This is my backup plan in case the regression persists.