Skip to content

feat(storage): add support for encryption enforcement configurations#8937

Open
thiyaguk09 wants to merge 3 commits intogoogleapis:mainfrom
thiyaguk09:feat/bucket-encryption-config
Open

feat(storage): add support for encryption enforcement configurations#8937
thiyaguk09 wants to merge 3 commits intogoogleapis:mainfrom
thiyaguk09:feat/bucket-encryption-config

Conversation

@thiyaguk09
Copy link
Contributor

This pull request enhances Google Cloud Storage bucket capabilities by introducing support for encryption enforcement configurations. It allows users to define and manage policies for Google-managed, customer-managed (KMS), and customer-supplied encryption keys, ensuring that objects stored in a bucket adhere to specified encryption requirements. The changes include updates to the API definitions, client libraries, and comprehensive test coverage to validate the new functionality.

Highlights

  • New Encryption Enforcement Configurations: Added metadata support for customerManagedEncryptionEnforcementConfig and customerSuppliedEncryptionEnforcementConfig to the Bucket resource, allowing for stricter control over encryption policies.
  • Unit Test Coverage: Included unit tests in BucketTest and StorageClientTest to verify the correct mapping and handling of the new encryption enforcement metadata.
  • System Test Validation: Implemented system tests in KmsTest to validate FullyRestricted enforcement and ensure proper 412 error handling when encryption policies are violated.

@thiyaguk09 thiyaguk09 requested review from a team as code owners February 20, 2026 17:42
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Feb 20, 2026
Copy link

@nidhiii-27 nidhiii-27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments for the docblocks and the protos. Rest all LGTM

Adds metadata support for `customerManagedEncryptionEnforcementConfig`
and `customerSuppliedEncryptionEnforcementConfig` to the Bucket
resource.

Includes:
- Unit tests in BucketTest and StorageClientTest for metadata mapping.
- System tests in KmsTest verifying FullyRestricted enforcement and 412
error handling.
Improving the robustness of the tests
@thiyaguk09 thiyaguk09 force-pushed the feat/bucket-encryption-config branch from 1c043e0 to d37c6d3 Compare March 11, 2026 08:29
@thiyaguk09
Copy link
Contributor Author

Added some comments for the docblocks and the protos. Rest all LGTM

@nidhiii-27 Thanks for the review! I’ve addressed your comments regarding the docblocks and protos to ensure the property types are explicitly defined. Everything should be ready for another look.

@thiyaguk09 thiyaguk09 requested a review from nidhiii-27 March 11, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants