Using OBS Bucket Keys to Reduce SSE-KMS Costs
When you use SSE-KMS to encrypt a large number of objects, OBS must request KMS to derive a data encryption key (DEK) for each object. This results in high request volume, increased latency, and heavy traffic to KMS. By caching bucket keys in OBS and limiting their validity period, OBS reduces its interactions with KMS. This lowers KMS traffic for encryption and decryption operations, thereby reducing costs and improving performance.
Bucket Key Principles
As shown in this figure, a bucket key works as follows:
- KMS generates a bucket key with a short validity period. The default rotation period is 365 days. You can configure this period by setting the BucketKeyRotationPeriod parameter in the API that configures encryption for a bucket.
- OBS stores the bucket key in its own cache for about 3 minutes.
- OBS uses the cached bucket key to derive DEKs for encrypting and decrypting objects, without sending requests to KMS. During encryption and decryption, KMS manages the CMK and the bucket key, while OBS caches the bucket key and stores and manages the derived DEKs.
Constraints
- Currently, cross-region replication does not support bucket keys.
- To secure data, each requester obtains a unique bucket-level key from KMS at least once to ensure that KMS can check whether the requester has access to the key. OBS treats callers as different requesters when they use different IAM users or the same IAM user with different permissions.
- To configure a bucket key for an existing object that does not use the bucket key, you need to re-upload or copy the object and enable the bucket key at the object level in the upload or copy request.
Billing
If you use SSE-KMS, you will be billed for using keys. For details, see KMS Billing Items.
Bucket-Level and Object-Level Bucket Keys
OBS supports bucket-level and object-level bucket keys. Objects can inherit the encryption settings from their bucket, or you can separately configure encryption for objects. For details, see Figure 2. In an OBS request, if x-obs-server-side-encryption-bucket-key-enabled is set to true, the bucket key is enabled; if this header is set to false, the bucket key is disabled.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
