Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Retain built-in ML roles granting Kibana privileges #80014

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,13 @@ private static Map<String, RoleDescriptor> initializeReservedRoles() {
.indices(".ml-annotations*")
.privileges("view_index_metadata", "read", "write")
.build() },
// TODO: remove Kibana privileges from ML backend roles in 8.0.0
// This role also grants Kibana privileges related to ML.
// This makes it completely clear to UI administrators that
// if they grant the Elasticsearch backend role to a user then
// they cannot expect Kibana privileges to stop that user from
// accessing ML functionality - the user could switch to curl
// or even Kibana dev console and call the ES endpoints directly
// bypassing the Kibana privileges layer entirely.
new RoleDescriptor.ApplicationResourcePrivileges[] {
RoleDescriptor.ApplicationResourcePrivileges.builder()
.application("kibana-*")
Expand Down Expand Up @@ -313,7 +319,13 @@ private static Map<String, RoleDescriptor> initializeReservedRoles() {
.indices(".ml-annotations*")
.privileges("view_index_metadata", "read", "write")
.build() },
// TODO: remove Kibana privileges from ML backend roles in 8.0.0
// This role also grants Kibana privileges related to ML.
// This makes it completely clear to UI administrators that
// if they grant the Elasticsearch backend role to a user then
// they cannot expect Kibana privileges to stop that user from
// accessing ML functionality - the user could switch to curl
// or even Kibana dev console and call the ES endpoints directly
// bypassing the Kibana privileges layer entirely.
new RoleDescriptor.ApplicationResourcePrivileges[] {
RoleDescriptor.ApplicationResourcePrivileges.builder()
.application("kibana-*")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void close() {
stop();
}

private synchronized void scheduleNext() {
private synchronized void scheduleNext() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private synchronized void scheduleNext() {
private synchronized void scheduleNext() {

try {
cancellable = threadPool.schedule(this::triggerTasks, schedulerProvider.get(), ThreadPool.Names.GENERIC);
} catch (EsRejectedExecutionException e) {
Expand Down