Skip to content

Commit 03ffd16

Browse files
jasontedorrjernst
authored andcommitted
Rename certutil
This commit renames certutil to elasticsearch-certutil.
1 parent a6b4682 commit 03ffd16

File tree

10 files changed

+62
-57
lines changed

10 files changed

+62
-57
lines changed

x-pack/docs/en/commands/certutil.asciidoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[role="xpack"]
22
[[certutil]]
3-
== certutil
3+
== elasticsearch-certutil
44

5-
The `certutil` command simplifies the creation of certificates for use with
6-
Transport Layer Security (TLS) in the Elastic Stack.
5+
The `elasticsearch-certutil` command simplifies the creation of certificates for
6+
use with Transport Layer Security (TLS) in the Elastic Stack.
77

88
[float]
99
=== Synopsis
1010

1111
[source,shell]
1212
--------------------------------------------------
13-
bin/x-pack/certutil
13+
bin/elasticsearch-certutil
1414
(
1515
(ca [--ca-dn <name>] [--days <n>] [--pem])
1616
@@ -31,9 +31,9 @@ bin/x-pack/certutil
3131
[float]
3232
=== Description
3333

34-
You can specify one of the following modes: `ca`, `cert`, `csr`. The `certutil`
35-
command also supports a silent mode of operation to enable easier batch
36-
operations.
34+
You can specify one of the following modes: `ca`, `cert`, `csr`. The
35+
`elasticsearch-certutil` command also supports a silent mode of operation to
36+
enable easier batch operations.
3737

3838
[float]
3939
[[certutil-ca]]
@@ -199,7 +199,7 @@ format:
199199

200200
[source, sh]
201201
--------------------------------------------------
202-
bin/x-pack/certutil ca
202+
bin/elasticsearch-certutil ca
203203
--------------------------------------------------
204204

205205
You are prompted for an output filename and a password. Alternatively, you can
@@ -210,7 +210,7 @@ CA. For example:
210210

211211
[source, sh]
212212
--------------------------------------------------
213-
bin/x-pack/certutil cert --ca elastic-stack-ca.p12
213+
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
214214
--------------------------------------------------
215215

216216
You are prompted for the CA password and for an output filename and password.
@@ -223,7 +223,7 @@ product that you want to configure. For more information, see
223223

224224
[float]
225225
[[certutil-silent]]
226-
==== Using `certutil` in Silent Mode
226+
==== Using `elasticsearch-certutil` in Silent Mode
227227

228228
To use the silent mode of operation, you must create a YAML file that contains
229229
information about the instances. It must match the following format:
@@ -261,13 +261,13 @@ the names of the files within the directory. This filename should not have an
261261
extension. Note: If the `name` provided for the instance does not represent a
262262
valid filename, then the `filename` field must be present.
263263

264-
When your YAML file is ready, you can use the `certutil` command to generate
265-
certificates or certificate signing requests. Simply use the `--in` parameter to
266-
specify the location of the file. For example:
264+
When your YAML file is ready, you can use the `elasticsearch-certutil` command
265+
to generate certificates or certificate signing requests. Simply use the `--in`
266+
parameter to specify the location of the file. For example:
267267

268268
[source, sh]
269269
--------------------------------------------------
270-
bin/x-pack/certutil cert --silent --in instances.yml --out test1.zip --pass testpassword
270+
bin/elasticsearch-certutil cert --silent --in instances.yml --out test1.zip --pass testpassword
271271
--------------------------------------------------
272272

273273
This command generates a compressed `test1.zip` file. After you decompress the
@@ -281,7 +281,7 @@ example:
281281

282282
[source, sh]
283283
--------------------------------------------------
284-
bin/x-pack/certutil csr --silent --in instances.yml --out test2.zip --pass testpassword
284+
bin/elasticsearch-certutil csr --silent --in instances.yml --out test2.zip --pass testpassword
285285
--------------------------------------------------
286286

287287
This command generates a compressed file, which contains a directory for each

x-pack/docs/en/security/authentication/saml-guide.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ or separate keys used for each of those.
439439

440440
The Elastic Stack uses X.509 certificates with RSA private keys for SAML
441441
cryptography. These keys can be generated using any standard SSL tool, including
442-
the `certutil` tool that ships with X-Pack.
442+
the `elasticsearch-certutil` tool that ships with X-Pack.
443443

444444
Your IdP may require that the Elastic Stack have a cryptographic key for signing
445445
SAML messages, and that you provide the corresponding signing certificate within
@@ -462,12 +462,12 @@ You should consult the documentation for your IdP to determine what formats they
462462
support. Since PEM format is the most commonly supported format, the examples
463463
below will generate certificates in that format.
464464

465-
Using the {ref}/certutil.html[`certutil`] tool, you can generate a signing
466-
certificate with the following command:
465+
Using the {ref}/certutil.html[`elasticsearch-certutil`] tool, you can generate a
466+
signing certificate with the following command:
467467

468468
[source, sh]
469469
--------------------------------------------------
470-
bin/x-pack/certutil cert -pem -days 1100 -name saml-sign -out saml-sign.zip
470+
bin/elasticsearch-certutil cert -pem -days 1100 -name saml-sign -out saml-sign.zip
471471
--------------------------------------------------
472472

473473
This will

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

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@ names (SAN) that correspond to the node's IP address and DNS name so that
1313
hostname verification can be performed.
1414

1515
In order to simplify the process of generating certificates for the Elastic
16-
Stack, a command line tool, {ref}/certutil.html[`certutil`] has been included
17-
with {xpack}. This tool takes care of generating a CA and signing certificates
18-
with the CA. `certutil` can be used interactively or in a silent mode through
19-
the use of an input file. The `certutil` tool also supports generation of
20-
certificate signing requests (CSR), so that a commercial- or
21-
organization-specific CA can be used to sign the certificates. For example:
16+
Stack, a command line tool, {ref}/certutil.html[`elasticsearch-certutil`] has been
17+
included with {xpack}. This tool takes care of generating a CA and signing
18+
certificates with the CA. `elasticsearch-certutil` can be used interactively or
19+
in a silent mode through the use of an input file. The `elasticsearch-certutil`
20+
tool also supports generation of certificate signing requests (CSR), so that a
21+
commercial- or organization-specific CA can be used to sign the certificates.
22+
For example:
2223

2324
. Optional: Create a certificate authority for your {es} cluster.
2425
+
2526
--
26-
For example, use the `certutil ca` command:
27+
For example, use the `elasticsearch-certutil ca` command:
2728

2829
[source,shell]
2930
----------------------------------------------------------
30-
bin/x-pack/certutil ca
31+
bin/elasticsearch-certutil ca
3132
----------------------------------------------------------
3233

3334
You can configure the cluster to trust all nodes that have a certificate that
@@ -37,41 +38,43 @@ The command outputs a single file, with a default name of `elastic-stack-ca.p12`
3738
This file is a PKCS#12 keystore that contains the public certificate for your CA
3839
and the private key that is used to sign the certificates for each node.
3940

40-
The `certutil` command also prompts you for a password to protect the file and
41-
key. If you plan to add more nodes to your cluster in the future, retain a copy
42-
of the file and remember its password.
41+
The `elasticsearch-certutil` command also prompts you for a password to protect
42+
the file and key. If you plan to add more nodes to your cluster in the future,
43+
retain a copy of the file and remember its password.
4344
--
4445

4546
. Generate a certificate and private key for for each node in your cluster.
4647
+
4748
--
48-
For example, use the `certutil cert` command:
49+
For example, use the `elasticsearch-certutil cert` command:
4950

5051
[source,shell]
5152
----------------------------------------------------------
52-
bin/x-pack/certutil cert --ca elastic-stack-ca.p12
53+
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
5354
----------------------------------------------------------
5455
The output is a single PKCS#12 keystore that includes the node certificate, node
5556
key, and CA certificate.
5657

5758
You are also prompted for a password. You can enter a password for your
5859
certificate and key, or you can leave the password blank by pressing Enter.
5960

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

6567
If you want to use hostname verification within your cluster, run the
66-
`certutil cert` command once for each of your nodes and provide the `--name`,
67-
`--dns` and `--ip` options.
68+
`elasticsearch-certutil cert` command once for each of your nodes and provide
69+
the `--name`, `--dns` and `--ip` options.
6870

6971
NOTE: You should secure the output files, since they contain the private keys
7072
for your instance.
7173

7274
Alternatively, if you want to use a commercial or organization-specific CA,
73-
you can use the `certutil csr` command to generate certificate signing requests
74-
(CSR) for the nodes in your cluster. For more information, see <<certutil>>.
75+
you can use the `elasticsearch-certutil csr` command to generate certificate
76+
signing requests (CSR) for the nodes in your cluster. For more information, see
77+
<<certutil>>.
7578
--
7679

7780
. Copy the node certificate to the appropriate locations.
@@ -85,8 +88,9 @@ For each additional Elastic product that you want to configure, copy the
8588
certificates to the relevant configuration directory.
8689
--
8790

88-
NOTE: If you choose not to use `certutil`, the certificates that you obtain must
89-
allow for both `clientAuth` and `serverAuth` if the extended key usage extension
90-
is present. The certificates need to be in PEM or PKCS#12 format. Although not
91-
required, it is highly recommended that the certificate contain the DNS names
92-
and/or IP addresses of the node so that hostname verification can be used.
91+
NOTE: If you choose not to use `elasticsearch-certutil`, the certificates that
92+
you obtain must allow for both `clientAuth` and `serverAuth` if the extended key
93+
usage extension is present. The certificates need to be in PEM or PKCS#12
94+
format. Although not required, it is highly recommended that the certificate
95+
contain the DNS names and/or IP addresses of the node so that hostname
96+
verification can be used.

x-pack/docs/en/security/securing-communications/tls-http.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ xpack.security.http.ssl.truststore.path: certs/elastic-certificates.p12 <2>
2828
<1> If you created a separate certificate for each node, then you might need to
2929
customize this path on each node. If the filename matches the node name, you can
3030
use the `certs/${node.name}.p12` format, for example.
31-
<2> The `certutil` output includes the CA certificate inside the PKCS#12
32-
keystore, therefore the keystore can also be used as the truststore. This name
33-
should match the `keystore.path` value.
31+
<2> The `elasticsearch-certutil` output includes the CA certificate inside the
32+
PKCS#12 keystore, therefore the keystore can also be used as the truststore.
33+
This name should match the `keystore.path` value.
3434
--
3535

3636
** If the certificate is in PEM format, add the following information to the

x-pack/docs/en/security/securing-communications/tls-transport.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ xpack.security.transport.ssl.verification_mode: certificate <1>
2222
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12 <2>
2323
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12 <3>
2424
-----------------------------------------------------------
25-
<1> If you used the `--dns` or `--ip` options with the `certutil cert` command
25+
<1> If you used the `--dns` or `--ip` options with the `elasticsearch-certutil cert` command
2626
and you want to enable strict hostname checking, set the verification mode to
2727
`full`.
2828
See <<ssl-tls-settings, `xpack.ssl.verification_mode`>> for a description of these values.
2929

3030
<2> If you created a separate certificate for each node, then you might need to
3131
customize this path on each node. If the filename matches the node name, you can
3232
use the `certs/${node.name}.p12` format, for example.
33-
<3> The `certutil` output includes the CA certificate inside the PKCS#12
34-
keystore, therefore the keystore can also be used as the truststore. This name
35-
should match the `keystore.path` value.
33+
<3> The `elasticsearch-certutil` output includes the CA certificate inside the
34+
PKCS#12 keystore, therefore the keystore can also be used as the truststore.
35+
This name should match the `keystore.path` value.
3636
--
3737

3838
** If the certificate is in PEM format, add the following information to the
@@ -47,7 +47,7 @@ xpack.security.transport.ssl.key: /home/es/config/x-pack/node01.key <2>
4747
xpack.security.transport.ssl.certificate: /home/es/config/x-pack/node01.crt <3>
4848
xpack.security.transport.ssl.certificate_authorities: [ "/home/es/config/x-pack/ca.crt" ] <4>
4949
--------------------------------------------------
50-
<1> If you used the `--dns` or `--ip` options with the `certutil cert` command
50+
<1> If you used the `--dns` or `--ip` options with the `elasticsearch-certutil cert` command
5151
and you want to enable strict hostname checking, set the verification mode to
5252
`full`.
5353
See <<ssl-tls-settings, `xpack.ssl.verification_mode`>> for a description of these values.

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertificateGenerateTool.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ private static void writeCAInfoIfGenerated(ZipOutputStream outputStream, JcaPEMW
500500
private static void printIntro(Terminal terminal, boolean csr) {
501501
terminal.println("******************************************************************************");
502502
terminal.println("Note: The 'elasticsearch-certgen' tool has been deprecated in favour of the");
503-
terminal.println(" 'certutil' tool. This command will be removed in a future release.");
503+
terminal.println(" 'elasticsearch-certutil' tool. This command will be removed in a future");
504+
terminal.println(" release.");
504505
terminal.println("******************************************************************************");
505506
terminal.println("");
506507

x-pack/qa/vagrant/src/test/resources/packaging/utils/xpack.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ verify_xpack_installation() {
1616
local binaryFiles=(
1717
'elasticsearch-certgen'
1818
'elasticsearch-certgen.bat'
19-
'certutil'
20-
'certutil.bat'
19+
'elasticsearch-certutil'
20+
'elasticsearch-certutil.bat'
2121
'croneval'
2222
'croneval.bat'
2323
'migrate'

x-pack/test/idp-fixture/src/main/resources/certs/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ idp-ca.crt
44
idp-ca.key
55
Description: A CA for the IdP
66
Generated Date: 2018-02-07
7-
Command: bin/x-pack/certutil ca --ca-dn 'CN=idp-fixture,OU=elasticsearch,DC=elastic,DC=co' --days 5000 -keysize 1024 --out idp-ca.zip --pem
7+
Command: bin/elasticsearch-certutil ca --ca-dn 'CN=idp-fixture,OU=elasticsearch,DC=elastic,DC=co' --days 5000 -keysize 1024 --out idp-ca.zip --pem
88
X-Pack Version: 6.2.0
99

1010
idptrust.jks

0 commit comments

Comments
 (0)