googleapis / googleapis/google-cloud-java
[java-storage-nio] Checking if a bucket requires requesterPays status should not require storage.bucket.get permissions.
- Lingua principale
- Java
- Stelle
- 2.1k
- Fork
- 1.2k
- Merge medio
- 1g 23h
- PR unite (30g)
- 154
Descrizione
**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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.