Keep destination SSH options off the jumphost - #790
Open
sdmcclain wants to merge 1 commit into
Open
Conversation
Jumphost mode launches two independent SSH processes: one bootstraps the destination through ProxyJump, while the other starts the relay directly on the jumphost. --ssh-option configures the destination and should not be replayed on that second connection. Replaying destination options on the jumphost breaks deployments whose target and jump host use different users, identities, host keys, or trust policy. It can also weaken jumphost verification when a destination-only option disables a check. Preserve the jumphost user, port, host, alias, and IPv6 parsing added in MisterTea#705, but let jump-specific policy resolve from the jumphost SSH configuration. Add a regression test that records both SSH calls and verifies every destination option remains on the target bootstrap while none reaches the direct jumphost invocation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #790 +/- ##
==========================================
+ Coverage 87.14% 87.22% +0.08%
==========================================
Files 75 75
Lines 6462 6489 +27
Branches 610 611 +1
==========================================
+ Hits 5631 5660 +29
+ Misses 831 829 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
|
@copilot rebase this on latest master |
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
--ssh-optionvalues on the independent jumphost relay connectionRationale
Jumphost mode launches two SSH processes with different destinations and often different users, identities, host keys, and trust policies. Copying target-only options onto the direct jumphost call can both break valid ProxyJump setups and unintentionally weaken jumphost verification.
Jump-specific policy continues to resolve independently from the jumphost's SSH configuration.
Testing
git diff --check; patch applies cleanly to bothmasterand therelease/v7.0.0 branch