Ticket #3470 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Extfs s3+ plugin throws "Please use AWS4-HMAC-SHA256" error

Reported by: dmitry_koterov Owned by: andrew_b
Priority: major Milestone: 4.8.15
Component: mc-vfs Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

AWS is switching to V4 authentication method, some regions (e.g. in Frankfurt) do not work with previous versions anymore. And even more: when we switch to V4, we have to specify hostnames to connect everywhere in API, so if you have buckets in different regions at the same time, s3+ fails.

So I fixed these issues and submitted a pull request:
https://github.com/MidnightCommander/mc/pull/62

  • Resolve "Please use AWS4-HMAC-SHA256" error: enforce the new V4 authentication method. It is required in many (if not all) locations nowadays.
  • Now s3+ works with buckets in different regions: locations are auto-detected.
  • Debug level specification support (MCVFS_EXTFS_S3_DEBUGLEVEL).

I'd be happy if you apply it. I'm ready to make changes in the plugin too if you have questions/remarks.

Change History

comment:1 Changed 10 years ago by dmitry_koterov

...BTW steps to test the patch:

  1. Log in to S3 Management Console in your browser.
  2. Create one bucket in an US location.
  3. Create one more bucket in Frankfurt.
  4. Test how everything looks like when my patch is NOT applied:

export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."

in a shell window, then run mc and type:

cd s3://

You'll see a big red window full of exceptions and other mess.

  1. Apply the patch, then run

cd s3://

Enjoy! :-)

comment:2 Changed 10 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.15

comment:3 Changed 10 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset set to committed-master
  • Resolution set to fixed
  • Branch state changed from on review to merged

comment:4 Changed 10 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.