Skip to content

Data Protection (Azure Storage) (OrchardCore.DataProtection.Azure)

数据保护(Azure存储)(OrchardCore.DataProtection.Azure)

Purpose

目的

Data Protection (Azure Storage) enables data protection key rings that are segregated by tenant and stored in an Azure Blob Storage container.

数据保护(Azure存储)支持由租户隔离并存储在Azure Blob存储容器中的数据保护密钥环。

This is useful for load balanced environments where each active node will need to share the same key ring.

这对于负载平衡环境非常有用,在这种环境中,每个活动节点都需要共享相同的密钥环。

Configuration

组态

You'll need to specify a storage account connection string and a valid container name. The container will automatically be created if it does not already exist.

您需要指定存储帐户连接字符串和有效容器名称。如果容器尚不存在,将自动创建容器。

These settings need to be available to the IConfiguration implementation. In the simplest case, this will mean updating your appsettings.json file:

这些设置需要可用于IConfiguration实现。在最简单的情况下,这将意味着更新你的appsettings.json文件:


{

 <font color=#0099ff size=4 face="黑体">{</font> 


    "Modules": {

        "OrchardCore.DataProtection.Azure": {

          "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=<myaccountname>;AccountKey=<myaccountkey>;EndpointSuffix=core.windows.net",

          "ContainerName": "dataprotection"

        }

    }

}

 <font color=#0099ff size=4 face="黑体">}</font>