Skip to content
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

User is able to create agent tags with more than 20 characters through enroll command. #3101

Open
amolnater-qasource opened this issue Aug 8, 2022 · 7 comments
Labels
bug Something isn't working good first issue Good for newcomers impact:low Long-term priority, unless it's a quick fix. Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@amolnater-qasource
Copy link
Collaborator

Kibana version: 8.4 BC-2 Kibana cloud environment

Host OS and Browser version: All, All

Build details:

VERSION: 8.4.0
BUILD: 55166
COMMIT: 9e9e0d6a685cbc2858a85a357f93dcb76259fdee

Preconditions:

  1. 8.4 BC2 Kibana cloud environment should be available.

Steps to reproduce:

  1. Login to Kibana environment.
  2. Install an agent with say --tag= abcabcabcabcabcabcabcabcabcabc1234567890 (More than 20 characters.)
  3. Observe user is able to create tag with more than 20 characters.

Expected Result:
As per PR elastic/kibana#136019 (comment) it is expected that tag name should be limited to 20 characters.

Screenshots:
1
2

@amolnater-qasource amolnater-qasource added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team impact:medium labels Aug 8, 2022
@amolnater-qasource
Copy link
Collaborator Author

@manishgupta-qasource Please review.

@amolnater-qasource amolnater-qasource added impact:low Long-term priority, unless it's a quick fix. and removed impact:medium labels Aug 8, 2022
@manishgupta-qasource
Copy link
Collaborator

Secondary review for this ticket is Done

@amolnater-qasource
Copy link
Collaborator Author

Hi Team,

We have revalidated this issue on latest 8.10.0 SNAPSHOT kibana cloud environment and found it still reproducible.

Observations:

  • User is able to create agent tags with more than 20 characters tags with install command.

Screenshot:
image
image

Build details:
VERSION: 8.10.0 SNAPSHOT
BUILD: 65561
COMMIT: 4dadcbb91136a3e7d39e4b419aa12e21a37e4918

Please let us know if anything else is required from our end.

Thanks!

@pierrehilbert
Copy link
Contributor

As this sanitize is done at Kibana level, should be assigned to Fleet Team @jen-huang / @kpollich

@jlind23
Copy link
Contributor

jlind23 commented Nov 10, 2023

@pierrehilbert tags are supplied at the enrolment. Not sure Elastic Agent prevents you from using more than 20chars.. The only option for Kibana would be to truncate these tags then..

@pierrehilbert
Copy link
Contributor

Yes, that's the part of the code @juliaElastic wrote and @amolnater-qasource mentioned.
Will probably be better to have this check during enrollment but still a problem with the Sanitize function currently in place.

@jen-huang
Copy link

I'm moving this to fleet server. The sanitization code referenced is on Kibana send when tags are added/modified through UI, not adding during enrollment. We should have same set of sanitization on fleet server.

@jen-huang jen-huang transferred this issue from elastic/elastic-agent Nov 14, 2023
@jen-huang jen-huang added Team:Fleet Label for the Fleet team good first issue Good for newcomers and removed Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Nov 14, 2023
@jlind23 jlind23 added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team and removed Team:Fleet Label for the Fleet team labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers impact:low Long-term priority, unless it's a quick fix. Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

5 participants