-
Notifications
You must be signed in to change notification settings - Fork 17.5k
Remove DSSKey references from SSH provider, bump paramiko to 4.0+ #69191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
691450d
remove paramiko.DSSKey from _pkey_loaders and "dss": paramiko.DSSKey …
joshuabvarghese bf7fc29
paramiko>=3.5.1,<4.0.0 → paramiko>=4.0.0
joshuabvarghese ee8db63
"types-paramiko>=3.4.0.20240423,<4.0.0" (with the TODO comment) → "ty…
joshuabvarghese 9c17b6f
Newsfragment
joshuabvarghese 22eacaa
regenerate lockfile against the new constraints
joshuabvarghese b9e3d56
Merge branch 'main' into 54079-remove-dsskey
joshuabvarghese 80bdc52
Merge branch 'main' into 54079-remove-dsskey
joshuabvarghese 7fe4fa3
Merge branch 'main' into 54079-remove-dsskey
joshuabvarghese b170691
Merge branch 'main' into 54079-remove-dsskey
joshuabvarghese File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| The SSH and SFTP providers now require ``paramiko>=4.0.0``, which drops support for DSA (DSS) | ||
| private keys. Connections that rely on a DSA key must generate a new RSA, ECDSA, or Ed25519 key | ||
| and update the connection's ``key_file`` or ``private_key`` accordingly. |
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a handler or document to avoid regression. For example, if users configured
ssh-dssinhost_keyand then upgrade the ssh provider, this can fail with aKeyError.e.g.
A connection like this:
would fail here because
dsshas been removed from_host_key_mappings:airflow/providers/ssh/src/airflow/providers/ssh/hooks/ssh.py
Lines 229 to 232 in 4d56e6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, add a small regression test might be better I think :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this, @nailo2c you're right, the host_key lookup would have hit a bare KeyError for anyone with an ssh-dss host key configured. Good catch.
Looking at this more, I noticed #69669 also addresses this issue and goes further — it fixes the equivalent regression in the SFTP hook too (which mine doesn't touch), handles more host key type variants (ecdsa-sha2-nistp*, legacy ssh-ecdsa, whitespace/tab-separated formats), and caps the paramiko version bound more carefully.
I'll close this one in favor of that PR rather than duplicate effort. Thanks again for the review!