'Test signature validation with the access/secret provided.'

def _validate_signature(self, access, secret):

    signer = ec2_utils.Ec2Signer(secret)
    params = {'SignatureMethod': 'HmacSHA256', 'SignatureVersion': '2', 'AWSAccessKeyId': access}
    request = {'host': 'foo', 'verb': 'GET', 'path': '/bar', 'params': params}
    signature = signer.generate(request)
    sig_ref = {'access': access, 'signature': signature, 'host': 'foo', 'verb': 'GET', 'path': '/bar', 'params': params}
    r = self.post('/ec2tokens', body={'ec2Credentials': sig_ref}, expected_status=http_client.OK)
    self.assertValidTokenResponse(r)
