feat(terra): pass-broker for Telegram-approved Proton Pass access
A Rust daemon running as its own system user holds terra's only pass-cli session, an agent PAT scoped to the HomeLab vaults. `pass-broker get` asks it for an item; per-item rules decide auto/ask/deny, and "ask" sends a Telegram prompt that only darman's account can approve (10-min grant for darman@*/root@*). Requests whose client is gone are dropped or withdrawn, and the client gives up after 30s without an answer. scripts/deploy uses the broker exclusively when its socket exists. Covered by checks.pass-broker (fake pass-cli + Telegram). Secrets added for all hosts; only terra runs the broker so far. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ in
|
||||
../../services/desktop/claude-desktop.nix
|
||||
../../services/desktop/librechat.nix
|
||||
../../services/desktop/luna-voice.nix
|
||||
../../services/identity/pass-broker.nix
|
||||
../../services/dev/turtle-beach-re.nix
|
||||
inputs.turtle-beach-swarm-re.nixosModules.release
|
||||
inputs.tbctl.nixosModules.tbctl
|
||||
@@ -105,6 +106,16 @@ in
|
||||
|
||||
environment.systemPackages = [ unstable.proton-pass-cli ];
|
||||
|
||||
# Proton Pass for scripts/deploy and Claude, one Telegram tap per use. Your
|
||||
# own pass-cli stays logged out here: the broker's session is the only one.
|
||||
homelab.passBroker = {
|
||||
enable = true;
|
||||
passCli = unstable.proton-pass-cli;
|
||||
patFile = config.sops.secrets.pass_broker_pat.path;
|
||||
telegram.tokenFile = config.sops.secrets.pass_broker_telegram_token.path;
|
||||
telegram.chatIdFile = config.sops.secrets.darman_telegram_user_id.path;
|
||||
};
|
||||
|
||||
# run0 waits on systemd over D-Bus, whose 25s default call timeout runs out
|
||||
# while the polkit dialog is still open (slow typing, a vault lookup).
|
||||
# Scoped to run0 so a hung systemctl doesn't also wait 5min.
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
sops.secrets.hermes_api_server_key.owner = "darman";
|
||||
sops.secrets.elevenlabs_api_key.owner = "darman";
|
||||
|
||||
# pass-broker (services/identity/pass-broker.nix): the agent PAT and its
|
||||
# dedicated Telegram bot. Owner pass-broker, so darman cannot read them.
|
||||
sops.secrets.pass_broker_pat.owner = "pass-broker";
|
||||
sops.secrets.pass_broker_telegram_token.owner = "pass-broker";
|
||||
# Not broker-specific; a second reader needs a sops.templates copy, not a new owner.
|
||||
sops.secrets.darman_telegram_user_id.owner = "pass-broker";
|
||||
|
||||
sops.secrets.librechat_creds_key = { };
|
||||
sops.secrets.librechat_creds_iv = { };
|
||||
sops.secrets.librechat_jwt_secret = { };
|
||||
|
||||
Reference in New Issue
Block a user