feat: author and inspect grpc data connections

This commit is contained in:
Joseph Doherty
2026-11-16 20:58:43 -05:00
parent 8ad03e9c5d
commit 1df29a3124
31 changed files with 1246 additions and 141 deletions
+36
View File
@@ -246,6 +246,42 @@ See the [ClusterClient→gRPC migration design](plans/2026-08-06-clusterclient-t
**On an admin-role node, `NodeCommandService` and `CentralCommandService` are `AllowAnonymous` by design** — the AdminUI cookie `FallbackPolicy` would otherwise 401/redirect a correctly-PSK'd call before the interceptor above ever ran (archreview 03/S14). See [`security.md` § Mesh gRPC ingress is `AllowAnonymous` by design](security.md#mesh-grpc-ingress-is-allowanonymous-by-design).
### `DataConnections`
This is the dedicated current-data gRPC listener, separate from `MeshTransport`, telemetry,
artifact fetch and LocalDb sync. See [Data connections](DataConnections.md) for deployment,
consumer scope, exports, mappings, credential provisioning and recovery.
| Key | Default | Purpose |
|---|---|---|
| `Enabled` | `false` | Bind the dedicated data listener when enabled. |
| `ListenPort` / `ListenAddress` | `0` / `0.0.0.0` | Dedicated port (required when enabled) and IP literal bind address. |
| `AllowedHosts` | `[]` | Explicit permitted endpoint host names; required when enabled. |
| `CertificatePath` / `CertificateKeyPath` | unset | Server TLS certificate and optional separate PEM key. Production requires TLS. |
| `AllowDevelopmentCleartext` | `false` | Allowed only in Development with a literal loopback listener. |
| `MaxMessageBytes` / `MaxConcurrentCalls` | `1048576` / `64` | Message-size and concurrent unary-call admission. |
| `MaxStreams` / `MaxStreamsPerPrincipal` | `256` / `8` | Global and per-principal stream bounds. |
| `MaxMonitoredItems` | `10000` | Listener monitored-item bound. |
| `MaxTransportBytes` / `MaxPendingBytes` | `67108864` / `1048576` | Retained transport and pending-work byte bounds. |
| `MaxSessionLifetime` | `01:00:00` | Finite stream-session lifetime. |
| `UnaryTimeout` / `StreamCommandTimeout` | `00:00:30` / `00:00:05` | Finite ingress unary and stream-command deadlines. |
| `CredentialBundlePath` / `TrustBundlePath` | unset | Independent node-local credential and trust provisioning mounts. |
| `BundleRefreshInterval` | `00:00:01` | Local mount refresh interval (validated range: 100 ms to one minute). |
| `Hub` | `DataResourceLimits` defaults | Finite Runtime hub admission, retained-work and recovery limits. |
The authoritative settings and validation are `Host/Configuration/DataConnectionOptions.cs` and
`DataConnectionOptionsValidator.cs`. Options use normal .NET configuration layering; environment
keys use `DataConnections__...`. Host validation rejects insecure production transport and invalid
finite limits. These values are resource bounds, not measured capacity claims. Connection rows,
export grants and mappings add their own batch/page, stream/item, message/byte, depth/node,
metadata-lease and stale-timeout limits; effective admission must satisfy every applicable bound.
Listener configuration does not itself create an import. Deploy `DataConnection`, `DataExport`
and `RemoteNamespaceMapping` records through the existing configuration flow. Keep credentials out
of artifacts and resolve their canonical `secret:data/...` references on the listed consumer nodes.
New records and write-through default disabled. Production data endpoints use `https://`; existing
h2c mesh settings do not opt this listener into cleartext.
### `ConfigSource` / `ConfigServe` (config fetch-and-cache)
- **Purpose:** [per-cluster mesh](plans/2026-07-21-per-cluster-mesh-design.md) **Phase 3**. `ConfigSource:Mode` selects where a **driver** node reads its deployed configuration: `Direct` (read `Deployment.ArtifactBlob` from central SQL, today's behaviour) or `FetchAndCache` (fetch the artifact bytes from central over a gRPC stream, verify SHA-256, cache in LocalDb, and read **only** the cache — no central-SQL config read). `ConfigServe` is the **central** (admin-role) serve side that a `FetchAndCache` node dials.