[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThis guide outlines the process for managing encrypted storage buckets in Google Distributed Cloud (GDC) air-gapped environments, requiring a project and appropriate bucket permissions to begin.\u003c/p\u003e\n"],["\u003cp\u003eBuckets using \u003ccode\u003ev2\u003c/code\u003e encryption rely on a \u003ccode\u003ekekRef\u003c/code\u003e secret to reference active default AEADKeys, with AEADKeys including both active and archived keys, where archived keys are inactive due to the deletion of old secrets.\u003c/p\u003e\n"],["\u003cp\u003eAs a security best practice, users should refresh their bucket's default AEADKeys after around 42 billion object writes by deleting the \u003ccode\u003ekekRef\u003c/code\u003e secret, which will automatically create a new one and mark the previous AEADKeys as deactivated.\u003c/p\u003e\n"],["\u003cp\u003eIf an AEADKey becomes compromised, you should refresh the active default keys to generate new ones, then download and re-upload all objects in the bucket to use the new keys, while previous keys are not destroyed, allowing decryption of older objects.\u003c/p\u003e\n"],["\u003cp\u003eAfter you re-upload all objects in your bucket, you can identify and delete deactivated AEADKeys.\u003c/p\u003e\n"]]],[],null,["# Manage Encryption Resources\n\nThis page shows you how to manage encrypted Google Distributed Cloud (GDC) air-gapped storage buckets.\n\nBefore you begin\n----------------\n\nA project namespace manages bucket resources in the Management API server. You\nmust have a [project](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/project-management) to work with buckets and objects.\n\nYou must also have the appropriate bucket permissions to perform the following\noperation. See [Grant bucket access](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#grant_bucket_access).\n\nManage encryption resources\n---------------------------\n\nBuckets with `v2` encryption would have a secret `kekRef` and several AEADKeys created, in which `kekRef` is used to reference active default AEADKeys being used and AEADKeys include active and archive ones belong to the bucket.\n| **Note:** Archive AEADKey means it has been deactivated due to the deletion of old secret.\n\nRefresh active default AEADKeys for a bucket\n--------------------------------------------\n\nAs a best practice, refresh your bucket's default AEADKeys after approximately 42 billion object writes. This proactive step enhances security and prevents key exhaustion. The refresh process will create a new kekRef and deactivates the previous AEADKeys. To start the refresh process, delete the kekRef secret associated with the bucket.\n| **Note:** Mark AEADKey to be inactive wouldn't cause objects encrypted using that key to be crypto shredded.\n\nThe previous kekRef can be retrieved by running the following command to retrieve: \n\n kubectl get secrets -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e -l object.gdc.goog/bucket-name=\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e\n\nThen you can run the following to delete the existing kekRef: \n\n kubectl delete secrets \u003cvar translate=\"no\"\u003eOLD_KEKREF_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e\n\nAfter the successful deletion, you can run the following to confirm a new kekRef has been created based on `AGE`: \n\n kubectl get secrets -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e -l object.gdc.goog/bucket-name=\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e\n\nVerify new default AEADKeys have been created based on `AGE`: \n\n kubectl get aeadkeys -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e -l cmek.security.gdc.goog/resource-name=\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e\n\nRotate default AEADKeys for a bucket\n------------------------------------\n\nIf an AEADKey for your bucket becomes compromised, you must manually rotate the key encryption keys associated with the bucket.\n\nTo start the process, you must first [refresh the active default keys](#refresh-keys). This creates new active default AEADKeys, and marks the previous key encryption keys as deactivated. After the default keys refresh, the subsequent object uploads use the new AEADKeys as the key encryption keys. The previous AEADKeys are not destroyed, so you can still decrypt existing objects that were previously encrypted using those keys.\n\nNext, follow the steps to [download and re-upload](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/upload-download-storage-objects) the objects in your bucket and [delete the old objects](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/delete-storage-objects).\n\nAfter you re-upload all the objects in your bucket, you can clean up the inactive AEADKeys and old objects. Identify the deactivated AEADKeys based on `AGE`: \n\n kubectl get aeadkeys -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e -l cmek.security.gdc.goog/resource-name=\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e\n\nLastly, follow the steps to [delete the AEADKeys](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/kms/create-delete-keys#delete).\n| **Note:** You can also [create a new bucket](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-storage-buckets) and [delete and crypto-shred the compromised bucket](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/delete-storage-buckets)."]]