Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Jan 26, 2021

This change allows users that do not initiated an async search to delete it
if they have the cluster manage and manage-security privileges.
It is equivalent to the cancellation of tasks through the task manager (same privilege required)
and will allow users with the right permissions to cancel/delete async searches if they know
the async execution id.

This change allows users that do not initiated an async search to delete it
if they have the cluster manage and manage-security privilege.
It is equivalent to the cancellation of tasks through the task manager (same privilege required)
and will allow users with the right permissions to cancel/delete async searches if they know
the async execution id.
@jimczi jimczi added >enhancement :Search/Search Search-related issues that do not fall into other categories labels Jan 26, 2021
@mark-vieira
Copy link
Contributor

@elasticmachine update branch

@jimczi jimczi marked this pull request as ready for review February 5, 2021 10:29
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Feb 5, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

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

LGTM
We discussed that we (Security) must investigate how to do authorization around requests that contain handlers that have ownership, so that we don't pollute the async tasks logic with authorization checks.

I will raise an issue.

@jimczi jimczi merged commit ec48172 into elastic:master Feb 8, 2021
@jimczi jimczi deleted the async_search_manage branch February 8, 2021 11:05
jimczi added a commit that referenced this pull request Feb 8, 2021
This change allows users that do not initiated an async search to delete it
if they have the cluster manage and manage-security privilege.
It is equivalent to the cancellation of tasks through the task manager (same privilege required)
and will allow users with the right permissions to cancel/delete async searches if they know
the async execution id.
@lizozom
Copy link

lizozom commented Feb 8, 2021

@jimczi do we need anything else to grant this permission to the kibana user? Or does it already have it?

@jimczi
Copy link
Contributor Author

jimczi commented Feb 8, 2021

@lizozom , not yet. This PR allows any user with the manage privilege to delete async searches. I'll open a follow up to determine how the kibana_system could have this privilege by default.

@lizozom
Copy link

lizozom commented Feb 8, 2021

Please share the PR with me for tracking 🙏

jimczi added a commit to jimczi/elasticsearch that referenced this pull request Feb 8, 2021
This change adds a new cluster privilege that allows to:
  * Cancel running tasks (_tasks/_cancel).
  * Cancel and delete async searches.

Today the 'manage' cluster privilege is required to cancel tasks and
to delete async searches when security features are enabled.
This new focused privilege allows to handle tasks and searches only.

The change also adds the privilege to the internal 'kibana_system'
and '_async_search' roles. They both need to be able to cancel tasks
and delete async searches.

Relates elastic#67965
@jimczi
Copy link
Contributor Author

jimczi commented Feb 8, 2021

@lizozom I opened #68679 for the kibana_system role.

jimczi added a commit that referenced this pull request Feb 16, 2021
…8679)

This change adds a new cluster privilege cancel_task that allows to:

Cancel running tasks (_tasks/_cancel).
Cancel and delete async searches.
Today the 'manage' cluster privilege is required to cancel tasks and
to delete async searches when security features are enabled.
This new focused privilege allows to handle tasks and searches only.

The change also adds the privilege to the internal 'kibana_system'
and '_async_search' roles. They both need to be able to cancel tasks
and delete async searches.

Relates #67965
jimczi added a commit that referenced this pull request Feb 16, 2021
…8679) (#69023)

This change adds a new cluster privilege cancel_task that allows to:

Cancel running tasks (_tasks/_cancel).
Cancel and delete async searches.
Today the 'manage' cluster privilege is required to cancel tasks and
to delete async searches when security features are enabled.
This new focused privilege allows to handle tasks and searches only.

The change also adds the privilege to the internal 'kibana_system'
and '_async_search' roles. They both need to be able to cancel tasks
and delete async searches.

Relates #67965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.12.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants