mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-02 01:34:48 +00:00
security: keep signing keys out of deployable team vaults (CLI 0.13.0)
After the 2026-10-27 dev2 incident, root on the box drained every wallet whose key sat in an app.env, and deploys write app.env from team vaults. Wallet keys, seed phrases, hsm secrets and SSH/deploy keys now stay out of that path: - server: a machine (deploy) key never receives a signing key from GET /vaults/:id/secrets (listed as `withheld`, audited as secrets:withheld:signing) and cannot write or delete one (403 signing_key_machine_write). People still see them, so they can move them. - CLI `teams push` refuses a .env holding signing keys, by name or by value shape (PEM private key, 0x-hex, Solana base58/byte array, mnemonic), unless --allow-signing-keys. - CLI `teams pull` withholds signing keys by default; --include-signing-keys needs a person at a terminal, so deploy-app.sh's fallback to the logged-in account withholds them too. - One name rule in packages/opencreds/src/signing-keys.ts, mirrored in apps/pwa/src/lib/signing-keys.mjs, both held to one fixture file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1bff3e975c
commit
a7cd896ae3
12 changed files with 295 additions and 12 deletions
16
apps/pwa/test/signing-keys.test.mjs
Normal file
16
apps/pwa/test/signing-keys.test.mjs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// The server's copy of the signing-key NAME rule must agree with the CLI's
|
||||
// (packages/opencreds/src/signing-keys.ts): both are held to one fixture list.
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { dirname, join } from "node:path";
|
||||
import { isSigningKeyName } from "../src/lib/signing-keys.mjs";
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const fx = JSON.parse(readFileSync(join(here, "../../../packages/opencreds/src/signing-keys.fixtures.json"), "utf8"));
|
||||
|
||||
test("signing key names match the shared fixtures", () => {
|
||||
for (const n of fx.signing) assert.equal(isSigningKeyName(n), true, n);
|
||||
for (const n of fx.not_signing) assert.equal(isSigningKeyName(n), false, n);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue