Skip to content

Need support for AWS Signature V4 #31

@athomason

Description

@athomason

New AWS regions will no longer support the V2 signature protocol that is currently targeted by the library. So far this includes Beijing and Frankfurt for S3. This is the error currently being returned from those regions:

<Error><Code>InvalidRequest</Code><Message>The 
authorization mechanism you have provided is not supported. Please use 
AWS4-HMAC-SHA256.</Message>

To fix this, Signature Version 4 should be supported as well. All existing AWS regions support V4, but third-party implementations might not, so this should probably be optional, defaulting to the V2 behavior. Other libraries have done this by either hardcoding a mapping of region to desired version, or by falling back to V2 if V4 fails.

The change is unfortunately more complicated than just switching from SHA1 to SHA256 since the V4 signature requires the region name to be included. An API change will therefore be necessary to pass this value. #13 may be necessary/useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions