Skip to content

Commit 269b152

Browse files
Deprecate the kibana reserved user; introduce kibana_system user (#54967)
* deprecate the kibana reserved user; introduce kibana_system user * fix license and test errors * fix IdentityProviderAuthenticationIT tests * test deprecation logging * First pass at SetupPasswordTool updates * fix checkstyle * update docs * update number of expected users * update test to expect deprecation header Co-authored-by: Elastic Machine <[email protected]>
1 parent 3b74015 commit 269b152

File tree

23 files changed

+277
-111
lines changed

23 files changed

+277
-111
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SecurityDocumentationIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ public void testGetUsers() throws Exception {
200200
List<User> users = new ArrayList<>(3);
201201
users.addAll(response.getUsers());
202202
assertNotNull(response);
203-
// 9 users are expected to be returned
203+
// 10 users are expected to be returned
204204
// test_users (3): user1, user2, user3
205-
// system_users (6): elastic, beats_system, apm_system, logstash_system, kibana, remote_monitoring_user
205+
// system_users (6): elastic, beats_system, apm_system, logstash_system, kibana, kibana_system, remote_monitoring_user
206206
logger.info(users);
207-
assertThat(users.size(), equalTo(9));
207+
assertThat(users.size(), equalTo(10));
208208
}
209209

210210
{

docs/reference/migration/migrate_8_0/security.asciidoc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,40 @@ It is now an error to enable SSL for the HTTP (Rest) server without also configu
132132
a certificate and key through use of the `xpack.security.http.ssl.keystore.path`
133133
setting or the `xpack.security.http.ssl.certificate` and
134134
`xpack.security.http.ssl.key` settings.
135+
136+
137+
[float]
138+
[[builtin-users-changes]]
139+
==== Changes to built-in users
140+
141+
[float]
142+
===== The `kibana` user has been removed in favor of the `kibana_system` user
143+
144+
The `kibana` user was historically used to authenticate {kib} to {es}.
145+
The name of this user was confusing, and was often mistakenly used to login to {kib}.
146+
This has been renamed to `kibana_system` in order to reduce confusion, and to better
147+
align with other built-in system accounts.
148+
149+
If your `kibana.yml` used to contain:
150+
[source,yaml]
151+
--------------------------------------------------
152+
elasticsearch.username: kibana
153+
--------------------------------------------------
154+
155+
then you should update to use the new `kibana_system` user instead:
156+
[source,yaml]
157+
--------------------------------------------------
158+
elasticsearch.username: kibana_system
159+
--------------------------------------------------
160+
161+
162+
[float]
163+
[[builtin-roles-changes]]
164+
==== Changes to built-in roles
165+
166+
[float]
167+
===== The `kibana_user` role has been removed in favor of the `kibana_admin` role
168+
169+
Users who were previously assigned the `kibana_user` role should instead be assigned
170+
the `kibana_admin` role. This role grants the same set of privileges as `kibana_user`, but has been
171+
renamed to better reflect its intended use.

x-pack/docs/en/security/auditing/output-logfile.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ are similar. For systems that are not ingesting the audit file for search or
1010
analytics it is strongly recommended to keep only the newer format.
1111

1212
To turn off the deprecated output format, you can disable the logger in the
13-
`log4j2.properties` file:
13+
`log4j2.properties` file:
1414

1515
[source, properties]
1616
--------------------------------------------------
@@ -139,18 +139,18 @@ non-matching events are printed as usual.
139139

140140
All policies are defined under the `xpack.security.audit.logfile.events.ignore_filters`
141141
settings namespace. For example, the following policy named _example1_ matches
142-
events from the _kibana_ or _admin_user_ principals **and** operating over indices of the
142+
events from the _kibana_system_ or _admin_user_ principals **and** operating over indices of the
143143
wildcard form _app-logs*_:
144144

145145
[source,yaml]
146146
----------------------------
147147
xpack.security.audit.logfile.events.ignore_filters:
148148
example1:
149-
users: ["kibana", "admin_user"]
149+
users: ["kibana_system", "admin_user"]
150150
indices: ["app-logs*"]
151151
----------------------------
152152

153-
An audit event generated by the _kibana_ user and operating over multiple indices
153+
An audit event generated by the _kibana_system_ user and operating over multiple indices
154154
, some of which do not match the indices wildcard, will not match.
155155
As expected, operations generated by all other users (even operating only on indices that
156156
match the _indices_ filter) will not match this policy either.

x-pack/docs/en/security/authentication/built-in-users.asciidoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ used to <<set-built-in-user-passwords,set all of the built-in user passwords>>.
1212
`logstash_system`:: The user Logstash uses when storing monitoring information in {es}.
1313
`beats_system`:: The user the Beats use when storing monitoring information in {es}.
1414
`apm_system`:: The user the APM server uses when storing monitoring information in {es}.
15-
`remote_monitoring_user`:: The user {metricbeat} uses when collecting and
16-
storing monitoring information in {es}. It has the `remote_monitoring_agent` and
17-
`remote_monitoring_collector` built-in roles.
15+
`remote_monitoring_user`:: The user {metricbeat} uses when collecting and
16+
storing monitoring information in {es}. It has the `remote_monitoring_agent` and
17+
`remote_monitoring_collector` built-in roles.
1818

1919
TIP: The built-in users serve specific purposes and are not intended for general
2020
use. In particular, do not use the `elastic` superuser unless full access to
@@ -65,7 +65,7 @@ The +elasticsearch-setup-passwords+ tool is the simplest method to set the
6565
built-in users' passwords for the first time. It uses the `elastic` user's
6666
bootstrap password to run user management API requests. For example, you can run
6767
the command in an "interactive" mode, which prompts you to enter new passwords
68-
for the `elastic`, `kibana`, `logstash_system`, `beats_system`, `apm_system`,
68+
for the `elastic`, `kibana_system`, `logstash_system`, `beats_system`, `apm_system`,
6969
and `remote_monitoring_user` users:
7070

7171
[source,shell]
@@ -107,7 +107,7 @@ since at that point the bootstrap password is no longer required.
107107
[[add-built-in-user-kibana]]
108108
==== Adding built-in user passwords to {kib}
109109

110-
After the `kibana` user password is set, you need to update the {kib} server
110+
After the `kibana_system` user password is set, you need to update the {kib} server
111111
with the new password by setting `elasticsearch.password` in the `kibana.yml`
112112
configuration file:
113113

@@ -120,7 +120,7 @@ See {kibana-ref}/using-kibana-with-security.html[Configuring security in {kib}].
120120

121121
[float]
122122
[[add-built-in-user-logstash]]
123-
==== Adding built-in user passwords to {ls}
123+
==== Adding built-in user passwords to {ls}
124124

125125
The `logstash_system` user is used internally within Logstash when
126126
monitoring is enabled for Logstash.
@@ -143,7 +143,7 @@ been changed, you can enable the user via the following API call:
143143
PUT _security/user/logstash_system/_enable
144144
---------------------------------------------------------------------
145145

146-
See {logstash-ref}/ls-security.html#ls-monitoring-user[Configuring credentials for {ls} monitoring].
146+
See {logstash-ref}/ls-security.html#ls-monitoring-user[Configuring credentials for {ls} monitoring].
147147

148148
[float]
149149
[[add-built-in-user-beats]]
@@ -161,13 +161,13 @@ xpack.monitoring.elasticsearch.username: beats_system
161161
xpack.monitoring.elasticsearch.password: beatspassword
162162
----------------------------------------------------------
163163

164-
For example, see {metricbeat-ref}/monitoring.html[Monitoring {metricbeat}].
164+
For example, see {metricbeat-ref}/monitoring.html[Monitoring {metricbeat}].
165165

166-
The `remote_monitoring_user` is used when {metricbeat} collects and stores
167-
monitoring data for the {stack}. See <<monitoring-production>>.
166+
The `remote_monitoring_user` is used when {metricbeat} collects and stores
167+
monitoring data for the {stack}. See <<monitoring-production>>.
168168

169169
If you have upgraded from an older version of {es}, then you may not have set a
170-
password for the `beats_system` or `remote_monitoring_user` users. If this is
170+
password for the `beats_system` or `remote_monitoring_user` users. If this is
171171
the case, then you should use the *Management > Users* page in {kib} or the
172172
<<security-api-change-password,change password API>> to set a password
173173
for these users.
@@ -178,8 +178,8 @@ for these users.
178178

179179
The `apm_system` user is used internally within APM when monitoring is enabled.
180180

181-
To enable this feature in APM, you need to update the
182-
{apm-server-ref}/configuring-howto-apm-server.html[APM configuration file] to
181+
To enable this feature in APM, you need to update the
182+
{apm-server-ref}/configuring-howto-apm-server.html[APM configuration file] to
183183
reference the correct username and password. For example:
184184

185185
[source,yaml]
@@ -188,10 +188,10 @@ xpack.monitoring.elasticsearch.username: apm_system
188188
xpack.monitoring.elasticsearch.password: apmserverpassword
189189
----------------------------------------------------------
190190

191-
See {apm-server-ref}/monitoring.html[Monitoring APM Server].
191+
See {apm-server-ref}/monitoring.html[Monitoring APM Server].
192192

193193
If you have upgraded from an older version of {es}, then you may not have set a
194-
password for the `apm_system` user. If this is the case,
194+
password for the `apm_system` user. If this is the case,
195195
then you should use the *Management > Users* page in {kib} or the
196196
<<security-api-change-password,change password API>> to set a password
197197
for these users.

x-pack/docs/en/security/get-started-builtin-users.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// tag::create-users[]
22
There are <<built-in-users,built-in users>> that you can use for specific
3-
administrative purposes: `apm_system`, `beats_system`, `elastic`, `kibana`,
4-
`logstash_system`, and `remote_monitoring_user`.
3+
administrative purposes: `apm_system`, `beats_system`, `elastic`, `kibana_system`,
4+
`logstash_system`, and `remote_monitoring_user`.
55

66
// end::create-users[]
77

88
Before you can use them, you must set their passwords:
99

10-
. Restart {es}. For example, if you installed {es} with a `.tar.gz` package, run
10+
. Restart {es}. For example, if you installed {es} with a `.tar.gz` package, run
1111
the following command from the {es} directory:
1212
+
1313
--
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
When the {es} {security-features} are enabled, users must log in to {kib}
2-
with a valid user ID and password.
2+
with a valid user ID and password.
33

4-
{kib} also performs some tasks under the covers that require use of the
5-
built-in `kibana` user.
4+
{kib} also performs some tasks under the covers that require use of the
5+
built-in `kibana_system` user.
66

7-
. Configure {kib} to use the built-in `kibana` user and the password that you
7+
. Configure {kib} to use the built-in `kibana_system` user and the password that you
88
created:
99

10-
** If you don't mind having passwords visible in your configuration file,
11-
uncomment and update the following settings in the `kibana.yml` file in your
10+
** If you don't mind having passwords visible in your configuration file,
11+
uncomment and update the following settings in the `kibana.yml` file in your
1212
{kib} directory:
1313
+
1414
--
15-
TIP: If you installed {kib} using archive distributions (`zip` or
16-
`tar.gz`), the `kibana.yml` configuration file is in `KIBANA_HOME/config`. If
17-
you used package distributions (Debian or RPM), it's in `/etc/kibana`. For more
18-
information, see {kibana-ref}/settings.html[Configuring {kib}].
15+
TIP: If you installed {kib} using archive distributions (`zip` or
16+
`tar.gz`), the `kibana.yml` configuration file is in `KIBANA_HOME/config`. If
17+
you used package distributions (Debian or RPM), it's in `/etc/kibana`. For more
18+
information, see {kibana-ref}/settings.html[Configuring {kib}].
1919

2020
For example, add the following settings:
2121

2222
[source,yaml]
2323
----
24-
elasticsearch.username: "kibana"
24+
elasticsearch.username: "kibana_system"
2525
elasticsearch.password: "your_password"
2626
----
2727

28-
Specify the password that you set with the `elasticsearch-setup-passwords`
29-
command then save your changes to the file.
28+
Specify the password that you set with the `elasticsearch-setup-passwords`
29+
command then save your changes to the file.
3030
--
3131

32-
** If you prefer not to put your user ID and password in the `kibana.yml` file,
33-
store them in a keystore instead. Run the following commands to create the {kib}
32+
** If you prefer not to put your user ID and password in the `kibana.yml` file,
33+
store them in a keystore instead. Run the following commands to create the {kib}
3434
keystore and add the secure settings:
3535
+
3636
--
@@ -42,14 +42,14 @@ keystore and add the secure settings:
4242
./bin/kibana-keystore add elasticsearch.password
4343
----------------------------------------------------------------------
4444
45-
When prompted, specify the `kibana` built-in user and its password for these
46-
setting values. The settings are automatically applied when you start {kib}.
45+
When prompted, specify the `kibana_system` built-in user and its password for these
46+
setting values. The settings are automatically applied when you start {kib}.
4747
To learn more, see {kibana-ref}/secure-settings.html[Secure settings].
4848
// end::store-kibana-user[]
4949
--
5050
51-
. Restart {kib}. For example, if you installed
52-
{kib} with a `.tar.gz` package, run the following command from the {kib}
51+
. Restart {kib}. For example, if you installed
52+
{kib} with a `.tar.gz` package, run the following command from the {kib}
5353
directory:
5454
+
5555
--
@@ -58,5 +58,5 @@ directory:
5858
./bin/kibana
5959
----------------------------------------------------------------------
6060
61-
See {kibana-ref}/start-stop.html[Starting and stopping {kib}].
62-
--
61+
See {kibana-ref}/start-stop.html[Starting and stopping {kib}].
62+
--

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[role="xpack"]
22
[testenv="trial"]
33
[[encrypting-internode]]
4-
=== Encrypt internode communications
4+
=== Encrypt internode communications
55

66
Now that we've generated a certificate authority and certificates, let's update
77
the cluster to use these files.
88

99
IMPORTANT: When you enable {es} {security-features}, unless you have a trial
1010
license, you must use Transport Layer Security (TLS) to encrypt internode
1111
communication. By following the steps in this tutorial tutorial, you learn how
12-
to meet the minimum requirements to pass the
12+
to meet the minimum requirements to pass the
1313
<<bootstrap-checks-tls,TLS bootstrap check>>.
1414

1515
. (Optional) Name the cluster.
@@ -23,10 +23,10 @@ For example, add the <<cluster.name,cluster.name>> setting in the
2323
cluster.name: test-cluster
2424
----
2525

26-
TIP: The `ES_PATH_CONF` environment variable contains the path for the {es}
27-
configuration files. If you installed {es} using archive distributions (`zip` or
28-
`tar.gz`), it defaults to `ES_HOME/config`. If you used package distributions
29-
(Debian or RPM), it defaults to `/etc/elasticsearch`. For more information, see
26+
TIP: The `ES_PATH_CONF` environment variable contains the path for the {es}
27+
configuration files. If you installed {es} using archive distributions (`zip` or
28+
`tar.gz`), it defaults to `ES_HOME/config`. If you used package distributions
29+
(Debian or RPM), it defaults to `/etc/elasticsearch`. For more information, see
3030
<<settings>>.
3131

3232
The default cluster name is `elasticsearch`. You should choose a unique name,
@@ -46,7 +46,7 @@ node.name: node-1
4646

4747
In this tutorial, the cluster will consist of three nodes that exist on the same
4848
machine and share the same (loopback) IP address and hostname. Therefore, we
49-
must give each node a unique name.
49+
must give each node a unique name.
5050

5151
This step is also necessary if you want to use the `node.name` value to define
5252
the location of certificates in subsequent steps.
@@ -79,13 +79,13 @@ itself into a new cluster.
7979
TIP: If you are starting a cluster with multiple master-eligible nodes for the
8080
first time, add all of those node names to the `cluster.initial_master_nodes`
8181
setting.
82-
82+
8383
See <<modules-discovery-bootstrap-cluster>> and
8484
<<discovery-settings>>.
8585
--
8686

8787
. Enable Transport Layer Security (TLS/SSL) for transport (internode)
88-
communications.
88+
communications.
8989
+
9090
--
9191
// tag::enable-tls[]
@@ -95,28 +95,28 @@ file:
9595
[source,yaml]
9696
----
9797
xpack.security.enabled: true
98-
xpack.security.transport.ssl.enabled: true
98+
xpack.security.transport.ssl.enabled: true
9999
xpack.security.transport.ssl.keystore.path: certs/${node.name}.p12 <1>
100100
xpack.security.transport.ssl.truststore.path: certs/${node.name}.p12
101101
----
102102
<1> If the file name for your certificate does not match the `node.name` value,
103-
you must put the appropriate file name in the `elasticsearch.yml` file.
103+
you must put the appropriate file name in the `elasticsearch.yml` file.
104104
// end::enable-tls[]
105105

106106
NOTE: The PKCS#12 keystore that is output by the `elasticsearch-certutil` can be
107-
used as both a keystore and a truststore. If you use other tools to manage and
107+
used as both a keystore and a truststore. If you use other tools to manage and
108108
generate your certificates, you might have different values for these settings,
109109
but that scenario is not covered in this tutorial.
110110

111-
For more information, see <<get-started-enable-security>> and
111+
For more information, see <<get-started-enable-security>> and
112112
<<transport-tls-ssl-settings>>.
113113
--
114114

115115
. Store the password for the PKCS#12 file in the {es} keystore.
116116
+
117117
--
118118
// tag::secure-passwords[]
119-
For example, run the following commands:
119+
For example, run the following commands:
120120

121121
["source","sh",subs="attributes,callouts"]
122122
----------------------------------------------------------------------
@@ -146,19 +146,19 @@ command from the {es} directory:
146146
----------------------------------------------------------------------
147147
--
148148

149-
. Create passwords for the built-in users and configure {kib} to use them.
149+
. Create passwords for the built-in users and configure {kib} to use them.
150150
+
151151
--
152152
NOTE: If you already configured passwords for these users in other tutorials,
153153
you can skip this step.
154154

155155
include::{xes-repo-dir}/security/get-started-builtin-users.asciidoc[tag=create-users]
156156

157-
After you setup the password for the `kibana` built-in user,
157+
After you setup the password for the `kibana_system` built-in user,
158158
<<get-started-kibana-user,configure {kib} to use it>>.
159159

160160
For example, run the following commands to create the {kib} keystore and add the
161-
`kibana` built-in user and its password in secure settings:
161+
`kibana_system` built-in user and its password in secure settings:
162162

163163
include::{xes-repo-dir}/security/get-started-kibana-users.asciidoc[tag=store-kibana-user]
164164
--
@@ -173,5 +173,5 @@ command from the {kib} directory:
173173
./bin/kibana
174174
----------------------------------------------------------------------
175175

176-
See {kibana-ref}/start-stop.html[Starting and stopping {kib}].
176+
See {kibana-ref}/start-stop.html[Starting and stopping {kib}].
177177
--

0 commit comments

Comments
 (0)