rgw: using aws4 auth with boto
Hi,
Some random notes on using aws4 signatures with boto S3 client.
.boto:
[Boto]
debug = 2
[s3]
use-sigv4 = True
With use-sigv4 enabled, I had issues with boto--what error you see may depend on the method used to create an S3Connection--use connect_s3 in my tests, and found I was able to run if I added an initializer for the class member self.region_name to the S#HmacAuthV4Handler ctor:
class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
"""
Implements a variant of Version 4 HMAC authorization specific to S3.
"""
capability = ['hmac-v4-s3']
def __init__(self, *args, **kwargs):
super(S3HmacAuthV4Handler, self).__init__(*args, **kwargs)
self.region_name = ""This was against a pip-installed boto.
Matt
Signature · 10 lines
Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-707-0660 fax. 734-769-8938 cel. 734-216-5309