Skip to content

Commit 37d3b05

Browse files
authored
[8.9] [DOCS] Add $ELASTIC_PASSWORD env var to install docs (#98898) (#98934)
1 parent 12e5fcb commit 37d3b05

File tree

8 files changed

+31
-173
lines changed

8 files changed

+31
-173
lines changed

docs/reference/setup/install/auto-config-output.asciidoc

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/reference/setup/install/check-running.asciidoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ You can test that your {es} node is running by sending an HTTPS request to port
55

66
["source","sh",subs="attributes"]
77
----
8-
curl --cacert {es-conf}{slash}certs{slash}http_ca.crt -u elastic https://localhost:9200 <1>
8+
curl --cacert {es-conf}{slash}certs{slash}http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200 <1>
99
----
1010
// NOTCONSOLE
1111
<1> Ensure that you use `https` in your call, or the request will fail.
1212
+
1313
`--cacert`::
1414
Path to the generated `http_ca.crt` certificate for the HTTP layer.
1515

16-
Enter the password for the `elastic` user that was generated during
17-
installation, which should return a response like this:
16+
The call returns a response like this:
1817

1918
////
2019
The following hidden request is required before the response. Otherwise, you'll

docs/reference/setup/install/package-security.asciidoc

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,13 @@ the `elastic` built-in superuser.
1010
* Certificates and keys for TLS are generated for the transport and HTTP layer,
1111
and TLS is enabled and configured with these keys and certificates.
1212

13-
The password and certificate and keys are output to your terminal. For example:
13+
The password and certificate and keys are output to your terminal.
14+
15+
We recommend storing the `elastic` password as an environment variable in your shell. Example:
1416

1517
[source,sh]
1618
----
17-
-------Security autoconfiguration information-------
18-
19-
Authentication and authorization are enabled.
20-
TLS for the transport and HTTP layers is enabled and configured.
21-
22-
The generated password for the elastic built-in superuser is : <password>
23-
24-
If this node should join an existing cluster, you can reconfigure this with
25-
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
26-
after creating an enrollment token on your existing cluster.
27-
28-
You can complete the following actions at any time:
29-
30-
Reset the password of the elastic built-in superuser with
31-
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.
32-
33-
Generate an enrollment token for Kibana instances with
34-
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.
35-
36-
Generate an enrollment token for Elasticsearch nodes with
37-
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.
19+
export ELASTIC_PASSWORD="your_password"
3820
----
3921

4022
===== Reconfigure a node to join an existing cluster

docs/reference/setup/install/targz-start.asciidoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ and TLS is enabled and configured with these keys and certificates.
1818
* An enrollment token is generated for {kib}, which is valid for 30 minutes.
1919
2020
The password for the `elastic` user and the enrollment token for {kib} are
21-
output to your terminal. For example:
21+
output to your terminal.
2222

23-
:slash: /
23+
We recommend storing the `elastic` password as an environment variable in your shell. Example:
2424

25-
include::auto-config-output.asciidoc[]
25+
[source,sh]
26+
----
27+
export ELASTIC_PASSWORD="your_password"
28+
----
2629

2730
If you have password-protected the {es} keystore, you will be prompted
2831
to enter the keystore's password. See <<secure-settings>> for more

docs/reference/setup/install/zip-windows-start.asciidoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ and TLS is enabled and configured with these keys and certificates.
1818
* An enrollment token is generated for {kib}, which is valid for 30 minutes.
1919
2020
The password for the `elastic` user and the enrollment token for {kib} are
21-
output to your terminal. For example:
21+
output to your terminal.
2222

23-
:slash: \
23+
We recommend storing the `elastic` password as an environment variable in your shell. Example:
2424

25-
include::auto-config-output.asciidoc[]
25+
[source,sh]
26+
----
27+
$ELASTIC_PASSWORD = "your_password"
28+
----
2629

2730
If you have password-protected the {es} keystore, you will be prompted to
2831
enter the keystore's password. See <<secure-settings>> for more details.

docs/reference/tab-widgets/api-call-widget.asciidoc

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/reference/tab-widgets/api-call.asciidoc

Lines changed: 0 additions & 69 deletions
This file was deleted.

x-pack/docs/en/security/configuring-stack-security.asciidoc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,17 @@ the `kibana` package distribution for your environment.
3333
[[stack-start-with-security]]
3434
=== Start {es} and enroll {kib} with security enabled
3535

36-
. From the installation directory, start {es}. A password is generated for the
37-
`elastic` user and output to the terminal, plus an enrollment token for
38-
enrolling {kib}.
36+
. From the installation directory, start {es}.
3937
+
4038
[source,shell]
4139
----
4240
bin/elasticsearch
4341
----
4442
+
45-
TIP: You might need to scroll back a bit in the terminal to view the password
46-
and enrollment token.
43+
The command prints the `elastic` user password and an enrollment token for {kib}.
4744

48-
. Copy the generated password and enrollment token and save them in a secure
49-
location. These values are shown only when you start {es} for the first time.
45+
. Copy the generated `elastic` password and enrollment token. These credentials
46+
are only shown when you start {es} for the first time.
5047
+
5148
[NOTE]
5249
====
@@ -56,14 +53,20 @@ To generate new enrollment tokens for {kib} or {es} nodes, run the
5653
<<create-enrollment-token,`elasticsearch-create-enrollment-token`>> tool.
5754
These tools are available in the {es} `bin` directory.
5855
====
56+
+
57+
We recommend storing the `elastic` password as an environment variable in your shell. Example:
58+
+
59+
[source,sh]
60+
----
61+
export ELASTIC_PASSWORD="your_password"
62+
----
5963

6064
. (Optional) Open a new terminal and verify that you can connect to your {es}
61-
cluster by making an authenticated call. Enter the password for the `elastic`
62-
user when prompted:
65+
cluster by making an authenticated call.
6366
+
6467
[source,shell]
6568
----
66-
curl --cacert config/certs/http_ca.crt -u elastic https://localhost:9200
69+
curl --cacert config/certs/http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200
6770
----
6871
// NOTCONSOLE
6972

0 commit comments

Comments
 (0)