-
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
Add patch to aws-sdk-core to fix auth bug #432
Conversation
There is a bug with the aws-sdk that prevents the API from working properly when using a proxy, and the auth for the proxy includes a special character (like a question mark: '?'). This is described here: aws/aws-sdk-ruby#1760 Since the release of the fix is unknown, this currently monkey patches the fix to MIQ to allow it to work without it.
Checked commit NickLaMuro@14c78d7 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 lib/patches/aws-sdk-core/seahorse_client_net_http_pool_patch.rb
|
@@ -0,0 +1,44 @@ | |||
# Autoload the connection pool |
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...
¯\_(ツ)_/¯
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 comment
The 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.
@miq-bot add_label gaprindashvili/yes |
…-proxy-auth-fix Add patch to aws-sdk-core to fix auth bug (cherry picked from commit 2b2c87f) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1568467
Gaprindashvili backport details:
|
I did a little research into which aws versions are "fixed" We'll need to backport to any branches that rely on aws-sdk < v1.39.0 or > 1.66.0
|
@jrafanie Nice work! Though, that does assume that this code is exactly the same in those areas, so we might want to do a check on a case by case basis before we just blindly backport. This patch really does require checking that the original codebase for this is exactly the same. |
I will make a follow up PR to put in a |
We look to need this on euwe, fine, and gaprindashvili although to @NickLaMuro's point, the monkey patch might be different for the various versions of aws-sdk. I'll let @blomquisg decide what he wants to do with this information.
|
@jrafanie @blomquisg Added said PR: #433 |
There is a bug with the aws-sdk that prevents the API from working properly when using a proxy, and the auth for the proxy includes a special character (like a question mark:
?
). This is described here:aws/aws-sdk-ruby#1760
Since the release of the fix in
aws-sdk
is unknown, this currently monkey patches the fix to MIQ to allow it to work without it.TODO
Links
QA Steps
Add a proxy for
:ec2
in the advanced config. Make sure either the:user:
and/or:password:
has a special character in it (?
works for example):Create a new Amazon provider, and verify that the credentials work for it.
To test in the UI, this requires ManageIQ/manageiq#17218 and ManageIQ/manageiq-ui-classic#3693 as well.