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#57755albertzaharovits merged 3 commits intoelastic:masterfrom afharo:roles/kibana_system/add-view-metadata-and-monitoring
kibana_system role#57755Conversation
|
Pinging @elastic/es-security (:Security/Authorization) |
There was a problem hiding this comment.
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
kibanauser to collect Data telemetry in a background task by giving thekibana_systemreserved role theview_index_metadataandmonitoringprivileges on*.