-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/crypto/ssh: allow to configure public key authentication algorithms on the server side #61244
Comments
CC @golang/security |
For #56561. Not a fan of yet another knob, but I don't have a better idea and LGTM. |
Change https://go.dev/cl/510775 mentions this issue: |
This proposal has been added to the active column of the proposals project |
Are people generally in favor of this? Have all remaining concerns been addressed? |
In short, I agree with Filippo: not pretty, but OK to add.
This is only about disabling RSA signatures on SHA1 digests? (You can disable ssh-dss by rejecting any keys in the PublicKeyCallback). If I could redesign this from scratch, I'd pass the algorithm as an extra parameter to ServerConfig.PublicKeyCallback, then we wouldn't need this extra knob. The extra knob does have a slight performance advantage, because it also avoids an extra roundtrip where the client offers a public key only to have it be rejected. |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Currently supportedPubKeyAuthAlgos is hard-coded and contains all supported public key authentication algorithms.
Algorithms and signature formats not included in that list are not accepted by our server implementation.
I propose to make it configurable to allow to disable the weaker algorithms, for example
ssh-dss
orssh-rsa
.A simple implementation would be to add them to the ServerConfig struct:
This is consistent with the way we currently allow to customize
KeyExchanges
,Ciphers
andMACs
.An alternative to consider is to add a callback to the ServerConfig struct, for example
this would allow for more flexibility, for example allowing algorithms based on the client version, but if we are to go this route we should probably allow the same for
KeyExchanges
,Ciphers
andMACs
as well and it is probably better to think about something more generic using a single callback for all the customizable algorithms.The text was updated successfully, but these errors were encountered: