Skip to content
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

allow invalid auth header for presigned urls #680

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RunFMe
Copy link

@RunFMe RunFMe commented Aug 30, 2024

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.

@gaul
Copy link
Owner

gaul commented Aug 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants