s3proxy icon indicating copy to clipboard operation
s3proxy copied to clipboard

allow invalid auth header for presigned urls

Open RunFMe opened this issue 1 year ago • 4 comments

I have a case where I upload files with presigned links and my requests already contain Authentication header for another application. The app is tested against regular s3, which ignores the header and parses info from presigned link. s3proxy only parses parameters from url if the Authentication header is not present. I suggest we change the behavior to mimick s3 better: we will will try to construct S3AuthorizationHeader from Auth header and if it fails or header is not present try to parse url parameters.

RunFMe avatar Aug 30 '24 09:08 RunFMe

Please address the Checkstyle and s3-tests failures:

======================================================================
FAIL: s3tests.functional.test_headers.test_object_create_bad_authorization_invalid_aws2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gaul/work/s3proxy/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 170, in runTest
    self.test(*self.arg)
  File "/home/gaul/work/s3proxy/s3-tests/s3tests/functional/test_headers.py", line 414, in test_object_create_bad_authorization_invalid_aws2
    eq(e.status, 400)
AssertionError: 403 != 400

======================================================================
FAIL: s3tests.functional.test_headers.test_bucket_create_bad_authorization_invalid_aws2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gaul/work/s3proxy/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 170, in runTest
    self.test(*self.arg)
  File "/home/gaul/work/s3proxy/s3-tests/s3tests/functional/test_headers.py", line 443, in test_bucket_create_bad_authorization_invalid_aws2
    eq(e.status, 400)
AssertionError: 403 != 400

gaul avatar Aug 31 '24 13:08 gaul

@RunFMe Can you fix the test failures as I suggested? I plan to run a release this weekend.

gaul avatar Jan 30 '25 17:01 gaul

@RunFMe could you finish this PR?

gaul avatar May 28 '25 01:05 gaul