Blob 存储的加密范围(预览)Encryption scopes for Blob storage (preview)

可以通过加密范围在容器或单个 Blob 级别管理加密。Encryption scopes provide the ability to manage encryption at the level of the container or an individual blob. 可以使用加密范围在驻留在同一存储帐户中但属于不同客户的数据之间创建安全边界。You can use encryption scopes to create secure boundaries between data that resides in the same storage account but belongs to different customers.

默认情况下,使用作用域为整个存储帐户的密钥对存储帐户进行加密。By default, a storage account is encrypted with a key that is scoped to the entire storage account. 使用加密范围时,可以指定使用作用域仅为这些容器的密钥对一个或多个容器加密。With an encryption scope, you can specify that one or more containers are encrypted with a key that is scoped only to those containers.

你可以选择使用 Microsoft 管理的密钥或存储在 Azure Key Vault 中的客户管理的密钥来保护和控制对用于加密数据的密钥的访问。You can choose to use either Microsoft-managed keys or customer-managed keys stored in Azure Key Vault to protect and control access to the key that encrypts your data. 同一存储帐户上的不同加密范围可以使用 Microsoft 管理的密钥或客户管理的密钥。Different encryption scopes on the same storage account can use either Microsoft-managed or customer-managed keys.

创建加密范围后,可以对创建容器或 Blob 的请求指定加密范围。After you have created an encryption scope, you can specify that encryption scope on a request to create a container or a blob. 有关如何创建加密范围的详细信息,请参阅创建和管理加密范围(预览)For more information about how to create an encryption scope, see Create and manage encryption scopes (preview).


读取访问异地冗余存储 (RA-GRS) 帐户不支持加密范围预览版。Encryption scopes are not supported with read-access geo-redundant storage (RA-GRS) accounts during preview.


具有分层命名空间 (Azure Data Lake Storage Gen2) 的帐户尚不支持此功能。This feature is not yet supported in accounts that have a hierarchical namespace (Azure Data Lake Storage Gen2). 若要了解详细信息,请参阅 Azure Data Lake Storage Gen2 中可用的 Blob 存储功能To learn more, see Blob storage features available in Azure Data Lake Storage Gen2.


此加密范围预览版仅用于非生产用途。The encryption scopes preview is intended for non-production use only. 生产服务级别协议 (SLA) 当前不可用。Production service-level agreements (SLAs) are not currently available.

为避免意外费用,请确保禁用当前不需要的任何加密范围。To avoid unexpected costs, be sure to disable any encryption scopes that you do not currently need.

创建具有加密范围的容器或 BlobCreate a container or blob with an encryption scope

在加密范围下创建的 Blob 使用为该范围指定的密钥进行加密。Blobs that are created under an encryption scope are encrypted with the key specified for that scope. 在创建单个 Blob 时,可以为该 Blob 指定加密范围,也可以在创建容器时指定默认的加密范围。You can specify an encryption scope for an individual blob when you create the blob, or you can specify a default encryption scope when you create a container. 若在容器级别指定了默认加密范围,该容器中的所有 Blob 都将使用与该默认范围相关联的密钥进行加密。When a default encryption scope is specified at the level of a container, all blobs in that container are encrypted with the key associated with the default scope.

在具有默认加密范围的容器中创建 Blob 时,如果该容器配置为允许替代默认加密范围,则可以指定用于替代默认加密范围的加密范围。When you create a blob in a container that has a default encryption scope, you can specify an encryption scope that overrides the default encryption scope if the container is configured to allow overrides of the default encryption scope. 若要防止替代默认加密范围,请将容器配置为拒绝单个 Blob 的替代。To prevent overrides of the default encryption scope, configure the container to deny overrides for an individual blob.

只要未禁用加密范围,对属于该加密范围的 Blob 执行读取操作以透明方式执行。Read operations on a blob that belongs to an encryption scope happen transparently, so long as the encryption scope is not disabled.

禁用加密范围Disable an encryption scope

禁用加密范围时,使用该加密范围进行的任何后续读取或写入操作都将失败,并显示 HTTP 错误代码 403(已禁止)。When you disable an encryption scope, any subsequent read or write operations made with the encryption scope will fail with HTTP error code 403 (Forbidden). 如果重新启用加密范围,读取和写入操作将再次正常进行。If you re-enable the encryption scope, read and write operations will proceed normally again.

禁用加密范围后,将不再为此付费。When an encryption scope is disabled, you are no longer billed for it. 禁用不需要的任何加密范围以避免不必要的费用。Disable any encryption scopes that are not needed to avoid unnecessary charges.

如果你的加密范围受客户管理的密钥保护,则还可以删除密钥保管库中的关联密钥来禁用加密范围。If your encryption scope is protected with customer-managed keys, then you can also delete the associated key in the key vault in order to disable the encryption scope. 请记住,客户管理的密钥受到密钥保管库中的软删除和清除保护功能的保护,删除的密钥受到为这些属性定义的行为的约束。Keep in mind that customer-managed keys are protected by soft delete and purge protection in the key vault, and a deleted key is subject to the behavior defined for by those properties. 有关详细信息,请参阅 Azure Key Vault 文档中的以下主题之一:For more information, see one of the following topics in the Azure Key Vault documentation:


不能删除加密范围。It is not possible to delete an encryption scope.

后续步骤Next steps