The architecture behind a password manager you can actually audit.
Qeva is a layered, open-source platform where every secret is sealed with authenticated encryption, every action is governed by database-driven access control, and your personal vault stays mathematically out of reach - even on a server you host yourself.
Seven layers, one request path.
A request flows top to bottom through cleanly separated tiers. Each layer owns one responsibility - and never trusts the layer above it.
Request flows top to bottom; the encrypted response returns up the same path.
Client & UI
Server-rendered React with client-side crypto helpers.
Middleware & guards
Every route is checked before it runs.
Route handlers
REST endpoints with dual authentication.
Services & crypto
Business logic, encryption, and schedulers.
ORM
Type-safe, parameterized data access.
Database
Encrypted secrets at rest, on a database you run.
Infrastructure
TLS, reverse proxy, CI/CD, and observability.
Follow one secret through the stack.
From an authenticated click to an encrypted row and back - every request is validated, authorized, and audited.
A single authorized read, validated and audited end to end.
Client
The client sends an HTTPS request carrying an HttpOnly session cookie or a scoped Bearer token.
TLS / Nginx
Nginx terminates TLS and reverse-proxies to the Node HTTPS server, adding strict security headers.
Middleware
Middleware validates the session, blocks unauthenticated routes, and enforces CSRF before the handler runs.
API + Zod
The route handler validates input with Zod, rejecting anything malformed at the boundary.
RBAC check
A database-driven access check confirms the caller holds the required permission or token scope.
Prisma / DB
Prisma runs a parameterized query - no string concatenation, no SQL-injection surface.
Decrypt + audit
The service decrypts the ciphertext with AES-256-GCM only for the authorized caller, then writes an immutable audit-log entry.
Two vaults. Two threat models. One cipher.
Every secret is sealed with AES-256-GCM. What changes is who holds the key - so privacy and collaboration never fight each other.
The master password and derived keys never touch disk - only ciphertext is stored.
Personal - zero-knowledge
Only the owner can decrypt. Not the server. Not us.
Master password stays with the user
It is never transmitted to storage and never persisted - it exists only long enough to derive a key.
Derive the master key
PBKDF2 stretches the password against a per-user random salt into a 256-bit key.
PBKDF2-HMAC-SHA256 · 150K iters · 256-bit saltUnwrap the data key
The master key unwraps a random 256-bit DEK generated at setup; a hash of the DEK validates authenticity later.
DEK = decrypt(wrappedDEK, masterKey)Seal the secret
The DEK encrypts the secret with authenticated AES-256-GCM, with a fresh IV and auth tag per operation.
AES-256-GCM · 128-bit IV · 128-bit tagStore ciphertext only
The database holds only { version, iv, authTag, encrypted }. No plaintext, no master password, no unwrapped key ever touches disk.
Team & global - shared by policy
Shared secrets, governed by roles - never a shared login.
Generate a per-scope key
Shared team and global vaults get a random 256-bit DEK, independent of any single user password.
DEK = randomBytes(32)Seal the secret
The secret is encrypted with the same authenticated AES-256-GCM cipher used everywhere in Qeva.
AES-256-GCM · 128-bit IV · 128-bit tagWrap the key for the group
The DEK is encrypted under the team key pair, so access belongs to a group - not baked into one person’s login.
wrappedDEK = encrypt(DEK, publicKey)Authorized members decrypt
Access is gated by RBAC and membership; revoking a member needs no password rotation.
| Dimension | Personal · USER_MASTER | Team & global · PUBLIC_KEY |
|---|---|---|
| Scope | Private personal vault | Shared team & org-wide vaults |
| Key custody | User master password (zero-knowledge) | Team / organization key pair |
| Who can decrypt | Only the owner | All authorized members |
| Data cipher | AES-256-GCM | AES-256-GCM |
| Key derivation | PBKDF2-HMAC-SHA256 · 150K iters | Random DEK, wrapped for the group |
| Best for | Maximum individual privacy | Team collaboration & continuity |
Seven independent lines of defense.
Security isn't a single wall - it's overlapping controls. A failure in any one layer is contained by the next.
Transport
- TLS / HTTPS everywhere
- HSTS & secure headers
- Node HTTPS server
Perimeter
- Nginx reverse proxy
- Middleware route guards
- CSRF + rate limiting
Authentication
- Session auth + JWT
- Email OTP verification
- SAML 2.0 SSO
- Argon2 / bcrypt hashing
Authorization
- 29-permission RBAC
- System + custom roles
- Scoped API tokens
- DB-enforced on every call
Data at rest
- AES-256-GCM secrets
- Zero-knowledge personal vault
- Encrypted session cookies
Integrity & recovery
- GCM authentication tags
- HMAC-SHA256 signed recovery
- Data-key hash validation
Assurance
- Immutable audit logs
- Structured logging
- Encrypted scheduled backups
A deliberately modern, boring-in-the-best-way stack.
Proven building blocks, chosen for type safety, security, and long-term maintainability.
Frontend
Backend
Data
Security
Platform
Quality
Don't trust it. Verify it.
Every layer here is open source under the AGPL. Read the code, audit the crypto, and run it on infrastructure you control.