feat(rpc): mTLS between services from operator-issued certificates

Replace the service bearer tokens with [tls] ca_file and cert_dir. Caller
identity comes from the verified certificate, not metadata. Without TLS,
services listen and dial on loopback only. Task containers get only the CA
and keep their grant.
This commit is contained in:
sam committed 2026-10-16 02:37:51 +11:00
1 parent 88ef6ca5b2
commit 53c95038de
51 files changed
+746 -689

No files matched your search

+3
View File
@@ -50,6 +50,8 @@ type Settings struct {
// NATS storerpc path is deleted.
StateStoreTarget string
StateStoreToken string
// StateStoreCA is the PEM CA the State Store's certificate chains to.
StateStoreCA []byte
// ModelProxy, ModelProxyHosts and ModelProxyCA route model provider
// requests through the daemon's egress proxy, which holds the keys.
@@ -148,6 +150,7 @@ func run(ctx context.Context, settings Settings, log *slog.Logger, dependencies
TaskID: taskID,
StateStoreURL: settings.StateStoreTarget,
StateStoreToken: settings.StateStoreToken,
StateStoreCA: settings.StateStoreCA,
}, log)
if err != nil {
operation := "nats connect failed"