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

@@ -36,11 +36,22 @@ body {
button:enabled { cursor: pointer; }
button:disabled { cursor: default; }
.vault-button {
background-color: color-mix(
in oklab,
color-mix(in oklab, var(--button-color) var(--button-rest, 15%), transparent),
color-mix(in oklab, var(--button-color) var(--button-hover, 25%), transparent) var(--button-mix, 0%)
);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.scrollbar-none { scrollbar-width: none; }
.vault-app { --vault-header-height: 70px; }
.vault-topbar {
min-height: 70px;
position: sticky;
top: 0;
z-index: 30;
min-height: var(--vault-header-height);
padding: 0 clamp(16px, 3vw, 44px);
display: grid;
grid-template-columns: 1fr auto 1fr;
@@ -60,17 +71,58 @@ button:disabled { cursor: default; }
}
.vault-brand span { display: block; margin-top: 5px; font-size: 9px; }
.vault-nav { display: flex; align-self: stretch; gap: clamp(8px, 2vw, 27px); }
.vault-nav { position: relative; display: flex; align-self: stretch; gap: clamp(8px, 2vw, 27px); }
.vault-nav button {
position: relative;
z-index: 1;
min-height: 44px;
padding: 0 6px;
color: var(--quiet);
font-size: 13px;
white-space: nowrap;
touch-action: pan-y;
user-select: none;
}
.vault-nav button:hover, .vault-nav button[aria-current] { color: var(--color-star-100); }
.vault-nav button[aria-current]::after { position: absolute; inset: auto 5px -1px; height: 2px; content: ""; background: var(--accent); }
.vault-nav button[aria-current] { cursor: grab; }
.vault-nav:active button[aria-current] { cursor: grabbing; }
.nav-text-dock {
position: absolute;
inset: 50% -8px auto;
height: 54px;
translate: 0 -50%;
scale: calc(0.94 + var(--dock-morph, 0) * 0.06) calc(0.83 + var(--dock-morph, 0) * 0.17);
opacity: var(--dock-morph, 0);
border: 1px solid #3a3d44;
border-radius: 999px;
background: #111418d9;
backdrop-filter: blur(14px);
box-shadow: inset 0 1px #ffffff12, 0 8px 24px #0005;
pointer-events: none;
}
.nav-underline {
position: absolute;
left: 0;
bottom: calc(-1px + var(--dock-morph, 0) * (50% - 16px));
height: calc(2px + var(--dock-morph, 0) * 32px);
translate: -50% 0;
pointer-events: none;
}
.nav-underline::before {
content: "";
position: absolute;
inset: 0 calc(-8px * var(--dock-morph, 0));
border-radius: 999px;
background: color-mix(in oklab, #4a3225 calc(var(--dock-morph, 0) * 100%), var(--accent));
}
.nav-liquid {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow: visible;
pointer-events: none;
}
.hub-link { justify-self: end; display: flex; align-items: center; gap: 8px; color: var(--color-star-300); font: 500 11px var(--font-mono); white-space: nowrap; }
.vault-main { max-width: 1720px; padding: 30px clamp(16px, 3vw, 44px) 10px; margin-inline: auto; }
@@ -234,26 +286,34 @@ button:disabled { cursor: default; }
.capture-notice { margin-block: 4px; font: 500 12px/1.5 var(--font-mono); color: var(--color-star-200); text-transform: none; letter-spacing: 0; }
.capture-notice.tone-red { color: var(--color-orbit-red); }
.vault-dialog {
.vault-overlay {
position: fixed;
inset: 0 0 0 auto;
margin: 0;
inset: 0;
z-index: 20;
overflow: hidden;
pointer-events: none;
}
.vault-scrim { position: absolute; inset: 0; background: #030508b3; }
.vault-dialog {
position: absolute;
inset: var(--vault-header-height) 0 0 auto;
width: min(440px, 100%);
height: 100dvh;
max-width: none;
max-height: none;
overflow: auto;
padding: 0;
overscroll-behavior: contain;
pointer-events: auto;
background: #121519;
color: var(--color-star-100);
border-left: 1px solid #3b4048;
}
.vault-dialog::backdrop { background: #030508b3; }
.vault-dialog[inert] { pointer-events: none; }
.dialog-heading { display: flex; gap: 12px; justify-content: space-between; align-items: start; padding: 18px 20px; position: sticky; top: 0; z-index: 1; background: #121519; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 23px; font-weight: 550; letter-spacing: -.035em; margin-top: 3px; }
.dialog-heading h2:focus { outline: none; }
.dialog-heading h2 + p { margin-top: 4px; color: var(--quiet); font-size: 13px; }
.dialog-content { padding: 18px 20px; }
.spring-stack { position: relative; min-width: 0; }
.spring-stack > .spring-pane[inert] { position: absolute; inset: 0 0 auto; pointer-events: none; }
.inspector-stack, .inspector-stack > .spring-pane { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.big-screen {
--screen-gutter: clamp(12px, 2vw, 30px);
@@ -266,6 +326,7 @@ button:disabled { cursor: default; }
}
.big-screen .vault-topbar { display: contents; }
.big-screen .vault-dialog { top: var(--screen-top); bottom: calc(var(--screen-bottom) + 64px); }
.big-screen :is(.vault-brand, .hub-link, .vault-console, .vault-footer, .scene-footer) { display: none; }
.big-screen .vault-main { padding: 0; }
.big-screen .vault-workspace,
@@ -308,20 +369,25 @@ button:disabled { cursor: default; }
.big-screen .vault-telemetry { border-radius: 8px; padding-block: 8px; }
.big-screen .vault-nav {
position: absolute;
z-index: 2;
z-index: 30;
bottom: var(--screen-bottom);
left: 50%;
transform: translateX(-50%);
gap: 3px;
gap: 4px;
max-width: calc(100% - 2 * var(--screen-gutter));
margin: 0;
padding: 4px;
padding: 5px 7px;
border-radius: 999px;
box-shadow: 0 8px 30px #0006;
box-shadow: inset 0 1px #ffffff12, 0 8px 30px #0008;
}
.big-screen .vault-nav button { border-radius: 999px; padding-inline: clamp(8px, 1.65vw, 23px); }
.big-screen .vault-nav button[aria-current] { background: #30251f; color: #ffd0a9; }
.big-screen .vault-nav button[aria-current]::after { display: none; }
.big-screen .vault-nav button {
display: grid;
place-items: center;
width: 46px;
border-radius: 999px;
padding: 0;
}
.big-screen .vault-nav button[aria-current] { color: #ffe2c9; }
@media (max-width: 1060px) {
.vault-workspace { grid-template-areas: "map map" "register inspector"; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: auto; }
@@ -329,6 +395,7 @@ button:disabled { cursor: default; }
}
@media (max-width: 640px) {
.vault-app { --vault-header-height: 105px; }
.vault-topbar { grid-template-columns: 1fr auto; gap: 0 10px; padding-top: 11px; }
.vault-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; margin-top: 7px; gap: 3px; }
.vault-nav button { padding-inline: 5px; font-size: 12px; }
@@ -340,7 +407,7 @@ button:disabled { cursor: default; }
.vault-console { min-height: 0; }
.register-list { max-height: 196px; }
.orbit-inspector { max-height: 480px; padding-bottom: 8px; }
.orbit-inspector > .console-empty { padding-bottom: 8px; }
.inspector-stack .console-empty { padding-bottom: 8px; }
.galaxy-frame { max-width: none; }
.scene-toolbar, .scene-footer { padding: 9px; }
.scene-footer > p { display: none; }
@@ -370,14 +437,5 @@ button:disabled { cursor: default; }
@media (max-width: 380px) {
.big-screen .vault-nav { gap: 2px; }
.big-screen .vault-nav button { padding-inline: 6px; }
.big-screen .vault-telemetry > div { padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: .01ms !important;
animation-iteration-count: 1 !important;
transition-duration: .01ms !important;
}
}