fix: harden the vault before release

Require a private passphrase and loopback-or-token admin auth. New vaults use Argon2id; existing PBKDF2 vaults still open, and new snapshot metadata is encrypted. Wormhole tokens survive restart, offset uploads seal into the vault, and client-certificate uploads are real. Reject the command provider and keep Postgres passwords off the process arguments. Keep the interruptible canvas motion.
This commit is contained in:
2026-11-10 09:53:06 +07:00
parent 60ba8fed88
commit 95778d54e4
46 changed files with 2311 additions and 415 deletions

View File

@@ -1,6 +1,8 @@
import { useMutation } from "@tanstack/react-query";
import { motion } from "motion/react";
import { startPairing } from "../../api";
import { useReducedMotion } from "../../hooks/useReducedMotion";
import { ambientPulse } from "../../lib/motion";
import { Button } from "../ui/Button";
import { Hint } from "../ui/EmptyState";
import { TelemetryPanel } from "../ui/Telemetry";
@@ -16,6 +18,7 @@ export function WormholeView({
mutationFn: startPairing,
onSuccess: onPaired,
});
const reducedMotion = useReducedMotion();
const expires = pairing ? new Date(pairing.expires_at).toLocaleTimeString() : "";
@@ -31,7 +34,7 @@ export function WormholeView({
) : (
<motion.div
className="rounded-2xl border border-wormhole-violet/35 bg-gradient-to-b from-wormhole-violet/10 to-space-900 p-6 text-center"
initial={{ scale: 0.95, opacity: 0 }}
initial={reducedMotion ? false : { scale: 0.95, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
>
<p className="text-xs uppercase tracking-[0.2em] text-wormhole-violet mb-4">
@@ -73,15 +76,19 @@ function EmptyWormhole({
onGenerate: () => void;
loading: boolean;
}) {
const reducedMotion = useReducedMotion();
return (
<div className="text-center py-8">
<motion.div
className="mx-auto w-24 h-24 rounded-full border border-wormhole-violet/30 flex items-center justify-center text-3xl"
animate={{ boxShadow: ["0 0 0 rgba(167,139,250,0)", "0 0 32px rgba(167,139,250,0.25)", "0 0 0 rgba(167,139,250,0)"] }}
transition={{ duration: 3, repeat: Infinity }}
>
<div className="relative mx-auto w-24 h-24 rounded-full border border-wormhole-violet/30 flex items-center justify-center text-3xl">
<motion.span
aria-hidden="true"
className="pointer-events-none absolute inset-0 rounded-full shadow-[0_0_32px_rgba(167,139,250,0.25)]"
initial={{ opacity: 0 }}
animate={{ opacity: reducedMotion ? 0 : [0, 1] }}
transition={reducedMotion ? { type: false } : ambientPulse}
/>
◉
</motion.div>
</div>
<p className="mt-4 text-star-300 text-sm max-w-xs mx-auto">
Open a wormhole when you&apos;re ready to claim an outpost.
</p>