vrtmrz / obsidian-livesync

MIT License
3.92k stars 132 forks source link

MinIO Sync: The authorization mechanism you have used is not supported. Please use AWS4-HMAC-SHA256. #436

Open mindflowgo opened 1 month ago

mindflowgo commented 1 month ago

Just setup a min.io docker, created the key/secret from the admin panel.

Then I setup livesync to handle this. The [Test] works fine, it gets header stuff fine.

However when it's trying to actually engage the minio object store, it's returning this error: The authorization mechanism you have used is not supported. Please use AWS4-HMAC-SHA256.

Maybe we need to update the AWS v4 key signing plugin?

Abstract

AWS key signing appears to be out of date

Expected behaviour

Actually happened

Reproducing procedure

  1. Installed most recent minio docker on a server behind an nginx proxy;
  2. Installed most recent livesync.
  3. Configured minio with secret/key, added to livesync, and attempted sync
  4. In debug, I see the FETCH error message.

Network log

InvalidRequest The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. /personal/ 17D2D6E79DEC57A9dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
vrtmrz commented 2 days ago

Thank you for opening the issue! Usually, AWS4-HMAC-SHA256 should be used.

However, I saw the error once before, when I had sent an Authorization header by a Basic authorization. In Nginx, please try adding proxy_set_header Authorization ""; into your nginx.conf. (It remains unclear why Basic Authentication information is being sent, but if several applications are sharing the server and already sent for other applications, it may be that it is also sent automatically. This is a hunch, so sorry if it is off).