-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Allow to disable destructive operations on all indices #4549
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
Comments
+1 |
+1 for delete_by_query, maybe also delete mapping? Being invoked from the Java api, doesn't require indices to be set at all. |
Agreed on delete mapping! |
I updated the the issue description, to better describe what will be changed. Not sure about the naming, so if anyone has a better name for it then please share it :) |
I think we can also replace |
Don't have a good name, here is the best I can come up with: |
@javanna Good point, I've updated the issue description. Maybe just |
|
Perhaps the |
Makes sense @martijnvg , I will close #4481 then. Let's also remember that currently |
@javanna Right, the close index api requires you to at least specify one index, alias or wildcard expression, this requirement should be removed. |
Changed to option name from |
I created #4627 to allow empty index in open/close index api. We might want to consider adding the open index api to the list of potentially dangerous apis when executed on all indices. In fact, if one opens for instance many big indices by mistake, this can result in more resources suddenly used on the cluster and lead to issues. |
What reason is there for supporting I think that all of these operations should require a value for Then this option becomes a
... which defaults to |
Makes sense, it makes things simpler and easier to understand for users. We don't need any change to open/close index api anymore, thus I closed #4627 and the related PR. |
I'll update this issue description. The small difference is that with Also for the |
Updated the issue description with what has been discussed. |
…rd expressions and `_all` is allowed to be used for destructive operat Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression) Closes elastic#4549 elastic#4481
…rd expressions and `_all` is allowed to be used for destructive operat Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression) Closes elastic#4549 elastic#4481
can this also be configured in elasticsearch.yml? |
Add
action.destructive_requires_name
in order to control whether wildcards and_all
are allowed for destructive operations.The following APIs are affected by this option and are considered destructive: delete index, close index, open index, delete_by_query and delete mapping.
The
action.destructive_requires_name
will default tofalse
, meaning that using wildcards and_all
in the mentioned APIs is allowed.In the delete api specifying an index will be made required, so
DELETE /
will not be allowed at all times regardless ofaction.destructive_requires_name
. (Like is mentioned in #4481)Also the
action.disable_delete_all_indices
option which is applicable for the delete index api and theaction.disable_close_all_indices
which is applicable for the close api will be dropped in favour foraction.destructive_requires_name
The text was updated successfully, but these errors were encountered: