Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Request (request has multiple authentication types, please use one) with S3 presigned url #20475

Closed
jlefebvre1997 opened this issue Sep 23, 2024 · 0 comments

Comments

@jlefebvre1997
Copy link

It should be mentioned that I use minio with the docker image solely for local testing purpose

Expected Behavior

I expect the presigned url to allow me to upload a file to the specified s3

Current Behavior

I get the error mentioned in the title

Steps to Reproduce (for bugs)

Generate a presigned URL using the AWS S3 Client (in Javascript for example : https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_Scenario_PresignedUrl_section.html)
This will return a full presigned URL, try to upload a file using POST verb and FormData

This is the logs I get when running mc admin trace -v :

s3:9000 [REQUEST handler.Auth] [2024-09-23T13:07:22.055] [Client IP: 192.168.32.1]
s3:9000 POST /preprodstack-datauploads81d8eb70-vkd8jnbls7vu/pikachu_wave.gif?X-Amz-Expires=600&x-id=PutObject
s3:9000 Proto: HTTP/1.1
s3:9000 Host: s3:9000
s3:9000 Postman-Token: 2d90d6ae-a228-4a71-adc9-5a62c537cceb
s3:9000 User-Agent: PostmanRuntime/7.37.3
s3:9000 Accept: */*
s3:9000 Authorization: AWS4-HMAC-SHA256 Credential=minioadmin/20240923/eu-west-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=138dbc32b59fa3cdd25cdc4e51f999397ad69a780330db05931a7e78eca6b5c4
s3:9000 Cache-Control: no-cache
s3:9000 Connection: keep-alive
s3:9000 Content-Type: multipart/form-data; boundary=--------------------------244011726921730839689878
s3:9000 Accept-Encoding: gzip, deflate, br
s3:9000 Content-Length: 62395
s3:9000 X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
s3:9000 X-Amz-Date: 20240923T130722Z
s3:9000 <BLOB>
s3:9000 [RESPONSE] [2024-09-23T13:07:22.055] [ Duration 73µs TTFB 71.805µs ↑ 152 B  ↓ 379 B ]
s3:9000 400 Bad Request
s3:9000 Accept-Ranges: bytes
s3:9000 Server: MinIO
s3:9000 Strict-Transport-Security: max-age=31536000; includeSubDomains
s3:9000 Vary: Origin
s3:9000 Content-Length: 379
s3:9000 Content-Type: application/xml
s3:9000 X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
s3:9000 X-Amz-Request-Id: 17F7E16D636B3970
s3:9000 X-Content-Type-Options: nosniff
s3:9000 X-Xss-Protection: 1; mode=block
s3:9000 <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>Invalid Request (request has multiple authentication types, please use one)</Message><Resource>/preprodstack-datauploads81d8eb70-vkd8jnbls7vu/pikachu_wave.gif</Resource><RequestId>17F7E16D636B3970</RequestId><HostId>dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8</HostId></Error>
s3:9000

Context

I try to generate presigned URLs so the users of my application can upload files to S3 without putting additional weight on my API

Regression

I don't think so, I never used minio before

Your Environment

Version : RELEASE.2023-10-07T15-07-38Z
Server setup : docker image (quay.io/minio/minio:RELEASE.2023-10-07T15-07-38Z)

Thanks in advance for your help 🙏

@minio minio locked and limited conversation to collaborators Sep 23, 2024
@klauspost klauspost converted this issue into discussion #20476 Sep 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant