elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.49k stars 8.05k forks source link

Missing privileges in agent logs (Superuser removal enhancement) #124529

Open criamico opened 2 years ago

criamico commented 2 years ago

Describe the feature: With the merge of https://github.com/elastic/kibana/issues/108252, in the Agent details view the logs will always show There are no logs messages to display even in the case that the user actually has logs but they just don’t have the required privileges to read them.

Screenshot 2022-02-03 at 15 04 39

We want to give the user a better indication of the problem. The proposed mock up is the following, it should explain the actual reason for the absence of logs when user doesn't have the privileges. It should also hide inactive filter controls.

Screenshot 2022-02-03 at 15 06 55

Agent logs component

In order to do this change, some further investigation is needed to detect the user privileges, and for this reason this enhancement will probably be shipped after 8.1.

elasticmachine commented 2 years ago

Pinging @elastic/fleet (Team:Fleet)

criamico commented 2 years ago

@mostlyjason @joshdover we discussed to replace Try adjusting your filter with Try adjusting your filter or checking your index privileges for 8.1, but the string for this subtext is in the infra plugin.

I could open a PR there or I could try to make a change in Fleet, but both of them would be a workaround until we determine the right privilege for the user. What do you suggest in this case?

joshdover commented 2 years ago

I think it's ok if we work on the actual enhancement we want to do in 8.2 as a small task and don't mess with changing the copy since it's not Fleet-specific right now.

We can reduce confusion here with documentation around how to configure these roles (add read index privileges for logs-elastic_agent.*)