-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Allow deletion of async searches with the manage privilege #67965
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
Conversation
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.
|
@elasticmachine update branch |
|
Pinging @elastic/es-search (Team:Search) |
albertzaharovits
left a comment
There was a problem hiding this 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.
.../qa/security/src/javaRestTest/java/org/elasticsearch/xpack/search/AsyncSearchSecurityIT.java
Outdated
Show resolved
Hide resolved
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 do we need anything else to grant this permission to the kibana user? Or does it already have it? |
|
@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. |
|
Please share the PR with me for tracking 🙏 |
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
…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
…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
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.