Commit 112db8a
feat(agent,core): organization-key support; tui: Space reveals from any pane (#47)
Two fixes from daily-driving Vault against a Bitwarden-cloud account whose
vault is almost entirely organization/Collection-owned.
Organization-key support (the bulk of the change):
- Vault decrypted only personal ciphers (and per-cipher keys under the user
key); organization items — ~99% of a Collections-heavy vault — were skipped,
their fields being encrypted under an org key Vault didn't hold. At unlock the
agent now recovers the account RSA private key from `profile.privateKey`,
RSA-OAEP-SHA1-unwraps each `profile.organizations[].key` into that org's
symmetric key, and routes every cipher's decryption by `organization_id`
(org key vs user key). Works online and from the offline cache. New
`vault_core::org_key` module + `rsa` dependency (`ring` has no RSA
decryption); justified RUSTSEC-2023-0071 ignore in deny.toml / CI. Items whose
org key can't be unwrapped are still skipped; editing org items is refused for
now (the write path would re-encrypt under the wrong key).
TUI Space-to-reveal:
- `Space` revealed a login's password from the item list but did nothing in the
detail pane (logins have no per-field rows) or the folder pane. Target
resolution moved into a testable `App::reveal_target`, so `Space` reveals from
all three panes; cards/identities still reveal the cursor-selected masked
field in the detail pane.
Tests: RSA round-trip, org-cipher decrypt + edit-refusal, reveal_target across
panes/types. Full `just ci` green; verified live (2274 items decrypt).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5a6a8e7 commit 112db8a
15 files changed
Lines changed: 635 additions & 32 deletions
File tree
- .github/workflows
- crates
- vault-agent/src
- vault-api/src
- vault-core
- src
- vault-tui/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
70 | 92 | | |
71 | 93 | | |
72 | 94 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
0 commit comments