-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
proposal: x/crypto/ssh: add callbacks to dynamically change server and client configuration #61650
Comments
A style note: we tend to avoid a leading |
proposal updated, thank you! |
Change https://go.dev/cl/519096 mentions this issue: |
On naming: The equivalent in
I think that package-internal consistency is more important than global consistency, so the names in the current proposal of (The general idea of the proposal also seems reasonable to me, but someone more familiar with |
is this really necessary? I think you could wrap the connection into something that gobbles the client version strings, creates a Config and then replays the client version string. Or maybe we can further decompose NewServerConn into something that takes the Client version as well as the net.Conn. |
Adding a callback in the Config that returns a Config is a very confusing API, as it's not obvious in which step the config gets swapped out for something else. |
This comment was marked as spam.
This comment was marked as spam.
See https://go-review.git.corp.google.com/c/crypto/+/538555 for what I mean. Also note (as documented in the change description) that there is really no need to have anything in the |
@hanwen, thank you. So an alternative proposal is this one
maybe add the same to
make the currently private |
I should add: 1) I understand what this issue is asking for, but 2) I find it hard to coherently explain what security benefit it creates. As discussed, the client doesn't have to adapt to the server to begin with. But what use is it for the server to adapt to the client? If the server just supports all algorithms (including the weak ones), a client with a new binary will still get strong algorithms, and an old client will get the weak algorithms. So, what this feature would achieve is that the server looks like it only supports strong algorithms during cursory inspection (eg. probing the server), but it actually is less secure because clients can fallback to something insecure if they say the right version number. The way to increase security is to get clients to upgrade their binaries. Refusing to serve them is the typical way to force this to happen, but if we expose negotiated algorithms (#58523), you could also use a banner message to get that message across. |
I propose to add the following callbacks.
These additions enable many advanced use cases, for example we can enable/disable algorithms, authentication methods, banners etc. depending on the client or server version.
cc @golang/security
The text was updated successfully, but these errors were encountered: