Repository navigation
Open
Description
The owner, 2026-10-10 (translated): "build our own service for storing keys, in .t27, and for managing them: for working with agents and for convenient migration."
Today the keys live in Railway variables, spread over 59 services, in an account that may be cut off (Trinity-S-AI-DNA/t27#8675). Agents must reach them without ever seeing them. The only portable copy is the owner's age file from 2026-10-10.
Design rules (owner law and security, not style)
- No agent and no LLM context ever sees a secret value.
- An agent asks for a capability by NAME.
- The vault injects the values straight into the environment of a child process. This is
tri vault run --scope <s> -- <cmd>, in the spirit ofrailway run. - Values never reach stdout, logs, events, receipts or PR text.
- A test scans every log line and event for the bytes of the test secrets.
- Only the owner enters or rotates a value, at a TTY prompt (
vault put NAME). The value never travels through an agent's tool call. - Encrypted at rest with a proven primitive, never home-made crypto. Use
age(X25519 plus ChaCha20-Poly1305) or libsodium sealed boxes.- Every secret is encrypted to the vault's identity, plus the owner's recovery recipient.
- The recovery key lives only in the owner's password manager.
- So the encrypted store alone is enough to move: the owner's recovery key opens it on any new machine or account.
- Every decision is a
.t27spec with real tests, compiled to a card. TypeScript is glue: storage, HTTP, process spawn, and calls into the crypto library. The decisions are:- which workload may lease which secret;
- lease TTL and renewal;
- trust tier gates (never to a public host, per Self-hosting MVP: services on users' computers, verified by agreement, credited in TRI (off-chain first), everything decided in .t27 #1756);
- rotation age and alarms;
- audit event kinds;
- export rules (only encrypted to the recovery recipient);
- break-glass.
- Workload identity. A requester proves who it is with an ed25519 signature: the host key of trios#1756, or a per-service key. There are no bearer passwords between services.
- Audit. Every lease, deny, put, rotate and export becomes an event on the existing events bus. Each event carries names, scopes and hashes, never values.
MVP (slice 1)
- Specs in gHashTag/t27,
specs/vault/:policy.t27: secret classes, scopes, tiers, TTL, rotation and export rules;audit.t27: event kinds and their fields.
- Runtime in trios on an integration branch
vault-mvp, behindTRIOS_VAULT=on, off by default:- store: ciphertext rows in Postgres, or an encrypted file on a volume;
- endpoints: lease, renew, revoke, list names, audit read;
- workload auth by signature.
- CLI
tri vaultortrios vault. Owner commands:init,put,rotate,export,import. Workload commands:run --scope.importtakes the owner's decrypted KV stream on stdin, e.g.age -d ~/dr/railway-999-env.age | ... vault import. The OWNER runs it.
- Tests: dummy secrets only, generated at test time. They cover:
- cross-scope deny and public-tier deny;
- TTL expiry;
- an export that opens with the recovery key and does not open without it;
- an import round-trip;
- the no-value-in-logs scan.
Not in slice 1
- Migrating real secrets. That is the owner's own step, after the MVP lands.
- Switching services from Railway variables to the vault. That is one service at a time, by data.
Metadata
Metadata
Assignees
Labels
No labels
Activity
gHashTag commentedon Oct 10, 2026
Owner addition, 2026-10-10 (translated): "they are partly in the key manager now: store them all safely, remove duplicates and move them."
The current sources are named in 999-multibots-telegraf's CLAUDE.md §4:
infisical secrets get NAME), with envs dev and prod;railway-999-env.age, in therailway variables --kvformat with### <service>headers.Slice 1 adds:
vault import --stdin --source <label> --format dotenv|railway-kv. The owner pipesinfisical exportandage -dinto it. Every entry keeps its provenance.specs/vault/. A conflict always needs the owner, so no source wins silently.No agent extracts or moves a value. The two import commands are the owner's own steps, run in his terminal after slice 1 lands. Removing the duplicates from Railway and Infisical comes after the services read from the vault.
spec(vault): our own key store, decided in three cards -- policy, aud…
spec(vault): our own key store, decided in three cards -- policy, aud…
ci(test): install age for server-api and server-pglive, where the vau…
test(vault): a CLI command that fails prints its stderr, so a red run…
fix(vault): trios-vault import reads its stream before the first call…