Skip to content
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

Configure cryptography parameters for downstream side #354

Open
Nils98Ar opened this issue Mar 31, 2024 · 5 comments
Open

Configure cryptography parameters for downstream side #354

Nils98Ar opened this issue Mar 31, 2024 · 5 comments

Comments

@Nils98Ar
Copy link

Is this possible somehow? E.g. restricting the allowed cryptography algorithms.

It would also be okay to build a new image from source or from base image.

@Nils98Ar Nils98Ar changed the title Configure cryptography parameter for downstream side Configure cryptography parameters for downstream side Mar 31, 2024
@tg123
Copy link
Owner

tg123 commented Mar 31, 2024

no cmd settings now
but if you prefer compile yourself, you can set it here

p, err := ssh.NewSSHPiperConn(c, &d.config.PiperConfig)

d.config.PiperConfig.PublicKeyAuthAlgorithms

PR is welcomed

@Nils98Ar
Copy link
Author

Nils98Ar commented Apr 2, 2024

@tg123

I have never worked with go before but I think it would be good to configure this via config file and environment variables?

This seems to be the default?
https://github.com/golang/crypto/blob/v0.21.0/ssh/common.go#L142-L148

@Nils98Ar
Copy link
Author

Nils98Ar commented Apr 2, 2024

These are also interesting regarding security: supportedCiphers, preferredCiphers, supportedKexAlgos, serverForbiddenKexAlgos, preferredKexAlgos, supportedHostKeyAlgos, supportedMACs, hashFuncs.

Would it rather make sense to configure those per pipe or globally (e.g. in a downstream_config.yaml)?

@tg123
Copy link
Owner

tg123 commented Apr 3, 2024

no config file yet, but will add them to sshpiperd cmd args

@Nils98Ar
Copy link
Author

Nils98Ar commented Apr 4, 2024

@tg123 Would we rather configure the ones from ssh/server.go (e.g. PublicKeyAuthAlgorithms) or from ssh/common.go (e.g. supportedPubKeyAuthAlgos). I think the latter has more options which are used as default for the former.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants