-
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
[Fleet] Allow exclamation mark in enrollment token name #191807
[Fleet] Allow exclamation mark in enrollment token name #191807
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/fleet (Team:Fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, are there any other special characters that we should escape?
Thanks @juliaElastic! There is a list of special characters: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax. I tried them all, most work besides some fairly unusual ones ( |
I agree, probably not worth putting more effort now. Thanks for confirming. |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
Closes #191719
Attempting to generate a Fleet enrollment token with a name that ends with
!
produces a malformed ES query which causesPOST agents/enrollment_api_keys
to fail with 500.This PR adds a narrow fix by escaping question marks (which is a
query_string
special character).Note: this query probably wouldn't be necessary if we removed the constraint of unique name, as discussed in #155550.