From 9a3f5231db5c7f936a97ea1ab9655dd33b2551ad Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 24 May 2026 05:09:51 -0400 Subject: [PATCH] feat(transport): register AddTransport() on central nodes --- src/ScadaLink.Host/Program.cs | 5 +++++ src/ScadaLink.Host/ScadaLink.Host.csproj | 1 + src/ScadaLink.Host/appsettings.Central.json | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/src/ScadaLink.Host/Program.cs b/src/ScadaLink.Host/Program.cs index a0b44a6..33f919f 100644 --- a/src/ScadaLink.Host/Program.cs +++ b/src/ScadaLink.Host/Program.cs @@ -19,6 +19,7 @@ using ScadaLink.NotificationService; using ScadaLink.Security; using ScadaLink.SiteCallAudit; using ScadaLink.TemplateEngine; +using ScadaLink.Transport; using Serilog; // SCADALINK_CONFIG determines which role-specific config to load (Central or Site) @@ -80,6 +81,10 @@ try // AddNotificationService() SMTP machinery above. AddNotificationOutbox binds // NotificationOutboxOptions via BindConfiguration, so no explicit Configure is needed. builder.Services.AddNotificationOutbox(); + // Transport (#24) — central-only bundle export/import pipeline. Binds + // TransportOptions from ScadaLink:Transport via BindConfiguration; no + // explicit Configure needed. + builder.Services.AddTransport(); // Audit Log (#23) — central node owns the AuditLogIngestActor singleton + // IAuditLogRepository. The site writer chain is still registered (lazy // singletons) but is never resolved on a central node. diff --git a/src/ScadaLink.Host/ScadaLink.Host.csproj b/src/ScadaLink.Host/ScadaLink.Host.csproj index 8bb5a4b..691fb4c 100644 --- a/src/ScadaLink.Host/ScadaLink.Host.csproj +++ b/src/ScadaLink.Host/ScadaLink.Host.csproj @@ -42,6 +42,7 @@ + diff --git a/src/ScadaLink.Host/appsettings.Central.json b/src/ScadaLink.Host/appsettings.Central.json index 149782f..1fd94dc 100644 --- a/src/ScadaLink.Host/appsettings.Central.json +++ b/src/ScadaLink.Host/appsettings.Central.json @@ -60,6 +60,14 @@ "PurgeInterval": "1.00:00:00", "DeliveredKpiWindow": "00:01:00" }, + "Transport": { + "BundleSessionTtlMinutes": 30, + "MaxBundleSizeMb": 100, + "MaxUnlockAttemptsPerSession": 3, + "MaxUnlockAttemptsPerIpPerHour": 10, + "Pbkdf2Iterations": 600000, + "SchemaVersionMajor": 1 + }, "Logging": { "MinimumLevel": "Information" }