Last active
August 29, 2015 14:17
-
-
Save thbar/8818a919fed3bf1bfc30 to your computer and use it in GitHub Desktop.
Production sanity test to verify that S3 buckets remain private over time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def buckets | |
[ | |
'myapp-production-backups', | |
'myapp-staging-backups', | |
'myapp-s3-logs' | |
] | |
end | |
def test_buckets_subdomain_private | |
buckets.each do |bucket_name| | |
subdomain_url = "http://#{bucket_name}.s3.amazonaws.com/" | |
assert_includes(`curl --silent --location #{subdomain_url}`, 'AccessDenied') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment