From 5fd7bf524a8b8be12c009dedee603f35a45d2b5f Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 7 Aug 2026 05:48:27 -0400 Subject: [PATCH] feat(secrets): scaffold ZB.MOM.WW.Secrets.Replicator.Grpc + secrets_hub.v1 pull-only proto Adds the third replicator sibling next to Replicator.SqlServer and Replicator.AkkaDotNet: the central-hosted gRPC secrets hub. This commit is scaffold only -- project, wire contract, solution wiring -- no service or client implementation. The proto mirrors exactly the read half of ISecretReplicationHub (GetManifestAsync, GetManyAsync). ApplyReplicatedAsync is deliberately NOT mirrored: in this topology every update originates at central and a site node is a strict follower, so the narrow contract IS the enforcement -- with no write RPC on the wire, a mis-wired or compromised site node has no way to push a row into the hub regardless of what its authorization allows. Messages are hand-written mirrors of StoredSecret and SecretManifestEntry rather than serializations of the domain types, following the Akka replicator's SecretRowDto precedent: the trust boundary stays structural, and a field added to StoredSecret later cannot start crossing the network merely by existing. Timestamps are ISO-8601 "O" strings (not google.protobuf. Timestamp, which cannot round-trip a DateTimeOffset's offset) so a relayed row is byte-identical to the one central holds; nullable .NET fields use proto3 explicit presence so null and empty string stay distinguishable. Grpc 2.76.0 / Google.Protobuf 3.34.1 match what ScadaBridge, OtOpcUa and the sibling ZB.MOM.WW.LocalDb libraries already resolve, so a consumer taking both gets one Grpc rather than a downgrade warning. Claude-Session: https://claude.ai/code/session_014WNM4vjoVksyyBraTXSZE1 --- ZB.MOM.WW.Secrets/Directory.Packages.props | 11 ++ ZB.MOM.WW.Secrets/ZB.MOM.WW.Secrets.slnx | 1 + .../Protos/secrets_hub.proto | 142 ++++++++++++++++++ .../ZB.MOM.WW.Secrets.Replicator.Grpc.csproj | 57 +++++++ 4 files changed, 211 insertions(+) create mode 100644 ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Replicator.Grpc/Protos/secrets_hub.proto create mode 100644 ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Replicator.Grpc/ZB.MOM.WW.Secrets.Replicator.Grpc.csproj diff --git a/ZB.MOM.WW.Secrets/Directory.Packages.props b/ZB.MOM.WW.Secrets/Directory.Packages.props index dab26a3..0a39b60 100644 --- a/ZB.MOM.WW.Secrets/Directory.Packages.props +++ b/ZB.MOM.WW.Secrets/Directory.Packages.props @@ -30,6 +30,17 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + +