Browse files

Switch elb/ec2 over to signature version 4

This matches the public documentation and other AWS SDKs, which
all use signature version 4 for these services.

Note that this is no longer a detect_potential_sigv4, we should be
using signature version 4 at all times for ec2/elb.

I've also updated an assertion method to not require that the
ignore_params_values actually exist in the request.  We made
a similar change in the AWS CLI a while back.  All we care about is
that we're not validating those params.  We don't actually care
if they're in the serialized params are not.
  • Loading branch information...
jamesls committed Dec 23, 2014
1 parent 5dfeba9 commit 32abe3e99961069912b5004e1507d40e785300ae
Showing with 6 additions and 8 deletions.
  1. +1 −2 boto/ec2/
  2. +1 −1 boto/ec2/elb/
  3. +4 −5 tests/unit/
@@ -104,9 +104,8 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
if api_version:
self.APIVersion = api_version

def _required_auth_capability(self):
return ['ec2']
return ['hmac-v4']

def get_params(self):
@@ -98,7 +98,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,

def _required_auth_capability(self):
return ['ec2']
return ['hmac-v4']

def build_list_params(self, params, items, label):
if isinstance(items, six.string_types):
@@ -63,11 +63,10 @@ def assert_request_parameters(self, params, ignore_params_values=None):
request_params = self.actual_request.params.copy()
if ignore_params_values is not None:
for param in ignore_params_values:
# We still want to check that the ignore_params_values params
# are in the request parameters, we just don't need to check
# their value.
self.assertIn(param, request_params)
del request_params[param]
del request_params[param]
except KeyError:
self.assertDictEqual(request_params, params)

def set_http_response(self, status_code, reason='', header=[], body=None):

0 comments on commit 32abe3e

Please sign in to comment.