feat(auth): ScadaBridge TransportExport excludes inbound API keys (re-arch C4; methods-only, import ignores legacy key sections); keys re-issued per environment
This commit is contained in:
@@ -21,7 +21,6 @@ public sealed class BundleSerializerTests
|
||||
DatabaseConnections: Array.Empty<DatabaseConnectionDto>(),
|
||||
NotificationLists: Array.Empty<NotificationListDto>(),
|
||||
SmtpConfigs: Array.Empty<SmtpConfigDto>(),
|
||||
ApiKeys: Array.Empty<ApiKeyDto>(),
|
||||
ApiMethods: Array.Empty<ApiMethodDto>());
|
||||
|
||||
private static BundleManifest BuildManifestFor(byte[] contentBytes, EncryptionMetadata? encryption = null) =>
|
||||
@@ -30,7 +29,7 @@ public sealed class BundleSerializerTests
|
||||
exportedBy: "tester",
|
||||
scadaBridgeVersion: "1.0.0",
|
||||
encryption: encryption,
|
||||
summary: new BundleSummary(0, 1, 1, 0, 0, 0, 0, 0, 0),
|
||||
summary: new BundleSummary(0, 1, 1, 0, 0, 0, 0, 0),
|
||||
contents: Array.Empty<ManifestContentEntry>(),
|
||||
contentBytes: contentBytes);
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ public sealed class EntitySerializerTests
|
||||
DatabaseConnections: Array.Empty<DatabaseConnectionDefinition>(),
|
||||
NotificationLists: Array.Empty<NotificationList>(),
|
||||
SmtpConfigurations: Array.Empty<SmtpConfiguration>(),
|
||||
ApiKeys: Array.Empty<ApiKey>(),
|
||||
ApiMethods: Array.Empty<ApiMethod>());
|
||||
|
||||
[Fact]
|
||||
@@ -217,7 +216,6 @@ public sealed class EntitySerializerTests
|
||||
DatabaseConnections: Array.Empty<DatabaseConnectionDto>(),
|
||||
NotificationLists: Array.Empty<NotificationListDto>(),
|
||||
SmtpConfigs: Array.Empty<SmtpConfigDto>(),
|
||||
ApiKeys: Array.Empty<ApiKeyDto>(),
|
||||
ApiMethods: Array.Empty<ApiMethodDto>());
|
||||
|
||||
var aggregate = new EntitySerializer().FromBundleContent(dto);
|
||||
|
||||
@@ -7,14 +7,14 @@ namespace ZB.MOM.WW.ScadaBridge.Transport.Tests.Serialization;
|
||||
|
||||
public sealed class ManifestBuilderTests
|
||||
{
|
||||
private static BundleSummary EmptySummary => new(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
private static BundleSummary EmptySummary => new(0, 0, 0, 0, 0, 0, 0, 0);
|
||||
private static IReadOnlyList<ManifestContentEntry> NoContents => Array.Empty<ManifestContentEntry>();
|
||||
|
||||
[Fact]
|
||||
public void Build_populates_summary_from_contents()
|
||||
{
|
||||
var sut = new ManifestBuilder();
|
||||
var summary = new BundleSummary(2, 1, 0, 0, 0, 0, 0, 0, 0);
|
||||
var summary = new BundleSummary(2, 1, 0, 0, 0, 0, 0, 0);
|
||||
var contents = new[]
|
||||
{
|
||||
new ManifestContentEntry("Template", "T1", 1, Array.Empty<string>()),
|
||||
|
||||
Reference in New Issue
Block a user