Fix for issue #8425 ti_opencti integration causes field conflict#8428
Fix for issue #8425 ti_opencti integration causes field conflict#8428chrisberkhout merged 5 commits intoelastic:mainfrom routedlogic:ti_opencti
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.originalis removed if thepreserve_original_eventtag is NOT present.Added primary ingest pipeline processor to ensure
event.originalis converted to a text field if it exists, to support storage as a text keyword field as per ECS definition.Checklist
changelog.ymlfile.Author's Checklist
elastic-package buildcompleted without errorselastic-package checkcompleted without errorselastic-package test --generatecompleted without errorsHow to test this PR locally
Deploy and test locally using
elastic-packagebased stack.Related issues
Screenshots
Not applicable.