Every so often we hear of unsecured S3 buckets and databases that are accessed and data is leaked. Today I was googling myself and came across an old document stored on S3 that has been indexed and appeared in the search results. This used to be a document published on a website; it is not published on said website any longer (it changes every year), but the old version not only is still stored in S3, but it also appears on search results.
I have never used S3 in a professional capacity (only played around with it as a hobby) - are files supposed to be searchable on Google, or is this a misconfiguration?
If you don’t want old versions to be accessible, then don’t grant public:read access to them. This document was originally indexed by Google when linked from the website, and only Google could tell you how to get it de-indexed. Removing access to the document will likely be the quickest way to get Google to remove it from their index.
Public buckets it’s a functionality.
Newer buckets are not too public by default, objects are allowed to be public if you set them. There’s a functionality to deny all public as well.
If something was public, and google saw it (it’s just another link, don’t care if it’s from s3 or not), google might/will index . Also a functionality.
If something is trulypublic but under a “private area” it could be indexed, that is the link it’s known to google, it happens all the time. Let’s say you get a public s3 url supposed to be just for you, you post in a forum - now it becomes public. That is somewhat a mis configuration, the s3 url should have a time period/special key to access (s3 provides that functionality) but that’s more of a problem of the software itself that didn’t create a protected link, not s3. For instance, you can get free old editions of books from the pearson/informit site itself, somehow they are indexed in google (you can get them for free too if you buy the last edition, and then register the book), if you know how to search and what keys they use, free books!
There are ways to scan for bucket names (searching a dns database) and then probing if they allow public reads and then running a list object) - thats also a functionality. I doubt google does that tbh, that’d be expensive.
Anyways, all you need to do is mark the buckets as private with acl to stop the behaviour, and double check you don’t have read (or write) permissions to everyone.
This might be pedantic but it sounds like your situation is one where S3 is configured correctly but not being used correctly!
The document was originally published on the website, but should have been pulled down later, yeah?
Since S3 is mainly being used as a public document repository, it makes sense that it’s set up to allow indexing. Documents that get unpublished should have an extra step that removes their permissions or moves them to an archive bucket