Checking if a bucket requires requesterPays status should not require storage.bucket.get permissions. #833
Labels
api: storage
Issues related to the googleapis/java-storage-nio API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
In order to check if a a bucket is configured as requester pays the account accessing the bucket needs to have
storage.buckets.get
access to the bucket. This is problematic if you don't own the bucket, which makes it less useful to try to access buckets that require requester pays.Describe the solution you'd like
It's possible to discover if a bucket is request pays by making an attempt to access it and failing rather than performing a bucket.get() query. We should do that instead. That's actually what happens currently in the case that the user DOES have storage.bucket.get access to to the bucket, so the requirement is essentially pointless.
Describe alternatives you've considered
Adding an API method to get this information without requiring anyone to have a billing request would be ideal but probably out of scope for this project. It's possible to work around this issue right now by always providing a billing project in your queries, but this is incurs additional expenses for the user which would have been covered by the bucket owners in non requester pays buckets.
The text was updated successfully, but these errors were encountered: