swarm-stt: the deploy module (deploy.stt.*, sandboxed container, store leaf, queue grants) and its docs
This commit is contained in:
parent
423860cadc
commit
96b5b83fa4
1 changed files with 594 additions and 5 deletions
|
|
@ -1472,6 +1472,16 @@ let
|
|||
}
|
||||
];
|
||||
|
||||
# The speech-to-text service: its own queue client secret, read at start by
|
||||
# the daemon inside its container, and nothing else.
|
||||
sttReaders = [
|
||||
{
|
||||
name = "swarm-stt";
|
||||
cn = baoDeploy.sttCommonName;
|
||||
policyText = readStanza "${credentialMountPath}/data/swarm/services/${hyperhiveCfg.swarm.stt.clientId}/oidc/client";
|
||||
}
|
||||
];
|
||||
|
||||
# The forge host's one store identity. The forge's
|
||||
# `forgejo-swarm-controller-account`, in its container, writes the
|
||||
# controller's forge token under it, the one writer of that path and
|
||||
|
|
@ -2699,6 +2709,18 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
sttCommonName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "swarm-stt";
|
||||
description = ''
|
||||
Subject the store's `swarm-stt` cert-auth role accepts: the identity
|
||||
the speech-to-text service presents from inside its container. Its
|
||||
grant is read on its own queue client secret.
|
||||
|
||||
⚠️ Reserved as a hive name by ./swarm.nix, like its siblings.
|
||||
'';
|
||||
};
|
||||
|
||||
atticCommonName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "swarm-attic";
|
||||
|
|
@ -2823,6 +2845,31 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
sttClientCertFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "/var/lib/swarm-bao-pki/stt.pem";
|
||||
description = ''
|
||||
Certificate the speech-to-text service presents to the store. Its
|
||||
subject must be {option}`services.hyperhive.deploy.bao.sttCommonName`.
|
||||
|
||||
./glue-bao-tls.nix points it at the leaf it mints on the store's host.
|
||||
On a service host without the store, it is a file the operator copies
|
||||
from the store's host. A path, never a value.
|
||||
'';
|
||||
};
|
||||
|
||||
sttClientKeyFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "/var/lib/swarm-bao-pki/stt-key.pem";
|
||||
description = ''
|
||||
Private key for
|
||||
{option}`services.hyperhive.deploy.bao.sttClientCertFile`.
|
||||
A path, never a value.
|
||||
'';
|
||||
};
|
||||
|
||||
forgePublisherClientCertFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
|
|
@ -4030,6 +4077,8 @@ in
|
|||
|
||||
systemd.services.swarm-bao-notify-router-policy = readerPolicyUnit "write the notification router's client-secret-reader bao policy and cert-auth role" notifyRouterReaders;
|
||||
|
||||
systemd.services.swarm-bao-stt-policy = readerPolicyUnit "write the speech-to-text service's client-secret-reader bao policy and cert-auth role" sttReaders;
|
||||
|
||||
systemd.services.swarm-bao-forge-publisher-policy = readerPolicyUnit "write the forge's controller-token-publisher bao policy and cert-auth role" forgePublisherWriters;
|
||||
|
||||
# A FOURTH sibling, same shape and same reasons as the two above. This
|
||||
|
|
|
|||
Loading…
Reference in a new issue