Skip to content

Commit 9511b17

Browse files
authored
docs: document differing behavior of {get,list}{,default}Acl between HTTP and gRPC (#1820)
Update ITAccessTest to run UBLA and IAM centric tests for gRPC. Split iam v1 and iam v3 tests out from ITAccessTest to ITBucketIamPolicyTest making them hermetic.
1 parent 0665c24 commit 9511b17

File tree

3 files changed

+305
-399
lines changed

3 files changed

+305
-399
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java

+40
Original file line numberDiff line numberDiff line change
@@ -3363,6 +3363,16 @@ PostPolicyV4 generateSignedPostPolicyV4(
33633363
* Acl acl = storage.getAcl(bucketName, new User(userEmail), userProjectOption);
33643364
* }</pre>
33653365
*
3366+
* <h4>Behavioral Differences between HTTP and gRPC</h4>
3367+
*
3368+
* <ol>
3369+
* <li>Calling this method for a Bucket which has <a target="_blank" rel="noopener noreferrer"
3370+
* href="https://cloud.google.com/storage/docs/uniform-bucket-level-access">Uniform
3371+
* bucket-level access</a> enabled exhibits different behavior Depending on which {@link
3372+
* Transport} is used. For JSON, an HTTP 400 Bad Request error will be thrown. Whereas for
3373+
* gRPC, an empty list will be returned.
3374+
* </ol>
3375+
*
33663376
* @param bucket name of the bucket where the getAcl operation takes place
33673377
* @param entity ACL entity to fetch
33683378
* @param options extra parameters to apply to this operation
@@ -3496,6 +3506,16 @@ PostPolicyV4 generateSignedPostPolicyV4(
34963506
* }
34973507
* }</pre>
34983508
*
3509+
* <h4>Behavioral Differences between HTTP and gRPC</h4>
3510+
*
3511+
* <ol>
3512+
* <li>Calling this method for a Bucket which has <a target="_blank" rel="noopener noreferrer"
3513+
* href="https://cloud.google.com/storage/docs/uniform-bucket-level-access">Uniform
3514+
* bucket-level access</a> enabled exhibits different behavior Depending on which {@link
3515+
* Transport} is used. For JSON, an HTTP 400 Bad Request error will be thrown. Whereas for
3516+
* gRPC, an empty list will be returned.
3517+
* </ol>
3518+
*
34993519
* @param bucket the name of the bucket to list ACLs for
35003520
* @param options any number of BucketSourceOptions to apply to this operation
35013521
* @throws StorageException upon failure
@@ -3521,6 +3541,16 @@ PostPolicyV4 generateSignedPostPolicyV4(
35213541
* Acl acl = storage.getDefaultAcl(bucketName, User.ofAllAuthenticatedUsers());
35223542
* }</pre>
35233543
*
3544+
* <h4>Behavioral Differences between HTTP and gRPC</h4>
3545+
*
3546+
* <ol>
3547+
* <li>Calling this method for a Bucket which has <a target="_blank" rel="noopener noreferrer"
3548+
* href="https://cloud.google.com/storage/docs/uniform-bucket-level-access">Uniform
3549+
* bucket-level access</a> enabled exhibits different behavior Depending on which {@link
3550+
* Transport} is used. For JSON, an HTTP 400 Bad Request error will be thrown. Whereas for
3551+
* gRPC, an empty list will be returned.
3552+
* </ol>
3553+
*
35243554
* @throws StorageException upon failure
35253555
*/
35263556
@TransportCompatibility({Transport.HTTP, Transport.GRPC})
@@ -3604,6 +3634,16 @@ PostPolicyV4 generateSignedPostPolicyV4(
36043634
* }
36053635
* }</pre>
36063636
*
3637+
* <h4>Behavioral Differences between HTTP and gRPC</h4>
3638+
*
3639+
* <ol>
3640+
* <li>Calling this method for a Bucket which has <a target="_blank" rel="noopener noreferrer"
3641+
* href="https://cloud.google.com/storage/docs/uniform-bucket-level-access">Uniform
3642+
* bucket-level access</a> enabled exhibits different behavior Depending on which {@link
3643+
* Transport} is used. For JSON, an HTTP 400 Bad Request error will be thrown. Whereas for
3644+
* gRPC, an empty list will be returned.
3645+
* </ol>
3646+
*
36073647
* @throws StorageException upon failure
36083648
*/
36093649
@TransportCompatibility({Transport.HTTP, Transport.GRPC})

0 commit comments

Comments
 (0)