test(integration): share one key ring across the fetch harness contexts (CDB-1, WP1 task 1.8)
PendingDeployments.ConfigurationJson is now encrypted at rest; the harness built a fresh EphemeralDataProtectionProvider per context, so the endpoint could not decrypt what the staging context wrote. Central nodes share one key ring; the fixture now does too.
This commit is contained in:
@@ -60,10 +60,15 @@ public sealed class DeployNotifyFetchTests
|
||||
/// <summary>Creates the SQLite-adapted context from the supplied options.</summary>
|
||||
/// <param name="options">The EF Core options for the context.</param>
|
||||
public SqliteFetchDbContext(DbContextOptions<ScadaBridgeDbContext> options)
|
||||
: base(options, new EphemeralDataProtectionProvider())
|
||||
: base(options, KeyRing)
|
||||
{
|
||||
}
|
||||
|
||||
// One key ring shared by every context, as the central nodes share theirs:
|
||||
// PendingDeployments.ConfigurationJson is encrypted at rest (code review 2026-12-02
|
||||
// CDB-1), so the staging context's write must decrypt in the endpoint's context.
|
||||
private static readonly IDataProtectionProvider KeyRing = new EphemeralDataProtectionProvider();
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user