I am trying to access files that are stored in AWS S3 that that are protected via basic http authN. If I attempt to access a file directly through a browser, I get challenged with a username and password. This is solid and works great. What I wish to do is link to these files via a session controlled app so that users are presented with download links. These links resolve because the app passes or answers the http authN challenge via passing headers, at least this is how I think it’s supposed to be done. Using tools like Fiddler, I can compose my “Authorization” header as follows: “Authorization: Basic [base 64 encode of the username:password]” and issue a get request. So, it looks something like this “Authorization: Basic dXNlcjpwYXNzd29yZA==”

I can’t get it to work. I get 401 rejects. Can someone knowledgeable on this provide any pointers? Here’s a sketch I made to help explain my setup.

Post image

Source link

Write A Comment