-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Reduce permissions. #90302
[Fleet] Reduce permissions. #90302
Conversation
I am concerned these privileges will not work in the case where the index template exists for the data stream, but the data stream has not been created yet. When I attempted it here it failed. Have these permissions been validated in Kibana for this edge case? |
06d8020
to
66688db
Compare
@scunningham I think I'm seeing the same as you. How I'm testing:
Result:
@ph @ruflin How should we proceed here? Wait for a conclusion in elastic/elasticsearch#68414 ? |
@scunningham as you have noted these privileges aren't working for us? @skh Let's do this, keep the permission we had before but use the pattern that you have in this PR, we have to see where the permission discussion from @scunningham is going, we can't do more than that. |
66688db
to
ac190bf
Compare
ac190bf changes the privileges to what they were before. The backing indices are still removed. |
Pinging @elastic/fleet (Feature:Fleet) |
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
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.
The changes look good to me, @skh have you tested it with the Elastic Agent?
Yes, local installation on linux, from tar.gz, with default policy & system integration. I see data streams coming in. |
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.
🚀 Tested locally and it works as expected
- 'write', 'create_index' -> 'auto_configure', 'create_doc'
a521d70
to
e4f5feb
Compare
Privileges were changed to |
@EricDavisX FYI when @skh merges this we should keep an eye on the QA side of it for any errors concerning permission on ingestion. |
Indeed it seems to, thanks for pointing that out. |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
* Reduce permissions. * Change permissions back. * Reducing permissions on fleet_enroll role - 'write', 'create_index' -> 'auto_configure', 'create_doc' * Remove indices:admin/auto_create from privileges.
* master: (44 commits) [APM] Add experimental support for Data Streams (elastic#89650) [Search Session] Control "Kibana / Search Sessions" management section by privileges (elastic#90818) [Lens] Median as default function (elastic#90952) Implement custom global header banner (elastic#87438) [Fleet] Reduce permissions. (elastic#90302) Update dependency @elastic/charts to v24.5.1 (elastic#89822) [Create index pattern] Can't create single character index without wildcard (elastic#90919) [ts/build_ts_refs] add support for --clean flag (elastic#91060) Don't clean when running e2e tests (elastic#91057) Fixes track_total_hits in the body not having an effect when using search strategy (elastic#91068) [Security Solution][Detections] Adds list plugin Saved Objects to Security feature privilege (elastic#90895) Removing the code plugin entirely for 8.0 (elastic#77940) chore(NA): move the instruction to remove yarn global bazelisk package into the first place on install bazel tools (elastic#91026) [jest/ci] remove max-old-space-size override to use 4gb default (elastic#91020) [Fleet] Restrict integration changes for managed policies (elastic#90675) [CI] Fix auto-backport condditions so that it doesn't trigger for other labels (elastic#91042) [DOCS] Uses variable to refer to query profiler (elastic#90976) [App Search] Relevance Tuning logic listeners (elastic#89461) [Metrics UI] Fix saving/loading saved views from URL (elastic#90216) Limit cardinality of transaction.name (elastic#90955) ...
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.
Looks good to me. I think this is the best we can do right now.
Thank you!
Summary
Partly fixes #89713
This change removes the backing indices from the privileges of the
fleet_enroll
rule.It changes the privileges of the role from
['write', 'create_index', 'indices:admin/auto_create']
to['auto_configure', 'create_doc']
.How to test this
Try to break it with your typical use of fleet. If you have use cases that are not covered by CI tests, please do test those.
Alternatively, look at the changes and comment when you think they are problematic.