Isaac
Isaac

Reputation: 12874

AWS S3 object permission bugs?

I've uploaded a file onto S3, and enabled versioning on the bucket. Also made this file public accessible.

As we all know, when I upload the same file again, the old file will be replaced and the newer version of the same file will not be public accessible again.

This is true when we visit Object URL https://xxx.s3-ap-southeast-1.amazonaws.com/hello.txt, I will get the access denied screen.

However I also noticed there is a way to view the object, take a look at below image

enter image description here

I can simply double clicked on the "hello.txt" and immediately it will open a new page and I will be able to view the content of "hello.txt". Wondering if there is some misunderstanding from my side or this is indeed a flaw?

Upvotes: 0

Views: 39

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269550

Within the Amazon S3 console, there are two ways to access the object:

Anonymous URL

The URL that simply points to the object is "anonymous". This means that Amazon S3 does not know who is accessing the object. This request will only work if the object is public.

Example: https://xxx.s3-ap-southeast-1.amazonaws.com/hello.txt

Pre-Signed URL

If you click the Open button a pre-signed URL is generated. This URL includes a signature that grants temporary access to the object using your user credentials. If you have access to the object, then the link will work.

Cached data

It is also possible that your browser has cached the contents of a file from when it was previously accessed. To test this, try opening the URL in a different browser.

Upvotes: 2

Related Questions