Skip to content

Commit

Permalink
Add "maintenance" permission to the fleet-server service account (#82125
Browse files Browse the repository at this point in the history
) (#82138)

* Add "maintenance" permission to the fleet-server service account

* Fix tests
  • Loading branch information
aleksmaus committed Dec 30, 2021
1 parent 93f0c26 commit 151d778
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ GET /_security/service/elastic/fleet-server
"write",
"monitor",
"create_index",
"auto_configure"
"auto_configure",
"maintenance"
],
"allow_restricted_indices": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public class ServiceAccountIT extends ESRestTestCase {
"write",
"monitor",
"create_index",
"auto_configure"
"auto_configure",
"maintenance"
],
"allow_restricted_indices": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ final class ElasticServiceAccounts {
.build(),
RoleDescriptor.IndicesPrivileges.builder()
.indices(".fleet-*")
.privileges("read", "write", "monitor", "create_index", "auto_configure")
// Fleet Server needs "maintenance" privilege to be able to perform operations with "refresh"
.privileges("read", "write", "monitor", "create_index", "auto_configure", "maintenance")
.allowRestrictedIndices(true)
.build() },
new RoleDescriptor.ApplicationResourcePrivileges[] {
Expand Down

0 comments on commit 151d778

Please sign in to comment.