-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add patch to aws-sdk-core to fix auth bug #432
Merged
blomquisg
merged 1 commit into
ManageIQ:master
from
NickLaMuro:monkey-patch-aws-sdk-core-for-proxy-auth-fix
Apr 17, 2018
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
44 changes: 44 additions & 0 deletions
44
lib/patches/aws-sdk-core/seahorse_client_net_http_pool_patch.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Autoload the connection pool | ||
Seahorse::Client::NetHttp::ConnectionPool | ||
|
||
module Seahorse | ||
module Client | ||
module NetHttp | ||
class ConnectionPool | ||
def start_session endpoint | ||
|
||
endpoint = URI.parse(endpoint) | ||
|
||
args = [] | ||
args << endpoint.host | ||
args << endpoint.port | ||
args << http_proxy.host | ||
args << http_proxy.port | ||
args << (http_proxy.user && CGI::unescape(http_proxy.user)) | ||
args << (http_proxy.password && CGI::unescape(http_proxy.password)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this makes sense, monkey patch the single method instead of bringing along 2 method changes from the PR. |
||
|
||
http = ExtendedSession.new(Net::HTTP.new(*args.compact)) | ||
http.set_debug_output(logger) if http_wire_trace? | ||
http.open_timeout = http_open_timeout | ||
|
||
if endpoint.scheme == 'https' | ||
http.use_ssl = true | ||
if ssl_verify_peer? | ||
http.verify_mode = OpenSSL::SSL::VERIFY_PEER | ||
http.ca_file = ssl_ca_bundle if ssl_ca_bundle | ||
http.ca_path = ssl_ca_directory if ssl_ca_directory | ||
http.cert_store = ssl_ca_store if ssl_ca_store | ||
else | ||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE | ||
end | ||
else | ||
http.use_ssl = false | ||
end | ||
|
||
http.start | ||
http | ||
end | ||
end | ||
end | ||
end | ||
end |
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.
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 believe you mentioned this yesterday but will put it here anyway. We probably want to gate this patch for the versions that are affected and when it's fixed so we can eventually remove it.
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.
Yeah, wanted to do this via tests, but I guess I can do it in the file as well. Is that what you were thinking?
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.
Yeah, we can do this when the gem is released if we remember
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.
Yeah, @blomquisg just #yolomerged before I even got a chance to make a change...
¯\_(ツ)_/¯