Skip to content

Commit 96a80b3

Browse files
committed
react to feedback
1 parent 6a7ebb0 commit 96a80b3

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

aspnetcore/security/data-protection/configuration/scaling.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ Generally, app instances don't know about each other, so coordinating the genera
4040

4141
First, app instances [disable key generation](xref:security/data-protection/configuration/overview#disableautomatickeygeneration). Next, a new component is introduced that connects to the same key repository and performs a dummy protect operation once a day or so.
4242

43-
For example, with Azure blob storage as the key repository, the key manager could be a simple console app run on a schedule.
43+
For example, with Azure blob storage as the key repository, the key manager could be a basic console app run on a schedule:
44+
45+
:::code language="csharp" source="~/security/data-protection/configuration/scaling/samples/AzBlobKey/Program.cs":::
46+
4447

4548
```csharp
4649
using Azure.Identity;

aspnetcore/security/data-protection/configuration/scaling/samples/AzBlobKey/AzBlobKey.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10+
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.4.0" />
1011
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Keys" Version="1.3.0" />
1112
<PackageReference Include="Azure.Identity" Version="1.13.1" />
1213
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.9.0" />

aspnetcore/security/data-protection/configuration/scaling/samples/AzBlobKey/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
using var host = hostBuilder.Build();
1818

19-
// Perform a dummy operation to force key creation or rotation, if needed
19+
// Perform a dummy operation to force key creation or rotation, if needed.
2020
var dataProtector = host.Services.GetDataProtector("Default");
2121
dataProtector.Protect([]);

aspnetcore/security/data-protection/configuration/scaling/samples/AzBlobKey/appsettings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55
"Microsoft.AspNetCore": "Warning"
66
}
77
},
8-
"AllowedHosts": "*"
8+
"AllowedHosts": "*",
9+
"AzureURIs": {
10+
"BlobStorage": "your-blob-storage-uri-here",
11+
"KeyVault": "your-key-vault-uri-here"
12+
}
913
}

0 commit comments

Comments
 (0)