Cililing
Cililing

Reputation: 4753

Google Cloud Storage - ACL change during operation

I am wondering, what happens with GCS operation when ACL rules change during execution.

Let's consider such a flow:

client1 ---->   upload file  ---> file uploading...... ---> [????]
               read-write ACL             read-only ACL
                                                    
   
  adm-client ---> request ACL change ---> ACL changed
                     (read-only)

What happens then? Does the file upload will be successful or not? The case is that I would like to block uploading any files to the specified directory at a specified hour and I am wondering what will happen with operations that started right before ACL change.

Thanks for your support.

Upvotes: 0

Views: 89

Answers (1)

Farid Shumbar
Farid Shumbar

Reputation: 1420

Posting @JohnHanley's comment as the answer for visibility.

Object uploads are atomic. You cannot change the ACL for an object while it is uploading. Additionally, you cannot even see (list, delete, etc.) an object until the upload completes.

For example, if you create a rule like resource.name.startWith("project/bucket/20201010/12") and someone had access but the rule has changed during the upload, the upload will still complete.

Upvotes: 1

Related Questions