Is there a way to get a list of public buckets on Google Cloud Storage?
I can't find anything on this subject in the docs: http://code.google.com/apis/storage/docs/gsmanager.html
Update: I recently saw a public google bucket containing patent documents. I was wondering if there is a publicly accessible list of public buckets.
You can list your own buckets but there is currently no way to get a list all (public or private) buckets. This is probably good for security. If you wanted to know if a particular bucket is available, you can always try creating it and seeing if it fails. Can you provide more details on your use case?
Related
I want to give a service account read-only access to every bucket in my project. What is the best practice for doing this?
The answers here suggest one of:
creating a custom IAM policy
assigning the Legacy Bucket Viewer role on each bucket
using ACLs to allow bucket.get access
None of these seem ideal to me because:
Giving read-only access seems too common a need to require a custom policy
Putting "Legacy" in the name makes it seem like this permission will be retired relatively soon and any new buckets will require modification
Google recommends IAM over ACL and any new buckets will require modification
Is there some way to avoid the bucket.get requirement and still access objects in the bucket? Or is there another method for providing access that I don't know about?
The closest pre-built role is Object Viewer. This allows listing and reading objects. It doesn't include storage.buckets.get permission, but this is not commonly needed - messing with bucket metadata is really an administrative function. It also doesn't include storage.buckets.list which is a bit more commonly needed but is still not part of normal usage patterns for GCS - generally when designing an app you have a fixed number of buckets for specific purposes, so listing is not useful.
If you really do want to give a service account bucket list and get permission, you will have to create a custom role on the project. This is pretty easy, you can do it with:
gcloud iam roles create StorageViewerLister --project=$YOUR_POJECT --permissions=storage.objects.get,storage.objects.list,storage.buckets.get,storage.buckets.list
gcloud projects add-iam-policy-binding $YOUR_PROJECT --member=$YOUR_SERVICE_ACCOUNT --role=StorageViewerLister
If I upload some files into a Google Cloud Storage bucket and made them public does Google index them in search results?
Google's search index is independent of Google Cloud Storage (GCS). Making a file public in GCS does not automatically index it in Google's search results.
So, public files in GCS will not automatically be indexed by Google.
Can Google cloud storage be used in such an application without a proper http server (Traditional LAMP stack, GAE, etc.)?
If you're having a hard time wrapping your head around "static data powered application", think of it like a blog where you can only read the blog posts (i.e. no likes,comments or any kind of interaction) and which is managed by only one person who updates, adds or removes those blog posts.
The main concerns that I have are :
Read-only access from JavaScript at client side
Prevention against abuse (Does google automatically detect and ban an IP when it sends too many requests, so that the IP can't abuse bandwidth?)
I did some basic digging around the docs, but couldn't find the answer to these, possibly because not many have tried this, I guess.
The access question is already answered by Paul. You can add "read" permission to all users for your object. If you want to do so for all objects in a bucket, you can also set the default object ACL for the bucket to contain such permission.
Google does have abuse protection, but it's not designed for a specific service or resource, and the bar is pretty high given Google's global scale, so it probably won't help your specific use case.
Unfortunately you cannot set a maximum daily spending yet. The Google cloud platform team is always working on new features to help customers solve these issues, but I cannot comment on specific feature or timeline.
If a file is placed into Google Cloud storage and made public, but a URL to the file does not exist on another webpage, does Google index it in its search results anyway? Anyone know?
Google's search index is independent of its cloud storage. Making a file public in cloud storage does not automatically index it in Google's search results.
However, asking this question leads me to believe that you're probably wondering if it's okay to make a file public and be reasonably sure that the file is not accessible to anyone. If the files are of any sensitive nature to you or your users, this is not the right solution.
If you're using GCS on a website and want to serve files securely, you might want to try the Signed URLs option. If it's just about being indexed, you could add a robots.txt file to the root of your bucket that excludes the file from being indexed.
If you have a public file in Google's cloud storage, the URL to that file would have to be indexed, otherwise the servers would have no way of finding it.
The same thing happens with Google Drive. A public URL is still indexed, and is still available within the server's lookup tables, even if a hard link doesn't exist anywhere on the web.
Is is possible to querying Amazon for items. Regarding their prices, discounts, category etc?
If yes then how can we access it and get results on iphone.
Any help would be appreciated.
Possibly you're looking for Amazon Web Services, specifically the Amazon Associates Web Service (A2S)? According to the wiki article you can use it to browse their catalog and retrieve product information etc etc.
You need the Product Advertising API
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/
Use the ItemLookup operation to find the item in question. Depending on what ResponseGroup you choose, you can get just about every piece of information about a product.