-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman ssh work, using new c/common interface #15094
Conversation
this is a huge one. I need to add tests, opening this to see what breaks. @vrothberg @jwhonce @rhatdan @mheon PTAL |
@jwhonce why did any of these tests pass to begin with? They are failing now because the way I made ssh, it tests the connections given. Is that unexpected behavior? yeah it seems podman main does not actually validate the given connections.... I guess I can add this logic back into my c/common PR podman/cmd/podman/system/connection/add.go Lines 111 to 114 in ef6f5a9
|
3f95482
to
b259e10
Compare
fingers crossed all tests pass on this run. If they do, we can merge containers/common#1094 |
We don't care about the bloat test, although you should have dropped all of ssh directory from this repo as well. |
I'll make sure they are all gone. it is not referenced in go.mod but it is in modules.txt |
We care very much about the bloat! @cdoern Is the use of |
@Luap99 sftp replaces the quite janky library: Line 30 in a43cfc1
everything else is vendor bloat, I understand sftp is a big change but it is all in c/common not in here (even though the impacts are seen here). The ask was for two approaches: one fully golang (ssh +sftp) the other to be fully native (openSSH). This is the simplest way to do that. |
I could continue to use the above library or fork it and make my own version of it. I am wary of the crippling dependency though, thats why I got rid of it. If that repo magically stops working, scp fully breaks. |
I am totally fine if you think this is better I just wanted to bring this up since I would have expected less bloat. |
yeah that was my logic. I wish this was a bit smaller, but it seems like this is the minimum size to get all of the features we want. |
7c95a68
to
de5be35
Compare
f949d75
to
bda21c9
Compare
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.
(Not really a review, just a skim for the thing we are dealing with in c/common.)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
implement new ssh interface into podman this completely redesigns the entire functionality of podman image scp, podman system connection add, and podman --remote. All references to golang.org/x/crypto/ssh have been moved to common as have native ssh/scp execs and the new usage of the sftp package. this PR adds a global flag, --ssh to podman which has two valid inputs `golang` and `native` where golang is the default. Users should not notice any difference in their everyday workflows if they continue using the golang option. UNLESS they have been using an improperly verified ssh key, this will now fail. This is because podman was incorrectly using the ssh callback method to IGNORE the ssh known hosts file which is very insecure and golang tells you not yo use this in production. The native paths allows for immense flexibility, with a new containers.conf field `SSH_CONFIG` that specifies a specific ssh config file to be used in all operations. Else the users ~/.ssh/config file will be used. podman --remote currently only uses the golang path, given its deep interconnection with dialing multiple clients and urls. My goal after this PR is to go back and abstract the idea of podman --remote from golang's dialed clients, as it should not be so intrinsically connected. Overall, this is a v1 of a long process of offering native ssh, and one that covers some good ground with podman system connection add and podman image scp. Signed-off-by: Charlie Doern <[email protected]>
LGTM |
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.
/lgtm
Just to add a reverse link, #15031 discusses |
implement new ssh interface into podman
this completely redesigns the entire functionality of podman image scp,
podman system connection add, and podman --remote. All references to golang.org/x/crypto/ssh
have been moved to common as have native ssh/scp execs and the new usage of the sftp package.
this PR adds a global flag, --ssh to podman which has two valid inputs
golang
andnative
where golang is the default.Users should not notice any difference in their everyday workflows if they continue using the golang option. UNLESS they have been using an improperly verified ssh key, this will now fail. This is because podman was incorrectly using the ssh callback method to IGNORE the ssh known hosts file which is very insecure and golang tells you not yo use this in production.
The native paths allows for immense flexibility, with a new containers.conf field
SSH_CONFIG
that specifies a specific ssh config file to be used in all operations. Else the users ~/.ssh/config file will be used.podman --remote currently only uses the golang path, given its deep interconnection with dialing multiple clients and urls.
My goal after this PR is to go back and abstract the idea of podman --remote from golang's dialed clients, as it should not be so intrinsically connected. Overall, this is a v1 of a long process of offering native ssh, and one that covers some good ground with podman system connection add and podman image scp.
Signed-off-by: Charlie Doern [email protected]
Does this PR introduce a user-facing change?