feat: Support per-jump-host SSH private key configuration#169
Merged
Conversation
Add support for configuring separate SSH keys for jump hosts independent of destination node keys. Jump hosts can now use structured YAML format with optional ssh_key field while maintaining backward compatibility with string format. Key changes: - Add ssh_key field to JumpHost struct - Create JumpHostConfig enum supporting Simple(String) and Detailed formats - Update config resolver with get_jump_host_with_key methods - Implement SSH key priority: jump host key > cluster key > agent > defaults - Add comprehensive tests for config parsing and auth priority - Update documentation and example config
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
Implements #167: Support per-jump-host SSH private key configuration in config.yaml
This PR adds the ability to configure separate SSH keys for jump hosts, independent of destination node keys. Users can now specify different keys for bastion hosts versus internal nodes, addressing environments where:
Changes
Core Implementation
ssh_key: Option<String>field#[serde(untagged)]enum supporting both:Simple(String): Legacy format"user@host:port"Detailed: Structured format withhost,user,port,ssh_keyfieldsget_jump_host_with_key()methods to return both connection string and ssh_keydetermine_auth_method()to prioritize jump host's own ssh_key over cluster keyConfiguration Format
Legacy string format (backward compatible):
New structured format with dedicated key:
SSH Key Priority Order
ssh_keyfield (from structured config)ssh_key(fallback)Testing
New Tests
tests/jump_host_config_test.rs: 13 new tests for config parsingsrc/jump/chain/auth.rs: 2 new auth priority testsTest Results
Documentation
example-config.yamlwith both legacy and structured format examplesdocs/architecture/ssh-jump-hosts.mdwith implementation detailsBackward Compatibility
✅ All existing configurations continue to work without changes
✅ String format
jump_host: "user@host:port"fully supported✅ Multi-hop chains work with mixed formats
✅ No breaking changes to API or behavior
Example Use Case
Checklist
Related Issues
Closes #167