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,25 +1,28 @@
import type { ButtonHTMLAttributes } from "react";
import { motion, type HTMLMotionProps } from "motion/react";
const variants = {
primary:
"bg-wormhole-violet/25 text-star-100 border-wormhole-violet/40 hover:bg-wormhole-violet/35",
ghost: "bg-space-800/60 text-star-200 border-space-700 hover:bg-space-800",
danger: "bg-orbit-red/15 text-orbit-red border-orbit-red/35 hover:bg-orbit-red/25",
success: "bg-orbit-green/15 text-orbit-green border-orbit-green/35 hover:bg-orbit-green/25",
warn: "bg-orbit-amber/15 text-orbit-amber border-orbit-amber/40 hover:bg-orbit-amber/25",
"text-star-100 border-wormhole-violet/40 [--button-color:var(--color-wormhole-violet)] [--button-rest:25%] [--button-hover:35%]",
ghost: "text-star-200 border-space-700 [--button-color:var(--color-space-800)] [--button-rest:60%] [--button-hover:100%]",
danger: "text-orbit-red border-orbit-red/35 [--button-color:var(--color-orbit-red)]",
success: "text-orbit-green border-orbit-green/35 [--button-color:var(--color-orbit-green)]",
warn: "text-orbit-amber border-orbit-amber/40 [--button-color:var(--color-orbit-amber)]",
};
export function Button({
variant = "ghost",
className = "",
...props
}: ButtonHTMLAttributes<HTMLButtonElement> & {
}: HTMLMotionProps<"button"> & {
variant?: keyof typeof variants;
}) {
return (
<button
<motion.button
type="button"
className={`px-4 py-2.5 rounded-xl text-sm font-medium border transition-colors disabled:opacity-40 ${variants[variant]} ${className}`}
className={`vault-button px-4 py-2.5 rounded-xl text-sm font-medium border disabled:opacity-40 ${variants[variant]} ${className}`}
initial={false}
animate={{ "--button-mix": "0%" }}
whileHover={{ "--button-mix": "100%" }}
{...props}
/>
);