elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
124 stars 134 forks source link

Agent tags should not be allowed to be special characters #699

Open juliaElastic opened 2 years ago

juliaElastic commented 2 years ago

Issue originally raised in Fleet UI: https://github.com/elastic/kibana/issues/135775

The same issue can happen when tags are set with agent enroll command.

Steps to reproduce:

  1. Enroll an agent with --tag option with special characters say, "Tags"
  2. Navigate to Kibana Fleet>Agents tab.
  3. Click on Tags dropdown filter and select "Tags".
  4. Observe error pop-ups related to Kuery is malformed:

Expected Result: User should not be able to enroll agents with tags with unsupported special characters which could show errors on selecting from tags filter.

ph commented 2 years ago

@juliaElastic Is there a list of supported characters or characters we should avoid or strip?