mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-08-07 07:09:37 +00:00
Audit + hardening of the Orama SSS vault so external clients (RootWallet
RootID) can safely push/pull secrets over the public gateway proxy.
Security & correctness:
- Add Ed25519 ownership auth on push/pull. A record's identity must equal
SHA-256(pubkey); every request carries a signature over a canonical,
domain-separated message (vault-push-v1 / vault-pull-v1), verified in both
the Go gateway (ownership.go) and the Zig guardian (auth/ownership.zig).
Closes the password-oracle: knowing an identity no longer lets you read or
overwrite it.
- Gateway<->guardian challenge/session handshake (guardian_auth.go): the
gateway authenticates to each WireGuard-internal guardian before relaying,
fixing silent ack_count:0 writes. Session token is built from the original
identity (not the echoed response).
- Version-consistent reads: group shards by version and reconstruct from a
single committed version using its stored threshold; 409 on rollback,
503 (not 200) below quorum.
Recoverability:
- Quorum invariant K=max(2,floor(N/3)), W=min(N,max(K+1,ceil(2N/3))) mirrored
across shamir.go, quorum.zig and the TS SDK, with tests; W>K guarantees a
successful write is recoverable.
- Persist {version, threshold} commit metadata (file_store.zig) and a
persistent per-guardian integrity key separate from the ephemeral server
secret, so integrity survives restarts.
- Heap-sized request/response buffers for large envelopes (listener.zig).
Docs: correct the threshold table in developer/vault.mdx.