refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)

Solution + 23 src projects + 26 test projects renamed; folders, csproj,
namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated.
ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated.
SQL roles/logins, LDAP domains, CLI command name, and CLI config dir
(~/.scadalink → ~/.scadabridge) also renamed.

Build green; 5 Host.Tests fail awaiting SQL login rename in next commit.
Pre-existing StaleTagMonitor timing flakes unchanged.

Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
Joseph Doherty
2026-05-28 09:37:45 -04:00
parent 6d87ee3c3b
commit 7b0b9c7365
1531 changed files with 11180 additions and 11054 deletions
@@ -0,0 +1,48 @@
namespace ZB.MOM.WW.ScadaBridge.Transport;
public sealed class TransportOptions
{
/// <summary>Gets or sets the TTL in minutes for an in-progress import session.</summary>
public int BundleSessionTtlMinutes { get; set; } = 30;
/// <summary>Gets or sets the maximum allowed bundle size in megabytes.</summary>
public int MaxBundleSizeMb { get; set; } = 100;
/// <summary>
/// T-006: maximum allowed decompressed size of any single zip entry in megabytes.
/// A 100 MB DEFLATE-compressed bundle can decompress to gigabytes; this cap
/// stops a malicious bundle from OOM-ing the central node before its entries
/// are decompressed.
/// </summary>
public int MaxBundleEntryDecompressedMb { get; set; } = 200;
/// <summary>
/// T-006: maximum permitted number of entries inside a bundle zip. A well-formed
/// bundle has exactly two (<c>manifest.json</c> plus <c>content.json</c> or
/// <c>content.enc</c>); a small upper bound limits the surface a zip-bomb can
/// exploit without rejecting future schema additions out of hand.
/// </summary>
public int MaxBundleEntryCount { get; set; } = 4;
/// <summary>
/// T-006: maximum permitted compression ratio (uncompressed length / compressed
/// length) per zip entry. Defence-in-depth against decompression bombs whose
/// declared <see cref="System.IO.Compression.ZipArchiveEntry.Length"/> is
/// trustworthy on read; legitimate JSON compresses around 510x, so 50x has
/// generous headroom for unusually compressible bundles.
/// </summary>
public int MaxBundleEntryCompressionRatio { get; set; } = 50;
/// <summary>Gets or sets the maximum number of failed passphrase unlock attempts before a session is locked.</summary>
public int MaxUnlockAttemptsPerSession { get; set; } = 3;
/// <summary>Gets or sets the maximum number of unlock attempts allowed per IP address per hour.</summary>
public int MaxUnlockAttemptsPerIpPerHour { get; set; } = 10;
/// <summary>Gets or sets the PBKDF2 iteration count used for passphrase key derivation.</summary>
public int Pbkdf2Iterations { get; set; } = 600_000;
/// <summary>Gets or sets the major version of the bundle schema this instance produces and accepts.</summary>
public int SchemaVersionMajor { get; set; } = 1;
/// <summary>
/// Human-readable name of the cluster/environment producing bundles. Stamped
/// into <c>BundleManifest.SourceEnvironment</c> and surfaced in the export
/// filename (<c>scadabundle-{SourceEnvironment}-{yyyy-MM-dd-HHmmss}.scadabundle</c>).
/// Bound from <c>Transport:SourceEnvironment</c> in <c>appsettings*.json</c>;
/// the default placeholder is fine for single-cluster deployments.
/// </summary>
public string SourceEnvironment { get; set; } = "scadabridge";
}