Skip to content

storage(feat): Support bucket encryption config#33452

Open
shubhangi-google wants to merge 18 commits intogoogleapis:mainfrom
shubhangi-google:support_bucket_encryption_config
Open

storage(feat): Support bucket encryption config#33452
shubhangi-google wants to merge 18 commits intogoogleapis:mainfrom
shubhangi-google:support_bucket_encryption_config

Conversation

@shubhangi-google
Copy link
Copy Markdown
Contributor

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

  • New Bucket Encryption Configuration Methods: Added new methods to Google::Cloud::Storage::Bucket for managing customer-managed, customer-supplied, and Google-managed encryption enforcement configurations, including getters and setters for customer_managed_encryption_enforcement_config, customer_supplied_encryption_enforcement_config, and google_managed_encryption_enforcement_config.
  • Unified Encryption Update Method: Introduced a new update_bucket_encryption_enforcement_config method to handle updates for different types of bucket encryption enforcement configurations in a unified manner.
  • Enhanced patch_gapi! Method: Modified the internal patch_gapi! method to accept an optional bucket_encryption_config parameter, allowing more flexible patching of encryption-related attributes.
  • New Samples and Acceptance Tests: Included new samples and corresponding acceptance tests to demonstrate how to get, set, update, and remove bucket encryption enforcement configurations.
  • Gemfile Updates: Added ostruct, cgi, and irb gems to the Gemfile for samples, addressing gems removed from Ruby core that are required for testing.

This Pr was created as old PR got corrupted - #32778, #32786

@shubhangi-google shubhangi-google marked this pull request as ready for review March 30, 2026 06:48
@shubhangi-google shubhangi-google requested review from a team and yoshi-approver as code owners March 30, 2026 06:48
@snippet-bot
Copy link
Copy Markdown

snippet-bot bot commented Mar 30, 2026

Here is the summary of changes.

You are about to add 3 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@cpriti-os cpriti-os added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 30, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 30, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants