-
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
[ResponseOps] add mustache string encoding support #168728
Comments
Pinging @elastic/response-ops (Team:ResponseOps) |
Thanks for opening this. |
Any progress on this? We have been needing to URL-encode values for a very long time now. We utilize markdown hyperlinks in every one of our Security Detection Rule alerts that link to a dashboard. The links are more often than not filtered by details from the alert. For instance, if |
Hey, @pmuellr! As discussed in Slack, I am posting a little more detail here as to the desire for a sort of You saw the template I use for my Security Detection Rule actions. The values for several fields like If we could URL-encode values, it would ensure that any markdown hyperlinks in alerts will not be broken by values containing invalid characters. In my case, my only issue arises with spaces, so a |
I think we'll need to support both If the complete URL is being provided to you as a mustache variable from the rule, it seems like we should URL already encoded, before making them available as variables. I'm wondering if there is some environment that would NOT be able to deal with properly encoded URLs. Seems unlikely to me. But if you are constructing the URL from a template, and filling in query string params with mustache variables, I think the only way to do that will be with some encoding lambdas as you suggest. |
Hate to be a squeaky wheel, but any updates on this? The lack of a URL encoding function in the mustache templating does add a load to my day-to-day activities, because I have to manually grab URL's from my alerts instead of just being able to click on them. It is a pretty big one for me. If there is anything I can do to help push this along, please let me know. |
I had started something, but am not seeing a PR for it. Let me find that and at least push up what I got ... |
resolves elastic#168728 not yet complete
Hey, @pmuellr , I see the draft PR and commit. Any chance we can get this merged? Been waiting quite a long time for this one, hahaha. |
Ya, sorry about the duration on this one. As Ying pointed out in the PR, we're going to have to do something different with this mustache lambda, since it should be sensitive to spaces, where all of our other lambdas are basically insensitve to spaces ... |
Why would it need to be sensitive to spaces? I only see that he mentioned the values should not be EDIT: Ah!!! "Spaces" as in " ". I was thinking "spaces" as in the working areas of Kibana. |
Please, please, please have some updates on this one?! 🙏🏼 It has been a really long time, and I need my alerts to be cleaned up. Any space in a hyperlink pretty much ruins the alert. I am a huge fan of Elastic (and a paying customer), but little things like this make my management ask why it can't be fixed. |
extracted from #84217
There have been requests for various sorts of string encoding to be added to our mustache support:
These should be relatively simple to add along-side our other mustache extensions.
Presumable they would look like this in the mustache template:
{{#EncodeBase64}}{{some-context-variable}}{{/EncodeBase64}}
cc: @shanisagiv1
The text was updated successfully, but these errors were encountered: