elastic / kibana

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

[Cloud Security] [Agentless] Include X-Request-ID header in all Agentless API requests and logs #188692

Closed opauloh closed 3 days ago

opauloh commented 1 month ago

Motivation

Follow-up from https://github.com/elastic/agentless-api/issues/242, this ticket aims to include the X-Request-ID Header on all HTTP calls from the Kibana server to the Agentless API.

The idea of the X-Request-ID is that Kibana can create some random ID and pass it to the Agentless API. Both Kibana and the Agentless API will then include that ID in every log statement that it creates (creating agents, deleting agents, general errors, etc...).

If a customer receives an error it can include the ID in a bug report, allowing the SDH operators to look up the corresponding log statements (without having to rely on timestamps, IPs, etc).

As this ID is generated (randomly) by Kibana it does not contain any sensitive information (client_id, cluster_id, etc), and should not violate the user's privacy as a unique ID is created per request it does also not help with tracking users but provides insights for debugging issues.

Additional Info

For storing the correlation ID in Elasticsearch documents, ECS suggests using the http.request.id field.

Definition of done

Related tasks/epics

elasticmachine commented 1 month ago

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

opauloh commented 3 days ago

Closing this ticket in favour of https://github.com/elastic/kibana/issues/192048