googleapis / googleapis/google-cloud-java

[java-storage-nio] Checking if a bucket requires requesterPays status should not require storage.bucket.get permissions.

Open
#12,556 0 comments 0 reactions 1 assignee Claimed by @JesseLovelace View on GitHub
api: storage priority: p2 type: feature request
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.