Skip to content

Commit b770435

Browse files
author
David Roberts
authored
[ML] Retain built-in ML roles granting Kibana privileges (#80014) (#80019)
The machine_learning_admin and machine_learning_user roles in Elasticsearch also grant access to the ML pages in Kibana. At one time it was intended that this should change in 8.0, so that ML privileges in Kibana would be completely separate. However, our thinking has now changed. An administrator cannot give a user the Elasticsearch backend roles and expect Kibana privileges alone to then stop that user from using ML - the user could just switch to curl or even Kibana dev console (which uses backend privileges rather than Kibana privileges). So it's clearer what is really being permitted if the backend roles continue to allow access to the ML UI as well as the ML backend endpoints. There's nothing the user can see in the ML UI that they couldn't find out by calling ML Elasticsearch endpoints directly and rendering the responses in a more graphical way.
1 parent c253607 commit b770435

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,13 @@ private static Map<String, RoleDescriptor> initializeReservedRoles() {
301301
.indices(".ml-annotations*")
302302
.privileges("view_index_metadata", "read", "write")
303303
.build() },
304-
// TODO: remove Kibana privileges from ML backend roles in 8.0.0
304+
// This role also grants Kibana privileges related to ML.
305+
// This makes it completely clear to UI administrators that
306+
// if they grant the Elasticsearch backend role to a user then
307+
// they cannot expect Kibana privileges to stop that user from
308+
// accessing ML functionality - the user could switch to curl
309+
// or even Kibana dev console and call the ES endpoints directly
310+
// bypassing the Kibana privileges layer entirely.
305311
new RoleDescriptor.ApplicationResourcePrivileges[] {
306312
RoleDescriptor.ApplicationResourcePrivileges.builder()
307313
.application("kibana-*")
@@ -328,7 +334,13 @@ private static Map<String, RoleDescriptor> initializeReservedRoles() {
328334
.indices(".ml-annotations*")
329335
.privileges("view_index_metadata", "read", "write")
330336
.build() },
331-
// TODO: remove Kibana privileges from ML backend roles in 8.0.0
337+
// This role also grants Kibana privileges related to ML.
338+
// This makes it completely clear to UI administrators that
339+
// if they grant the Elasticsearch backend role to a user then
340+
// they cannot expect Kibana privileges to stop that user from
341+
// accessing ML functionality - the user could switch to curl
342+
// or even Kibana dev console and call the ES endpoints directly
343+
// bypassing the Kibana privileges layer entirely.
332344
new RoleDescriptor.ApplicationResourcePrivileges[] {
333345
RoleDescriptor.ApplicationResourcePrivileges.builder()
334346
.application("kibana-*")

0 commit comments

Comments
 (0)