Skip to content

[DOCS] Adds certutil http command to TLS setup steps #51241

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

Merged
merged 14 commits into from
Feb 21, 2020
Merged

Conversation

lcawl
Copy link
Contributor

@lcawl lcawl commented Jan 20, 2020

@lcawl lcawl added >docs General docs changes :Security/TLS SSL/TLS, Certificates v8.0.0 v7.6.0 v7.7.0 labels Jan 20, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Network)

@lcawl
Copy link
Contributor Author

lcawl commented Jan 20, 2020

@elasticmachine run elasticsearch-ci/docs


** If the certificate is in PEM format, add the following information to the
If you did not use the `elasticsearch-certutil http` command and you have
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using elasticsearch-certutil http doesn't necessarily mean they did not end up with a PEM file. For instance, they could have used elasticsearch-certutil http to generate a CSR that they then took to their CA to sign and get back a PEM encoded certificate

@lcawl
Copy link
Contributor Author

lcawl commented Jan 21, 2020

@elasticmachine run elasticsearch-ci/bwc

@lcawl lcawl marked this pull request as ready for review January 22, 2020 18:24
@lcawl lcawl requested a review from tvernum January 22, 2020 18:24
[source, yaml]
--------------------------------------------------
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/elastic-certificates.p12 <1>
xpack.security.http.ssl.truststore.path: certs/elastic-certificates.p12 <2>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tvernum I noticed that the output from the elasticsearch-certutil http command did not mention setting the truststore.path, so I've removed it here too. If it's still required, let me know and I'll re-add it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required.

Technically, setting a truststore would configure which certificates the server would trust if we had clientAuthentication enabled (PKI). We don't need that.

It's also used by setup-passwords, but if no truststore is configured, it will assume that the keystore has the correct certificates and trust that, so it all works without needing any special config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

[source, yaml]
--------------------------------------------------
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/elastic-certificates.p12 <1>
xpack.security.http.ssl.truststore.path: certs/elastic-certificates.p12 <2>
xpack.security.http.ssl.keystore.path: "http.p12"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that since we talked about using a certs folder in previous examples, it should be used here too:

Suggested change
xpack.security.http.ssl.keystore.path: "http.p12"
xpack.security.http.ssl.keystore.path: certs/http.p12

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should drop the certs/ part entirely?
We don't use it in the PEM examples (and that uses more files)

[source, yaml]
--------------------------------------------------
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/elastic-certificates.p12 <1>
xpack.security.http.ssl.truststore.path: certs/elastic-certificates.p12 <2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required.

Technically, setting a truststore would configure which certificates the server would trust if we had clientAuthentication enabled (PKI). We don't need that.

It's also used by setup-passwords, but if no truststore is configured, it will assume that the keystore has the correct certificates and trust that, so it all works without needing any special config.

@lcawl
Copy link
Contributor Author

lcawl commented Jan 24, 2020

@elasticmachine update branch

+
--
Copy the applicable `.p12` files into the {es} configuration directory on each
node. There is no need to copy the CA file to this directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to copy the CA file to this directory.

Not sure what we originally meant with this, I guess we assumed that the CA certificate is part of the PKCS#12 that we would create and then users wouldn't need to copy the CA certficate by itself in addition. In any case, I feel this makes assumptions on the setup and is not very helpful so why not take the opportunity to remove this sentence

@lcawl
Copy link
Contributor Author

lcawl commented Feb 13, 2020

@elasticmachine update branch

@tvernum tvernum self-requested a review February 19, 2020 20:36
Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Lisa.

@jkakavas jkakavas self-requested a review February 21, 2020 08:40
Copy link
Member

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay, this fell through the cracks

@lcawl
Copy link
Contributor Author

lcawl commented Feb 21, 2020

@elasticmachine update branch

@lcawl lcawl merged commit 01a6dae into elastic:master Feb 21, 2020
@lcawl lcawl deleted the tls-http branch February 21, 2020 18:04
lcawl added a commit that referenced this pull request Feb 21, 2020
lcawl added a commit that referenced this pull request Feb 21, 2020
@lcawl lcawl added v7.6.1 and removed v7.6.0 labels Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Security/TLS SSL/TLS, Certificates v7.6.1 v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants