-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
out_es: ensure integrity of already recorded logs
Since ElasticSearch 7.5, the "create_doc" index privilege was introduced, which ensures a role can only add new logs, but never modify or delete previously recorded ones. However, the "index" op_type has the semantic of changing a document if it already exists with the same "_id". Therefore, any requests with the "index" op_type are denied for a role whose only privilege is "create_doc". We solve this by replacing all "index" operations by the "create" operation. However, this has the side effect of producing status 409 errors whenever a previously successful operation is retried and the Generate_ID option is turned on. Therefore, we change the "elasticsearch_error_check" function to ignore this kind of error. Signed-off-by: Paulo Matias <[email protected]> Signed-off-by: Fujimoto Seiji <[email protected]>
- Loading branch information
Showing
2 changed files
with
71 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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