-
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
Add read permissions to the Kibana system user for the diagnostic telemetry #85391
Comments
There's been a bit of communication regarding this request outside of this GitHub issue, primarily around this using I've prepared elastic/elasticsearch#66135 to grant the |
As far as I know we should already have the |
…int.diagnostic.collection-*` (#66135) The endpoint protections team is storing diagnostic information in the .logs-endpoint.diagnostic.collection-* indices, which Kibana will read from to send the data to the remote telemetry service. Resolves elastic/kibana#85391
…int.diagnostic.collection-*` (elastic#66135) The endpoint protections team is storing diagnostic information in the .logs-endpoint.diagnostic.collection-* indices, which Kibana will read from to send the data to the remote telemetry service. Resolves elastic/kibana#85391
…nt.diagnostic.collection-*` (#66135) The endpoint protections team is storing diagnostic information in the .logs-endpoint.diagnostic.collection-* indices, which Kibana will read from to send the data to the remote telemetry service. Resolves elastic/kibana#85391 Co-authored-by: Brandon Kobel <brandon.kobel@elastic.co>
QQ on reading from this index - should the leading period be specified or not for 7.11? |
@pjhampton FWIW, I was operating on the assumption that we'd have the leading period per #85391 (comment) and the |
Thanks @ruflin I was operating under the impression that there would be no leading I understand that the preference is to add the leading Yesterday, I was working on e2e testing everything. I had these observations requiring at least 3 changes:
Making the Kibana changes locally and testing would be easy. I'd like for us to also test with a dev Endpoint which will stream docs to the index with a leading In the meantime, I'll work on a full e2e with the existing workflow. We needed the team to enable diagnostic alerts globally before the full e2e was possible. This tells the Endpoint that it can stream diagnostic alerts. From the conversation yesterday, that should be enabled today. |
@kevinlog you are correct, endpoint sends without the leading dot. All indices Endpoint sends to do not have a leading dot when it sends, i think the pipeline handles adding it. If this does need to be changed on the Endpoint side can you just make an |
I have an update regarding the testing the leading Right now, it looks like the Locally, I tested with the index being named as I generated the alerts on my Endpoint and confirmed that the Endpoint attempted to create the alert and send it to However, the it failed to create the index with this in the log message:
In the UI, I can see that the index template is a system template when I add the leading The index template is a fleet managed template when I leave off the leading We've confirmed e2e that what we have worked WITHOUT the leading I think if we could get the cc @pjhampton @tsg @ruflin @ferullo - let me know if the above makes sense |
I didn't know that the UI would show a System template when prefixed. This is interesting because I'm pretty sure it also contains the managed flag. For the permissions, the place you are looking for is here: https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/server/services/setup.ts#L140 I would suggest to add very specific permissions for this data stream in there. But there is a catch with this. All the existing API keys will not get their permissions updated, so only newly enrolled endpoints will have the permissions :-( We plan to implement something around "refresh" API Keys but not there yet. @nchaulet One more use cause of this. |
@ruflin thanks for the input. I tried adding some additional indices and permissions here: f62bf54 I tried to be more specific since we just want to target a particular data_stream. I was running into the same problems as before in my testing (same log output as in this comment #85391 (comment)). I'm going to keep trying, but let me know if there's anything that looks wrong in the code sample I pushed up. As of right now, if we merge these changes, I believe there will be a regression since the Endpoint can't create the |
Good news, I've got the leading My PR now has the correct changes in permissions to allow the Endpoint to create the How I tested/results After executing the ransomware script, the Endpoint sent the alert to the diagnostic index. The index template created by Fleet: The Here are the 3 PRs that would need to merge to include the
This looks like it's working, so I would be OK to merge these changes. If we determine the risk is too high, the alternative is to change the index name in the ES PR: elastic/elasticsearch#66135 Only newly enrolled Endpoints would ship diagnostic alerts |
Diagnostic Alert Telemetry is being added in #84422. The code uses the
kibana_system
user to query the hidden data streamlogs-endpoint.diagnostic.collection-*
.We'd like to give
kibana_system
read-only access to these indices.FYI @kobelb @peteharverson @stevewritescode @joe-desimone
The text was updated successfully, but these errors were encountered: