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

doc: Improve article on HTTPS #9896

Merged
merged 4 commits into from
Jan 7, 2015
Merged

Conversation

lorenzleutgeb
Copy link
Contributor

  1. Don't encrypt private keys so encryption does not have to be stripped later on.
  2. Use AES instead of DES to encrypt CA key. Explicitly use SHA256 to avoid bad defaults.
  3. Let OpenSSL handle serial file on it's own so we do not have to care about it.

My editor deleted some whitespace, but I think that's reasonable.

Do not encrypt private keys in the first place, if the encryption
is stripped anyway.

Signed-off-by: Lorenz Leutgeb <lorenz.leutgeb@gmail.com>
Use AES (the successor of DES) to encrypt private key. Further
reading:

 * http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf
 * https://ssllabs.com/downloads/SSL_TLS_Deployment_Best_Practices.pdf
   "3DES provides about 112 bits of security. This is below the
    recommended minimum of 128 bits, but it's still strong enough. A
    bigger practical problem is that 3DES is much slower than the
    alternatives. Thus, we don't recommend it for performance reasons,
    but it can be kept at the end of the cipher list for
    interoperability with very old clients."

 * http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/SP-800-67-Rev1.pdf

Use SHA256 for our CA. This avoids accidental use of SHA1 or MD5 which
could be default values.

Signed-off-by: Lorenz Leutgeb <lorenz.leutgeb@gmail.com>
With -CAcreateserial the serial file will be automatically created
and initialized if it is missing.

Signed-off-by: Lorenz Leutgeb <lorenz.leutgeb@gmail.com>
@SvenDowideit
Copy link
Contributor

mmm, nice - LGTM @fredlf @jamtur01

Using --insecure is (you guessed it) *insecure* as the server side
certificate is not being validated. To offer the same degree of
security as invocations of the docker client in "Secure by default"
with cURL, the trusted CA certificate must be supplied.

Signed-off-by: Lorenz Leutgeb <lorenz.leutgeb@gmail.com>
@fredlf
Copy link
Contributor

fredlf commented Jan 6, 2015

LGTM from a language/docs point of view, but I need to know it's been validated before we merge. @SvenDowideit did you run through the procedure? I'll do it if not.

@jamtur01
Copy link
Contributor

jamtur01 commented Jan 6, 2015

LGTM

@lorenzleutgeb
Copy link
Contributor Author

Assuming the changes I provided up until now are validated, I'd like to drive this a bit further:

Would you like to see

  1. instructions to clean up after everything is set: Simply rm server.csr client.csr extfile.cnf as those files are not needed anymore.
  2. warning/note on permissions: With a common umask of 022 server.key and client.key are world-readable which is very likely a bad thing. I personally also remove write permission on all keys and certificates to prevent accidental damage.
  3. a new PR for (1.) and/or (2.)?

@SvenDowideit
Copy link
Contributor

I'm working through it now..

@SvenDowideit
Copy link
Contributor

ok, i've tested, and it works in debian - @FlowLo

@SvenDowideit
Copy link
Contributor

yes, please make a follow-on PR - I'm going to merge LGTM :)

SvenDowideit added a commit that referenced this pull request Jan 7, 2015
doc: Improve article on HTTPS
@SvenDowideit SvenDowideit merged commit 2f588c6 into moby:master Jan 7, 2015
SvenDowideit added a commit to SvenDowideit/docker that referenced this pull request Jan 27, 2015
doc: Improve article on HTTPS
(cherry picked from commit 2f588c6)

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@users.noreply.github.com> (github: SvenDowideit)
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

Successfully merging this pull request may close these issues.

None yet

5 participants