Skip to content

Commit df23ea0

Browse files
author
Adam Locke
authored
Updating certificate location instructions. (#63334) (#63341)
1 parent 199d6aa commit df23ea0

File tree

1 file changed

+50
-43
lines changed

1 file changed

+50
-43
lines changed

x-pack/docs/en/security/securing-communications/node-certificates.asciidoc

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,38 @@ recommended approach for validating certificate authenticity in an {es} cluster
88
is to trust the certificate authority (CA) that signed the certificate. By doing
99
this, as nodes are added to your cluster they just need to use a certificate
1010
signed by the same CA and the node is automatically allowed to join the cluster.
11-
Additionally, it is recommended that the certificates contain subject alternative
12-
names (SAN) that correspond to the node's IP address and DNS name so that
13-
hostname verification can be performed.
11+
Additionally, it is recommended that the certificates contain subject
12+
alternative names (SAN) that correspond to the node's IP address and DNS name
13+
so that hostname verification can be performed.
1414

1515
The {ref}/certutil.html[`elasticsearch-certutil`] command simplifies the process
1616
of generating certificates for the {stack}. It takes care of generating a CA and
1717
signing certificates with the CA. It can be used interactively or in a silent
1818
mode through the use of an input file. It also supports generation of
1919
certificate signing requests (CSR), so that a commercial- or
20-
organization-specific CA can be used to sign the certificates. For example:
20+
organization-specific CA can be used to sign the certificates.
2121

22-
. Optional: Create a certificate authority for your {es} cluster.
22+
NOTE: If you choose not to use `elasticsearch-certutil`, the certificates that
23+
you obtain must allow for both `clientAuth` and `serverAuth` if the extended key
24+
usage extension is present. The certificates need to be in PEM or PKCS#12
25+
format. Although not required, it is highly recommended that the certificate
26+
contain the DNS names and/or IP addresses of the node so that hostname
27+
verification can be used.
28+
29+
. *Optional*: Create a certificate authority for your {es} cluster.
2330
+
2431
--
25-
For example, use the `elasticsearch-certutil ca` command:
32+
Use the <<certutil-ca,`elasticsearch-certutil ca`>> command:
2633

2734
[source,shell]
28-
----------------------------------------------------------
35+
----
2936
bin/elasticsearch-certutil ca
30-
----------------------------------------------------------
37+
----
3138

3239
You can configure the cluster to trust all nodes that have a certificate that
3340
has been signed by this CA.
3441

35-
The command outputs a single file, with a default name of `elastic-stack-ca.p12`.
42+
The command outputs a single file with a default name of `elastic-stack-ca.p12`.
3643
This file is a PKCS#12 keystore that contains the public certificate for your CA
3744
and the private key that is used to sign the certificates for each node.
3845

@@ -44,66 +51,66 @@ retain a copy of the file and remember its password.
4451
. Generate a certificate and private key for each node in your cluster.
4552
+
4653
--
47-
For example, use the `elasticsearch-certutil cert` command:
54+
Use the <<certutil-cert,`elasticsearch-certutil cert`>> command:
4855

4956
[source,shell]
50-
----------------------------------------------------------
57+
----
5158
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
52-
----------------------------------------------------------
59+
----
60+
You are prompted for a password. You can enter a password for your
61+
certificate and key, or you can leave the password blank.
62+
5363
The output is a single PKCS#12 keystore that includes the node certificate, node
5464
key, and CA certificate.
5565

56-
You are also prompted for a password. You can enter a password for your
57-
certificate and key, or you can leave the password blank by pressing Enter.
66+
IMPORTANT: Secure all output files, which contain the private keys
67+
for your instance.
5868

59-
By default `elasticsearch-certutil` generates certificates that have no hostname
60-
information in them (that is, they do not have any Subject Alternative Name
61-
fields). This means that you can use the certificate for every node in your
62-
cluster, but you must turn off hostname verification as shown in the
63-
configuration below.
69+
The `elasticsearch-certutil` command generates certificates that have no
70+
hostname information in them such as SAN fields. This
71+
means that you can use the certificate for every node in your cluster, but you
72+
must turn off hostname verification.
6473

6574
If you want to use hostname verification within your cluster, run the
6675
`elasticsearch-certutil cert` command once for each of your nodes and provide
6776
the `--name`, `--dns` and `--ip` options.
6877

69-
NOTE: You should secure the output files, since they contain the private keys
70-
for your instance.
71-
7278
Alternatively, if you want to use a commercial or organization-specific CA,
73-
you can use the `elasticsearch-certutil csr` command to generate certificate
74-
signing requests (CSR) for the nodes in your cluster. For more information, see
75-
<<certutil>>.
79+
you can use the <<certutil-csr,`elasticsearch-certutil csr`>> command to
80+
generate certificate signing requests (CSR) for the nodes in your cluster.
7681
--
7782

78-
. Optional: Generate additional certificates specifically for encrypting HTTP
79-
client communications.
83+
. *Optional*: Generate additional certificates specifically for encrypting HTTP
84+
client communications.
8085
+
8186
--
82-
For example, use the `elasticsearch-certutil http` command:
87+
Use the <<certutil-http,`elasticsearch-certutil http`>> command:
8388

8489
[source,shell]
85-
----------------------------------------------------------
90+
----
8691
bin/elasticsearch-certutil http
87-
----------------------------------------------------------
92+
----
8893

8994
This command guides you through the process of generating the appropriate
9095
certificates for use in {es} and {kib}. If you created a CA for your cluster,
9196
you can re-use it by supplying its location when prompted.
9297
--
9398

94-
. Copy the node certificates to the appropriate locations.
99+
. Copy the node certificate to the appropriate locations.
100+
101+
.. Create a folder in the configuration directory on each {es} node to contain
102+
your security certificates. For example, create a `certs` folder in the
103+
`/home/es/config/certs` directory.
95104
+
96-
--
97-
Copy the applicable files into the {es} configuration directory on each
98-
node.
105+
NOTE: The <<config-files-location,{es} configuration directory>> varies
106+
depending on your {es} installation.
99107

100-
For each additional Elastic product that you want to configure, copy the
101-
certificates to the relevant configuration directory.
102-
--
108+
.. Copy the node certificates into the `certs` directory that you created in the
109+
previous step.
103110

104-
NOTE: If you choose not to use `elasticsearch-certutil`, the certificates that
105-
you obtain must allow for both `clientAuth` and `serverAuth` if the extended key
106-
usage extension is present. The certificates need to be in PEM or PKCS#12
107-
format. Although not required, it is highly recommended that the certificate
108-
contain the DNS names and/or IP addresses of the node so that hostname
109-
verification can be used.
111+
.. Copy the `.p12` keystore file into the {es} configuration directory. {es}
112+
will fail to start if the keystore file is located anywhere except this
113+
directory.
114+
115+
.. For each additional Elastic product that you want to configure, copy the
116+
certificates to the relevant configuration directory.

0 commit comments

Comments
 (0)