windows: fix support for user-provided processors#4180
Merged
efd6 merged 1 commit intoelastic:mainfrom Sep 12, 2022
Merged
Conversation
9493b65 to
dabb947
Compare
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
🌐 Coverage report
|
The user-provided YAML is deindented before being appended to the existing lines from the agent template. This results in an indentation disagreement such as this: processors: - translate_sid: field: winlog.event_data.MemberSid account_name_target: winlog.event_data._MemberUserName domain_target: winlog.event_data._MemberDomain account_type_target: winlog.event_data._MemberAccountType ignore_missing: true ignore_failure: true - add_fields: target: project fields: name: myproject id: '574734885120952459' This results in a YAML parse failure. So deindent the translate_sid processor.
dabb947 to
475a59f
Compare
belimawr
approved these changes
Sep 12, 2022
leehinman
approved these changes
Sep 12, 2022
Contributor
leehinman
left a comment
There was a problem hiding this comment.
I think this is the second time I've seen this bug with indentation inside of lists with static & user supplied content. I wonder if we could get a check in elastic-package to help catch this? It is really hard for developers to spot.
Contributor
Author
|
@leehinman Yes, that would be really helpful. I had to edit the running kibana instance to see what it was having issues with. A real solution would be for the full error rendering to provide not just the error text, but the input syntax that caused the error ± a couple of lines of context. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The user-provided YAML is deindented before being appended to the existing lines from the agent template. This results in an indentation disagreement such as this:
This results in a YAML parse failure. So deindent the translate_sid processor.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Attempt to add the
add_fieldsprocessor to any of thepowershell,powershell_operationalorsysmon_operationaldatastreams when installing the windows integration here.Related issues
Screenshots