-
Notifications
You must be signed in to change notification settings - Fork 444
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
Fix for issue #8425 ti_opencti integration causes field conflict #8428
Conversation
Hi Colin, Thanks for the PR! Turning on Currently, I notice that the string conversion step is generating a stringified object that isn't in JSON format: diff --git a/packages/ti_opencti/data_stream/indicator/agent/stream/cel.yml.hbs b/packages/ti_opencti/data_stream/indicator/agent/stream/cel.yml.hbs
index 3f6d08388..f07a0025c 100644
--- a/packages/ti_opencti/data_stream/indicator/agent/stream/cel.yml.hbs
+++ b/packages/ti_opencti/data_stream/indicator/agent/stream/cel.yml.hbs
@@ -53,7 +53,7 @@ program: |
bytes(resp.Body).decode_json().as(body, state.with({
"events": body.data.indicators.edges.map(e, e.node.with(
has(state.preserve_original_event) && state.preserve_original_event ?
- { "event": { "original": e.node } } :
+ { "event": { "original": e.node.encode_json() } } :
{}
)),
"want_more": body.data.indicators.pageInfo.hasNextPage, What do you think? |
Ah yes! I didn't actually double check the result in event.original :-( Yeap, doing it there instead also makes sense, zero issues. I'll adjust the PR. |
/test |
To make the tests pass, run |
rebuild done |
@colin-stubbs One more thing: there are conflicts to resolve, since a couple of other changes went in since the PR was opened. |
🌐 Coverage report
|
Package ti_opencti - 0.3.1 containing this change is available at https://epr.elastic.co/search?package=ti_opencti |
Proposed commit message
Added primary ingest pipeline processor to ensure
event.original
is removed if thepreserve_original_event
tag is NOT present.Added primary ingest pipeline processor to ensure
event.original
is converted to a text field if it exists, to support storage as a text keyword field as per ECS definition.Checklist
changelog.yml
file.Author's Checklist
elastic-package build
completed without errorselastic-package check
completed without errorselastic-package test --generate
completed without errorsHow to test this PR locally
Deploy and test locally using
elastic-package
based stack.Related issues
Screenshots
Not applicable.