Always use create op_type with ES 7.5+#13936
Merged
urso merged 1 commit intoelastic:masterfrom Oct 14, 2019
Merged
Conversation
Elasticsearch introduces the `create_doc` privilege, which always requires the op_type to be `create`. We would like to take advantage of this, in order to reduces the privileges Beats users have to set for Beats. In the future Elasticsearch will support `op_type == create` if documents without ID are indexed, but older Elasticsearch versions don't. This change always uses `op_type == create` when the Elasticsearch version is 7.5+.
262d12f to
f0e52a8
Compare
Contributor
|
@urso Can we add this for publishing monitoring events as well? Even with this change, that still requires a |
Author
|
@cwurm Not sure. The internal monitoring approach pushes to a special X-Pack endpoint, that is provided by a plugin in Elasticsearch. Some logic for creating indices and such is in the plugin, not on the Beats side. |
Contributor
Author
|
#9260 selects the bulk API based on configuration. Didn't notice that it uses another API as is modified here. @ycombinator can you follow up on the monitoring output? |
Contributor
|
Yes, thanks for the ping. I will follow up with a PR to make the necessary changes for the monitoring output. |
Contributor
|
PR for the analogous change in the libbeat monitoring ES client is up: #14313 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Elasticsearch introduces the
create_docprivilege, which alwaysrequires the op_type to be
create. We would like to take advantage ofthis, in order to reduces the privileges Beats users have to set for
Beats.
In the future Elasticsearch will support
op_type == createifdocuments without ID are indexed, but older Elasticsearch versions
don't.
This change always uses
op_type == createwhen the Elasticsearchversion is 7.5+.
Related ES changes: