mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-07 21:10:55 +08:00
Building upon the prior SSH agent v2 commits, this PR introduces the high level interfaces between the napi layer, the agent, and the underlying server. Two traits are defined to act as abstraction layers: AuthPolicy allows the underlying server to externally request authorization to complete the various ssh operation requests it receives. The implementation of this in the BitwardenSshAgent is effectively the agent's business logic, and has unit tests accordingly. ApprovalRequester allows the agent to externally request approval for those authorization requests. These interfaces allow better unit test-ability and integration test-ability, and additionally are context-independent from each other; meaning the ssh agent server doesn't know about vault items, or that there is an electron app at all. Similarly, the agent knows it needs to request approval, but it doesn't have to be from an Electron app. Co-authored-by: Bernd Schoolmann <mail@quexten.com> |
||
|---|---|---|
| .. | ||
| browser | ||
| cli | ||
| desktop | ||
| web | ||