Skip to content

Add user to task description #124252

@dnhatn

Description

@dnhatn

Currently, we copy headers such as X-Opaque-Id, X-elastic-product-origin, etc., when creating a new task. In ES|QL, we would like to add the user to these headers so that we can identify which users are running heavy queries. However, we need to discuss the safety and feasibility before implementing the change.

  1. How sensitive is it to add the user to the task headers?
  2. We don't store the user directly in ThreadContext but rather the authentication token. Therefore, we need to deserialize when accessing the user, which can be expensive for every task/query.
  3. Should we add the user to all tasks or just ES|QL root task?
  4. An alternative is Kibana adding users when sending queries, and in Elasticsearch, we just add a new header for the user and copy it like the existing headers.

I might be missing something obvious here.

Metadata

Metadata

Assignees

Labels

:Analytics/ES|QLAKA ESQL:Core/Infra/CoreCore issues without another label:Security/SecuritySecurity issues without another labelTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Team:Core/InfraMeta label for core/infra teamTeam:SecurityMeta label for security team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions