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

Continued issue with Client basic HTTP auth as per #1699 #2610

Closed
Chanonry opened this issue Dec 15, 2017 · 18 comments
Closed

Continued issue with Client basic HTTP auth as per #1699 #2610

Chanonry opened this issue Dec 15, 2017 · 18 comments

Comments

@Chanonry
Copy link

Long story short

As before...

I was making calls with aiohttp client to a Companies House API (which requires basic HTTP authentication) and it works fine when I requested metadata but I request document download there is a redirect to amazon S3 and the request fails.

It appears that aiohttp passes authentication after redirection ?? This causes an issue as amazon requires that there should be only one auth method.

Error received includes - "Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified"

I've tested with the requests lib and it works fine for identical requests.

Expected behaviour

Only one auth mechanism should be used on the redirect

Actual behaviour

end response from S3 ends with an authentication error, not entirely sure why as #1699 should have fixed this ?

Steps to reproduce

Would need to have access to server redirecting to s3?

Your environment

macOS 10.12.6
python 3.5.4
aiohttp 2.3.6

@jtarang
Copy link

jtarang commented Jan 9, 2018

Can you show a example .. seems to me seems to me login is being passed. You might need to make a clientsession and add headers to it. If you need a example let me know .

@Chanonry
Copy link
Author

Chanonry commented Jan 9, 2018 via email

@jtarang
Copy link

jtarang commented Jan 10, 2018

Maybe I am going crazy but I dont see any code.

@Chanonry
Copy link
Author

Chanonry commented Jan 10, 2018 via email

@jtarang
Copy link

jtarang commented Jan 11, 2018

Nope don't see it . Unfortunately. Just paste it in a gist or just markdown.

@Chanonry
Copy link
Author

Chanonry commented Jan 11, 2018 via email

@Chanonry
Copy link
Author

Chanonry commented Jan 15, 2018 via email

@jtarang
Copy link

jtarang commented Jan 16, 2018

Nope . Just make a gist.

@Chanonry
Copy link
Author

Chanonry commented Jan 16, 2018 via email

@Chanonry
Copy link
Author

Chanonry commented Jan 17, 2018 via email

@jtarang
Copy link

jtarang commented Jan 18, 2018

I can't really test this as its just not complete. Do they have a test website or something? Test creds?

Constants:
requests: did you use your own auth class

If not that might be the issue there .

@Chanonry
Copy link
Author

Chanonry commented Jan 18, 2018 via email

@Chanonry
Copy link
Author

Chanonry commented Jan 18, 2018 via email

@Chanonry
Copy link
Author

Getting anywhere with this ???

@Chanonry Chanonry reopened this Jan 28, 2018
@asvetlov
Copy link
Member

The issue is on my radar. I'll try to find a time for fixing before aiogttp 3.0

@Chanonry
Copy link
Author

This get fixed in 3.0 ??

@zied2
Copy link

zied2 commented Dec 11, 2020

I got the same problem..
Same fix to be done as curl did ?
request/request#1184

@Dreamsorcerer
Copy link
Member

We drop auth headers when origin changes, so I assume this is fixed.

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

No branches or pull requests

5 participants