Skip to content
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

sso_proxy: use ProxyFromEnvironment in http Transport #310

Conversation

saithejareddy
Copy link

Problem

As described in #305, the HTTP client used in sso_proxy doesn't allow for use of HTTP_PROXY environment variables -- meaning traffic can't be passed through a proxy if desired.

Solution

Make use of the http.ProxyFromEnvironment method, which allows for usage of these environment variables.
This is not added in http_client.go
https://github.com/buzzfeed/sso/blob/main/internal/proxy/providers/http_client.go#L11

@codecov
Copy link

codecov bot commented Jun 12, 2021

Codecov Report

Merging #310 (244da51) into jusshersmith-auth-ProxyFromEnvironment (63e450a) will increase coverage by 0.89%.
The diff coverage is 83.85%.

Impacted file tree graph

@@                            Coverage Diff                             @@
##           jusshersmith-auth-ProxyFromEnvironment     #310      +/-   ##
==========================================================================
+ Coverage                                   61.84%   62.73%   +0.89%     
==========================================================================
  Files                                          57       58       +1     
  Lines                                        4188     4286      +98     
==========================================================================
+ Hits                                         2590     2689      +99     
+ Misses                                       1388     1382       -6     
- Partials                                      210      215       +5     
Impacted Files Coverage Δ
internal/proxy/logging_handler.go 16.32% <0.00%> (ø)
internal/proxy/proxy.go 16.00% <0.00%> (-2.61%) ⬇️
internal/proxy/proxy_config.go 76.21% <ø> (ø)
internal/proxy/options.go 82.07% <85.00%> (-1.52%) ⬇️
internal/proxy/configuration.go 89.80% <89.80%> (ø)
internal/proxy/metrics.go 86.20% <100.00%> (ø)
internal/proxy/oauthproxy.go 54.26% <100.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63e450a...244da51. Read the comment docs.

@saithejareddy saithejareddy deleted the saitheja-ssoproxy-ProxyFromEnv branch June 12, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants