feat(mars): pass-broker approval gateway for every host
A Telegram bot has a single getUpdates consumer, so a broker per host would split approval taps between them. mars now runs the gateway: the bot's only poller, relaying prompts and taps for terra's and titan's brokers over the tailnet (:8097) without ever seeing an item. Each broker authenticates with its own pass_broker_gateway_token; mars holds only the sha256, and the prompt is labelled with the host that token belongs to. The bot token and chat id move to mars and are dropped from the other hosts' sops files (terra.yaml also loses its leftover LibreChat keys and gains protonvpn_wg_private_key, which a later commit uses). Covered by checks.pass-broker-gateway (two nodes: labels, cancel, expiry, per-host token isolation, gateway down); the fakes are shared with checks.pass-broker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,10 +54,14 @@ empty password, so the script resolves the title among `--filter-state active` i
|
||||
first; a plain `pass-cli item view --item-title` silently returns the trashed copy and
|
||||
you get an interactive prompt with no explanation.
|
||||
|
||||
On terra the values come from **pass-broker** (`services/identity/pass-broker.nix`), not
|
||||
from anyone's own pass-cli session: it runs as its own user with an agent PAT scoped to
|
||||
the HomeLab vaults and releases an item only after a tap on its Telegram bot. When the
|
||||
socket exists, deploy uses it exclusively; a refused tap falls back to the interactive prompt.
|
||||
On terra/titan the values come from **pass-broker** (`services/identity/pass-broker.nix`),
|
||||
not from anyone's own pass-cli session: it runs as its own user with an agent PAT scoped to
|
||||
the HomeLab vaults and releases an item only after a Telegram tap. Prompts go through the
|
||||
**gateway on mars** (`hosts/mars/pass-broker-gateway.nix`, tailnet :8097), the bot's only
|
||||
`getUpdates` consumer: a second poller would split the taps. A new host gets its own
|
||||
`pass_broker_gateway_token` in its sops file and that token's sha256 in the gateway's
|
||||
`hosts`. When the socket exists, deploy uses it exclusively; a refused tap falls back to the
|
||||
interactive prompt.
|
||||
**Claude: fetch Proton Pass items only via `pass-broker get --item <title> --reason <why>`**,
|
||||
never `pass-cli login` yourself, and never print a value you fetched. Values go into
|
||||
variables or pipes, as `scripts/deploy` does.
|
||||
@@ -91,6 +95,9 @@ nix build .#checks.x86_64-linux.luna-sites -L
|
||||
# VM test of pass-broker with fake pass-cli + Telegram: approve/deny/expiry,
|
||||
# grants, policy, uid check
|
||||
nix build .#checks.x86_64-linux.pass-broker -L
|
||||
# two-node VM test of the gateway on mars with a broker using it: labels,
|
||||
# cancel, expiry, per-host token isolation, gateway down
|
||||
nix build .#checks.x86_64-linux.pass-broker-gateway -L
|
||||
```
|
||||
|
||||
`checks.kexec-local` is the only way to exercise `kexec-local` at all: it jumps the
|
||||
|
||||
Reference in New Issue
Block a user