2

I have a Minio server set up and everything appears to be running normally.

For my CLI, I have this in my config.json:

    "myalias": {
        "url": "https://myurl",
        "accessKey": "myaccesskey",
        "secretKey": "mysecretkey",
        "api": "S3v4",
        "lookup": "auto",
        "Region": "us-east-1"
    }

But when I try to upload a file, I get this:

# mc cp test.txt myalias/stuff/
 0 B / 19 B [                                                       ]  0.00% 
mc: <ERROR> Failed to copy `test.txt`. The request signature we 
calculated does not match the signature you provided. Check your key and 
signing method.

If I change my api in config.json to this:

"api": "S3v2"

It works:

# mc cp test.txt myalias/stuff/
test.txt:    19 B / 19 B [==============================] 100.00% 193 B/s 0s

My question is, can I configure Minio to use version 4 signature verification instead of version 2? Isn't minio supposed to use version 4 by default?

RossD
  • 620
  • 2
  • 6
  • 13

3 Answers3

3

Turns out it was a problem with NGINX that our IT guys had set up. The problem and solution are outlined in these links:

https://github.com/minio/minio/issues/5298

https://docs.minio.io/docs/setup-nginx-proxy-with-minio

tl;dr:

After hours of research, I realized that I missed the Host directive on both reverse proxy configurations I had set.

For completeness, I missed those ones:

Nginx

location / {
    proxy_set_header Host            $host;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass http://minio;
}

Caddyfile

proxy / localhost:9898 {
      transparent
}
RossD
  • 620
  • 2
  • 6
  • 13
1

Can you post the version of your minio and mc? Minio should support both s3v4 and s3v2. Also is there anything different about your access key and secret key?

r1j1m1n1
  • 345
  • 1
  • 4
1

This might be stupid, but I ran into exactly this error and it turned out that my secret key was simply wrong.

I forgot that I did not use my default password here but rather the one configured as MINIO_ROOT_PASSWORD for the docker container.

cdauth
  • 6,171
  • 3
  • 41
  • 49
  • In my case, I put quotes around the password in the docker compose environment but the quotes needed to be typed when logging in, or more simply removed from the compose – Mitchell Currie Jul 24 '23 at 00:58