[[["わかりやすい","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 UTC。"],[[["\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 encrypted storage buckets\n\nThis page guides you through how to manage encrypted storage buckets, specifically focusing on refreshing and rotating AEADKeys for v2 encryption. This covers prerequisites and steps for using `kubectl` commands to manage AEADKeys and `kekRef` secrets. This information lets you enforce robust data security and minimize the risk of compromising your encryption keys through effective lifecycle management.\n\nThis page is for audiences such as IT administrators within the infrastructure operator group or developers within the application operator group who manage encryption settings for storage buckets in Google Distributed Cloud (GDC) air-gapped environments. For more information, see [Audiences for GDC air-gapped documentation](/distributed-cloud/hosted/docs/latest/gdch/resources/audiences).\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)."]]