Allow supported default hosts to use sigv4
Author: kzarCreated Jun 30, 2015Updated Sep 3, 2023
Labelss3bugauth
Currently there is no way to use sigv4 unless the host parameter is passed to S3Connection. This means there is no way to use sigv4 without modifying the calling code.
To use deja-dup with the Frankfurt region I can specify that sigv4 should be used and that the host is s3.eu-central-1.amazonaws.com in my ~/.boto file. Unfortunately though the HostRequiredError exception is still thrown. The logic needs to be modified tofirst check if the default host supports sigv4 before throwing the exception HostRequiredError.
To reproduce put something like this in your ~/.boto file and then attempt to use deja-dup with a bucket in the Frankfurt region:
[s3]
host = s3.eu-central-1.amazonaws.com
use-sigv4 = TrueSource: boto/boto