Use less restrictive API to check if template exists#13847
Merged
cwurm merged 3 commits intoelastic:masterfrom Oct 3, 2019
Merged
Use less restrictive API to check if template exists#13847cwurm merged 3 commits intoelastic:masterfrom
cwurm merged 3 commits intoelastic:masterfrom
Conversation
This was referenced Sep 30, 2019
urso
reviewed
Sep 30, 2019
urso
approved these changes
Sep 30, 2019
b391371 to
6d26df7
Compare
6d26df7 to
e51e01f
Compare
cwurm
pushed a commit
that referenced
this pull request
Oct 14, 2019
Updates the writer role documentation based on #13847 and #13848. Also corrects some mistakes. 1. Changes `read from` to the correct `write to` (Beats does not read from indices). 2. Setting `setup.template.enabled` to `false` is no longer necessary after #13847. 3. Setting `setup.ilm.overwrite` to `false` is unnecessary if `setup.ilm.check_exists` is already `false` (even today). 4. Adds a note about only `monitor` and `create_doc` being always necessary, explicitly calling out the most secure configuration (following #13847 and #13848). 5. Correct what `monitor` is for: It's for checking things like cluster version and license, not "sending monitor info". 6. Replaces `manage_pipeline` with the read-only `cluster:admin/ingest/pipeline/get`. Unfortunately, there is no read-only cluster role for pipelines, so it requires this privilege. But better than the very permissive `manage_pipeline` that allows changing any pipeline. 7. Changes `index` to the more restrictive, append-only `create_doc` (introduced in elastic/elasticsearch#45806).
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.
Switches from using
HEAD _template/{name}toGET _cat/templates/{name}to check if a template exists before trying to load it.The significance is that the
_cat/templatesAPI requires only themonitorcluster privilege and not the far more permissivemanage_index_templates. With this change, the default Beats configuration works without any unnecessary write privileges for publishing. (Note: The documentation recommended settingsetup.template.enabledtofalsewhich turns off the template check completely.)This is one of three PRs to reduce the Beats privileges required in code and documentation:
Relates: #10241