Skip to content

Update SSH Agent deep dive with architecture of v2#828

Open
neuronull wants to merge 6 commits into
mainfrom
dn/pm-32892/update-ssh-agent-deep-dive
Open

Update SSH Agent deep dive with architecture of v2#828
neuronull wants to merge 6 commits into
mainfrom
dn/pm-32892/update-ssh-agent-deep-dive

Conversation

@neuronull

@neuronull neuronull commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-32892

📔 Objective

With the v2 of the SSH Agent, we completely re-architected it to be our own native solution and not depend on bitwarden-russh fork.

The existing deep dive on the subject is mostly generalized background information for on SSH key and agent mechanics.

This change preserves those pages and adds a new architecture doc for the v2 of the agent, complete with detailed architecture diagrams.

@neuronull neuronull self-assigned this Jul 2, 2026
@neuronull neuronull added the documentation Improvements or additions to documentation label Jul 2, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying contributing-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f11e692
Status: ✅  Deploy successful!
Preview URL: https://3813f4bd.contributing-docs.pages.dev
Branch Preview URL: https://dn-pm-32892-update-ssh-agent.contributing-docs.pages.dev

View logs

@neuronull neuronull requested review from MGibson1 and quexten July 2, 2026 21:05
@neuronull neuronull marked this pull request as ready for review July 2, 2026 21:05
@neuronull neuronull requested a review from a team as a code owner July 2, 2026 21:05
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed this documentation-only PR that adds a new SSH Agent v2 architecture deep dive, restructures the ssh/ folder (renaming the old index.md/agent.md into topic-named pages plus a new index.mdx landing page), and updates the cross-reference in lock-states.md. All internal links and the renamed paths are consistent, and the autogenerated sidebar picks up the new files. Two prior review threads (top-level headings, alt-text backticks) were resolved by the author and are not reopened. Remaining findings are minor.

Code Review Details
  • 🎨 : Grammar typos in new prose ("its", "each", "the")
    • docs/architecture/deep-dives/ssh/bitwarden-ssh-agent-architecture.md:22
  • ❓ : Alphabetical autogenerated sidebar surfaces the architecture doc before the intro pages
    • docs/architecture/deep-dives/ssh/index.mdx:4

Comment thread docs/architecture/deep-dives/ssh/bitwarden-ssh-agent-architecture.md Outdated
Comment thread docs/architecture/deep-dives/ssh/bitwarden-ssh-agent-architecture.md Outdated
@withinfocus withinfocus added the ai-review Request a Claude code review label Jul 6, 2026
from the vault and sent to the agent. The agent server is started and it’s keystore populated with
the new keys.

The Bitwarden SSH Agent server spawns a thread to handle any each new client connection. Each

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨 SUGGESTED: A few grammar typos in the new prose worth cleaning up.

Details
  • Line 22: "it's keystore" → "its keystore" (possessive)
  • Line 25: "spawns a thread to handle any each new client connection" → "spawns a thread to handle each new client connection"
  • Line 76: "is a the orchestrator" → "is the orchestrator"
  • Line 106: "based on it's authorization policy" → "based on its authorization policy"

These are not caught by spellcheck since each word is individually valid.

# SSH Keys and SSH Agent

This section contains pages that build an understanding of what SSH keys are, what an SSH Agent is,
and how the Bitwarden SSH Agent is architected and implemented.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QUESTION: The sidebar for this section is autogenerated and ordered alphabetically, so pages will appear as bitwarden-ssh-agent-architecturewhat-are-ssh-keyswhat-is-an-ssh-agent. That surfaces the advanced architecture doc before the introductory pages, which inverts the "keys → agent → architecture" progression this index describes. Was that ordering intentional, or would sidebar_position frontmatter help present them in reading order?

@withinfocus withinfocus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to see this until now but it seems we have not gotten the word out sufficiently on where documentation should go -- see https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1774977070/Documentation+Patterns. There is essentially a moratorium on expanding these deep dive pages and they should exist "close to code" so that they can aid other engineers and AI more directly. This being in GitHub will also empower you to render your diagrams natively.

I don't know how heavily linked this is, but the page(s) should leave entirely or be more of a launch point, and deep dives that do remain are more of a necessary evil when the spread of a feature goes beyond a single repo.

@@ -0,0 +1,4 @@
# SSH Keys and SSH Agent

This section contains pages that build an understanding of what SSH keys are, what an SSH Agent is,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⛏️ Please remove all the "this section" language -- it's implied. Go right into the content.

@@ -0,0 +1,188 @@
# Bitwarden SSH Agent architecture

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Per my other comments, why can't this just be one SSH agent architecture page? I don't think we need the reorganization and it would be prudent to go the other way and be simpler.

:::

## What are SSH Keys?
# What are SSH keys?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Explaining what an SSH key is, briefly, was acceptable as preamble to the prior main content but ... does not need to be something we explain ourselves. You can get rid of key and agent explanation.

@@ -0,0 +1,188 @@
# Bitwarden SSH Agent architecture

![`Bitwarden SSH Agent high level`](./ssh-agent-v2-highlevel.png#center)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ We use Mermaid for all documentation diagrams (via code) now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants