-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Allow custom SFTP algorithm selection #19636
Merged
Merged
Conversation
This file contains 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
Allow custom algorithms for various parts of SFTP. Algorithms are comma separated. Note that valid values does not in all cases represent default values. `--sftp=pub-key-algos=...` specifies the supported client public key authentication algorithms. Note that this doesn't include certificate types since those use the underlying algorithm. This list is sent to the client if it supports the server-sig-algs extension. Order is irrelevant. Valid values ``` ssh-ed25519 sk-ssh-ed25519@openssh.com sk-ecdsa-sha2-nistp256@openssh.com ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 rsa-sha2-256 rsa-sha2-512 ssh-rsa ssh-dss ``` `--sftp=kex-algos=...` specifies the supported key-exchange algorithms in preference order. Valid values: ``` curve25519-sha256 curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group16-sha512 diffie-hellman-group14-sha1 diffie-hellman-group1-sha1 ``` `--sftp=cipher-algos=...` specifies the allowed cipher algorithms. If unspecified then a sensible default is used. Valid values: ``` aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com chacha20-poly1305@openssh.com arcfour256 arcfour128 arcfour aes128-cbc 3des-cbc ``` `--sftp=mac-algos=...` specifies a default set of MAC algorithms in preference order. This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed because they have reached the end of their useful life. Valid values: ``` hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha1 hmac-sha1-96 ```
zveinn
approved these changes
Apr 30, 2024
harshavardhana
approved these changes
Apr 30, 2024
@klauspost looks that it works only partly. I tested with Docker compose file like this: services:
node:
image: quay.io/minio/minio:RELEASE.2024-05-01T01-11-10Z
command:
- server
- --address=:443
- --certs-dir=/data/certs
- --sftp=address=:22
- --sftp=ssh-private-key=/data/id_ecdsa
- --sftp=pub-key-algos=ssh-ed25519,rsa-sha2-256,rsa-sha2-512
- --sftp=kex-algos=curve25519-sha256,curve25519-sha256@libssh.org
- --sftp=cipher-algos=aes256-ctr,aes192-ctr,aes128-ctr
#- --sftp=mac-algos=hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
- https://minio1/data/{1...2} Which works fine but if I comment out that
|
@olljanat Thanks for the report. I'll check it out. |
klauspost
added a commit
to klauspost/minio
that referenced
this pull request
May 1, 2024
Setting MAC algorithms overwrites cipher algorithms. Followup to minio#19636
1 task
harshavardhana
pushed a commit
that referenced
this pull request
May 1, 2024
Setting MAC algorithms overwrites cipher algorithms. Followup to #19636
2 tasks
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.
Description
Fixes #18986
Allow custom algorithms for various parts of SFTP.
Algorithms are comma separated.
Note that valid values does not in all cases represent default values.
--sftp=pub-key-algos=...
specifies the supported client public key authentication algorithms. Note that this doesn't include certificate types since those use the underlying algorithm. This list is sent to the client if it supports the server-sig-algs extension. Order is irrelevant.Valid values
--sftp=kex-algos=...
specifies the supported key-exchange algorithms in preference order.Valid values:
--sftp=cipher-algos=...
specifies the allowed cipher algorithms. If unspecified then a sensible default is used.Valid values:
--sftp=mac-algos=...
specifies a default set of MAC algorithms in preference order. This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed because they have reached the end of their useful life.Valid values:
How to test this PR?
Add parameters to minio as described.
Types of changes