minio presigned get url 403 SignatureDoesNotMatch
Asked Answered
H

0

9

The presigned url (which's generated by my golang server side code) of getting object failed with 403 (SignatureDoesNotMatch), but the presigned url i got from minio browser (https:domain.com:9000/) works as expected (can download image from server)

This issue exists in my staging server, where have several services run by docker-compose: frontend, restful api, mysql and minio, they are run in isolated container.

Below is the docker-compose configuration for the minio service:

  minio:
    container_name: minio
    image: minio/minio:RELEASE.2019-06-11T00-44-33Z
    volumes:
      - "./.minio/data:/data"
    #      - "./.minio/conf/minio.cnf:/root/.minio"
    ports:
      - "9000:9000"
    restart: always
    environment:
      MINIO_ACCESS_KEY: W2SPAEGFUKISFTZ53EW2
      MINIO_SECRET_KEY: +uzhExt04MPooPa+j+PBijzC7HOdrpJHFaQK7PSG
      TZ: Asia/Shanghai
    command: server /data

When i access the presigned url (generated by my golang code) in browser, i got below error message, however, if i use the presigned url get from minio browser, it works (i can download the image i uploaded in minio server)

<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>
The request signature we calculated does not match the signature you provided. Check your key and signing method.
</Message>
<Key>1NVUCVJPLyS2okhlqtENB47bmFy.JPG</Key>
<BucketName>picture</BucketName>
<Resource>/picture/1NVUCVJPLyS2okhlqtENB47bmFy.JPG</Resource>
<RequestId>15ADED649D847B74</RequestId>
<HostId>4b5e8cee-8cc3-466c-8fda-441ac2ca0d79</HostId>
</Error>
Ho answered 3/7, 2019 at 15:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.