feat: OnlyKey Vault — hardware-backed secret protection via FIDO2#1
Open
feat: OnlyKey Vault — hardware-backed secret protection via FIDO2#1
Conversation
… bridge Secrets encrypted with per-record AES-256-GCM keys, wrapped using shared secrets derived from OnlyKey's FIDO2/WebAuthn bridge. OneCLI stores NO private decryption keys — recovery requires browser + OnlyKey hardware. Rust gateway (apps/gateway/src/vault/): - HKDF-SHA256 key derivation + AES-256-GCM wrap/unwrap/encrypt/decrypt - In-memory unlock cache with absolute TTL, idle timeout, scoped unlocks - Revocation by record/agent/browser-session/all + periodic cleanup - API: access, lock, pending approvals, browser approve, admin controls - Vault records checked during CONNECT resolution alongside existing secrets Browser bridge (apps/web/src/lib/vault/): - Real node-onlykey integration via ok.derive_shared_secret() - TypeScript types mirroring Rust models - Gateway API client with polling for pending approvals Next.js UI (apps/web/src/app/(dashboard)/vault/): - OnlyKey connection status + pending approval cards - Approve/deny/lock controls with touch-to-approve UX Database (packages/db/prisma/): - VaultRecord, VaultApprovalRequest, VaultAuditEvent models - Policy: TTL, idle timeout, cache scope, per-agent permissions - Versioning for cache invalidation (record/policy/key/unlock generation) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ok.derive_shared_secret). OneCLI stores NO private decryption keys — recovery requires browser + OnlyKey hardware presence.node-onlykeylibrary, with polling-based approval UI in the Next.js dashboard.Architecture
New files (22 files, ~3000 lines)
Rust gateway (
apps/gateway/src/vault/):mod.rs,models.rs,crypto.rs,cache.rs,db.rs,api.rsBrowser bridge (
apps/web/src/lib/vault/):types.ts,onlykey.ts,api.ts,index.tsNext.js UI (
apps/web/src/app/(dashboard)/vault/): page + componentsDatabase: Prisma schema + SQL migration for
VaultRecord,VaultApprovalRequest,VaultAuditEventKey design decisions
ok.derive_shared_secret()— deterministic re-derivation without storing private keysTest plan
cargo testpasses for vault crypto (HKDF, AES-GCM round-trips, wrap/unwrap)cargo testpasses for vault cache (TTL, idle, revocation, cleanup)pnpm db:migrateto apply the new migration🤖 Generated with Claude Code