feat(storage): Support bucket encryption config#33452
feat(storage): Support bucket encryption config#33452shubhangi-google wants to merge 33 commits intogoogleapis:mainfrom
Conversation
Fix missing newline at end of file in bucket_encryption_test.rb
|
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
Removed an unnecessary blank line before the encryption configuration documentation.
Removed unnecessary comment line in bucket.rb
Removed unnecessary comment line in bucket.rb.
Removed unnecessary comment line in bucket.rb
Remove unnecessary line in encryption test setup.
Remove unnecessary line in encryption enforcement config test.
| cs_config = patch_obj.encryption.customer_supplied_encryption_enforcement_config | ||
| gm_config = patch_obj.encryption.google_managed_encryption_enforcement_config | ||
|
|
||
| name == bucket_name && |
There was a problem hiding this comment.
Why are we doing this?
There was a problem hiding this comment.
updated the mock expect method
|
Technical Update (for future reference ): Conditional "Effective Time" Behavior When Enabling Restrictions (Not Restricted → Fully Restricted): The API returns an effectiveTime. This is the server’s way of confirming exactly when the new security policy became active. When Disabling Restrictions (Fully Restricted → Not Restricted): The API omits the effectiveTime. Since the restriction has been removed, the field is no longer applicable and is stripped from the object hash. |
9c3f32e to
3b2dad5
Compare
This pull request significantly enhances the Google Cloud Storage client library by introducing comprehensive support for managing bucket encryption enforcement configurations. Users can now define and enforce default encryption behaviors for their buckets and files using customer-managed, customer-supplied, or Google-managed encryption keys. The changes provide robust API methods, update internal mechanisms for handling these configurations, and include practical examples and tests to ensure functionality and ease of use.
Highlights
Google::Cloud::Storage::Bucketfor managing customer-managed, customer-supplied, and Google-managed encryption enforcement configurations, including getters and setters forcustomer_managed_encryption_enforcement_config,customer_supplied_encryption_enforcement_config, andgoogle_managed_encryption_enforcement_config.update_bucket_encryption_enforcement_configmethod to handle updates for different types of bucket encryption enforcement configurations in a unified manner.patch_gapi!Method: Modified the internalpatch_gapi!method to accept an optionalbucket_encryption_configparameter, allowing more flexible patching of encryption-related attributes.ostruct,cgi, andirbgems to theGemfilefor samples, addressing gems removed from Ruby core that are required for testing.This Pr was created as old PR got corrupted - #32778, #32786