-
Notifications
You must be signed in to change notification settings - Fork 107
tlsconfig: Remove support for encrypted TLS private keys #120
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
tlsconfig: Remove support for encrypted TLS private keys #120
Conversation
ec287d9 to
a3779e8
Compare
tlsconfig/config.go
Outdated
| func IsErrEncryptedKey(err error) bool { | ||
| return errors.Is(err, x509.IncorrectPasswordError) | ||
| } | ||
| var errEncryptedKeyDeprecated = errors.New("private key is encrypted; support for encrypted private keys has been deprecated, see https://docs.docker.com/go/deprecated/") |
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.
Deprecated by Go, but no longer allowed here ... so, should the message say obsolete or unsupported instead of deprecated?
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.
I was going back-and-forth a bit on the best error; initially I used the same one as we use in the CLI, which links to our docs.docker.com for the deprecation;
errors.New("private key is encrypted - support for encrypted private keys has been removed, see https://docs.docker.com/go/deprecated/")But I wasn't sure if we wanted to keep this module a bit separate from "docker", so tried to keep it a bit more agnostic, therefore linked to the Go issue.
Let me try to update it
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.
Oh! LOL, just realised that I did include the link to docs.docker.com.
Either way; I tweaked the error, but better suggestions more than welcome!
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.
Looks good! Thank you.
> Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since > it does not authenticate the ciphertext, it is vulnerable to padding oracle > attacks that can let an attacker recover the plaintext From https://go-review.googlesource.com/c/go/+/264159 > It's unfortunate that we don't implement PKCS#8 encryption so we can't > recommend an alternative but PEM encryption is so broken that it's worth > deprecating outright. This feature allowed using an encrypted private key with a supplied password, but did not provide additional security as the encryption is known to be broken, and the key is sitting next to the password in the filesystem. Users are recommended to decrypt the private key, and store it un-encrypted to continue using it. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
a3779e8 to
bc33254
Compare
From https://go-review.googlesource.com/c/go/+/264159
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)