-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Add monitor and view_index_metadata to built-in kibana_system
role
#57755
Add monitor and view_index_metadata to built-in kibana_system
role
#57755
Conversation
Pinging @elastic/es-security (:Security/Authorization) |
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.
IIUC, privileges for 3 actions are required:
- GetIndexAction
- GetMappingsAction
- IndicesStatsAction
view_index_metadata
and monitor
grant many more privileges than required. Other than the 3 required actions, they also allow following actions:
- GetFieldMappingsAction
- ClusterSearchShardsAction
- GetSettingsAction
- ExplainLifecycleAction
- ValidateQueryAction
- RecoveryAction
- IndicesSegmentsAction
- GetSettingsAction
- IndicesShardStoresAction
- UpgradeStatusAction
We could potentially make new named privileges to get better granularity for the actions. But I am not sure whether it is premature and/or superficial, unless any above actions are expensive or can be easily abused.
Alternatively, I wonder if we could defer this to be a runtime configuration instead of code level. Sorry if this has been discussed already. I may not have the right context here, so I'll let other stack security team members to chime in.
Thanks for raising the PR, @afharo . I think the proposed change is relatively benign given that it roughly grants access to index settings and metadata, for all indices, which are already available in the response for GET cluster state, which is permitted under the existing Since our team meeting is scheduled in a couple of hours, let us have a quick sync on this one, and I'll report back. |
Just to clarify that I was not suggesting granting access for actions directly because it would be against our recommendation. I was wondering whether we could make a new named privilege (e.g. |
Thank you both on the updates! I'm sure you'll find the best approach to this. I'll let you discuss it thouroughly. Just let me know if you want me to apply any changes or go on with this one. |
Apologies Yang for disregarding your suggestion in the above. Of course discussions to reform the privileges structure doesn't have to hold this PR, so I would say we can merge this and discuss breaking the @ywangd would you agree with this course of action? |
@albertzaharovits Your analysis sounds right to me. Thanks for taking time to go through your reasoning. |
@elasticmachine update branch |
kibana_system
rolekibana_system
role
…ole (#57755) Allows the kibana user to collect data telemetry in a background task by giving the kibana_system built-in role the view_index_metadata and monitoring privileges over all indices (*).
Required for the reimplementation planned of elastic/kibana#64935. Allows the
kibana
user to collect Data telemetry in a background task by giving thekibana_system
reserved role theview_index_metadata
andmonitoring
privileges on*
.