[Security] Harden /api/vault route (auth check + stop leaking error details)
Summary
src/app/api/vault/route.ts accepts encrypt/verify actions from any caller with client-supplied keyMaterial, with no authentication or session check, and returns raw error.message to the client on failure. This is called from src/components/security/RelayerVault.tsx, which is reachable in the UI.
Why this matters
For a project whose core value proposition is security tooling, an unauthenticated endpoint that handles vault/secret operations and echoes internal error details is a meaningful gap. This is the highest-impact security fix currently open in the repo.
Acceptance criteria
Technical context
src/app/api/vault/route.ts, src/services/vault.ts, src/services/vault-node.js, consumer: src/components/security/RelayerVault.tsx.
[Security] Harden /api/vault route (auth check + stop leaking error details)
Summary
src/app/api/vault/route.tsacceptsencrypt/verifyactions from any caller with client-suppliedkeyMaterial, with no authentication or session check, and returns rawerror.messageto the client on failure. This is called fromsrc/components/security/RelayerVault.tsx, which is reachable in the UI.Why this matters
For a project whose core value proposition is security tooling, an unauthenticated endpoint that handles vault/secret operations and echoes internal error details is a meaningful gap. This is the highest-impact security fix currently open in the repo.
Acceptance criteria
/api/vaultPOST requires an authenticated/authorized session before processingencrypt/verifyactionsTechnical context
src/app/api/vault/route.ts,src/services/vault.ts,src/services/vault-node.js, consumer:src/components/security/RelayerVault.tsx.