-
Notifications
You must be signed in to change notification settings - Fork 680
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
Fix: Prevent unintended use of proxy authorization when no command is provided #4217
Conversation
Signed-off-by: Fabio Graetz <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4217 +/- ##
===========================================
+ Coverage 59.04% 78.41% +19.36%
===========================================
Files 621 18 -603
Lines 53091 1297 -51794
===========================================
- Hits 31348 1017 -30331
+ Misses 19244 217 -19027
+ Partials 2499 63 -2436
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
actually can we make this
@@ -109,7 +109,7 @@ func setHTTPClientContext(ctx context.Context, cfg *Config, proxyCredentialsFutu | |||
transport.Proxy = http.ProxyURL(&cfg.HTTPProxyURL.URL) | |||
} | |||
|
|||
if cfg.ProxyCommand != nil { | |||
if len(cfg.ProxyCommand) > 0 { |
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.
if len(cfg.ProxyCommand) > 0 { | |
if cfg.ProxyCommand != nil && len(cfg.ProxyCommand) > 0 { |
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.
Signed-off-by: Fabio Graetz <[email protected]>
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.
I was able to build an image and verify this addressed the original problem. Thanks!
Thanks for verifying! |
Describe your changes
@andrewwdye noticed that the newly introduced proxy authorization in the admin client breaks propeller, see #4216 (comment).
I ran flytepropeller locally in a debugger (with the flyte-core helm chart deployed in the cluster and flyteadmin and datacatalog port-forwarded).
With the debugger, I confirmed that this if statement which adds proxy authorization is hit even if no proxy command is provided in the platform config.
The reason is that I check for
cfg.ProxyCommand != nil
but the default value of proxy command is empty string slice so it is nevernil
.With flytepropeller running locally in my IDE, I confirmed that:
Check all the applicable boxes