Skip to content

Fix WebUI SSH sessions in Proxy Recording mode#60299

Merged
Joerger merged 3 commits intomasterfrom
joerger/fix-proxy-rec-webui
Oct 17, 2025
Merged

Fix WebUI SSH sessions in Proxy Recording mode#60299
Joerger merged 3 commits intomasterfrom
joerger/fix-proxy-rec-webui

Conversation

@Joerger
Copy link
Copy Markdown
Contributor

@Joerger Joerger commented Oct 16, 2025

Changelog: Fixed a bug in Proxy Recording Mode that causes SSH sessions in the WebUI to fail.

In #54227, we began to set client.AddKeysToAgent = "auto" by default instead of setting it to "". This broke the WebUI with Proxy Recording mode. Since the system agent is not relevant to the WebUI, I'ved updated the WebUI client to explicitly set AddKeysToAgent = no.

The root cause of this breakage (which I've added a test for) is actually from #17610, where keyagent.Signers overwrote the signers from the local agent with the signers in the key agent. In the case of the WebUI, the client key is never actually loaded into the system agent, only manually loaded into the local agent, so this overwrite results in 0 signers, rather than the redundant, duplicate signers expected.

Note: if you tsh login and add the keys to your system agent, then you would bypass the bug, as your system agent keys would be used by the WebUI.

Fixes #60295

@Joerger Joerger changed the title Fix WebUI SSH sessions in Proxy Recording mode. Fix WebUI SSH sessions in Proxy Recording mode Oct 16, 2025
@Joerger Joerger force-pushed the joerger/fix-proxy-rec-webui branch from dacd6c6 to 2edc575 Compare October 16, 2025 23:02
@Joerger Joerger marked this pull request as ready for review October 16, 2025 23:09
Copy link
Copy Markdown
Contributor

@cthach cthach left a comment

Choose a reason for hiding this comment

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

Great detective work and well done. I seriously appreciate that you took the time to write a really good PR description, which helped me understand the problem and solution quickly.

Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

Confirming that I've manually tested that sessions established in the UI are functional with this change.

@Joerger Joerger added this pull request to the merge queue Oct 17, 2025
Merged via the queue into master with commit 3da9514 Oct 17, 2025
46 checks passed
@Joerger Joerger deleted the joerger/fix-proxy-rec-webui branch October 17, 2025 17:03
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@Joerger See the table below for backport results.

Branch Result
branch/v17 Create PR
branch/v18 Create PR

mmcallister pushed a commit that referenced this pull request Nov 6, 2025
* Set AddKeysToAgent to no for WebUI clients; Remove unused code.

* Fix Signers method which overwrites local agent keys with system agent keys.

* Add test.
mmcallister pushed a commit that referenced this pull request Nov 19, 2025
* Set AddKeysToAgent to no for WebUI clients; Remove unused code.

* Fix Signers method which overwrites local agent keys with system agent keys.

* Add test.
mmcallister pushed a commit that referenced this pull request Nov 20, 2025
* Set AddKeysToAgent to no for WebUI clients; Remove unused code.

* Fix Signers method which overwrites local agent keys with system agent keys.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connecting to a Node in the WebUI w/ Proxy Recording Mode fails (v17.4.7+)

3 participants