-
Notifications
You must be signed in to change notification settings - Fork 206
[Serverless] Document impact of using logsDB for security users #6221
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
eed7716
First draft
nastasha-solomon fcb83ac
Merge branch 'main' into issue-5864-logsdb-serverless
nastasha-solomon aaa65b0
Fixes ref
nastasha-solomon dc5c9dd
Some light edits for grammar and clarity.
jmikell821 4b07ffe
Fixing broken ref link
jmikell821 85a24ab
Input from Kseniia and Vitalii
nastasha-solomon e22dc7c
Fix links
nastasha-solomon eb8f5b0
Kseniia's initial feedback
nastasha-solomon d282293
Update docs/serverless/rules/detections-logsdb-impact.asciidoc
nastasha-solomon ad0bc51
Removed extra word
nastasha-solomon 22be88c
Update docs/serverless/rules/detections-logsdb-impact.asciidoc
nastasha-solomon e05d0ff
Update docs/serverless/rules/detections-logsdb-impact.asciidoc
nastasha-solomon 33f823f
Update docs/serverless/rules/detections-logsdb-impact.asciidoc
nastasha-solomon 4f4765c
Merge branch 'main' into issue-5864-logsdb-serverless
nastasha-solomon 3f9e3f6
Update docs/serverless/rules/detections-logsdb-impact.asciidoc
nastasha-solomon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| [[detections-logsdb-index-mode-impact]] | ||
| = The impact of usage of logsDB index mode with {sec-serverless} | ||
|
|
||
| LogsDB is enabled by default for Elastic serverless. | ||
|
|
||
| With logsDB index mode, the original `_source` field is not stored in the index but can be reconstructed using {ref}/mapping-source-field.html#synthetic-source[synthetic `_source`]. | ||
|
|
||
| During the reconstruction of the `_source`, {ref}/mapping-source-field.html#synthetic-source-modifications[modifications compared] to the original data are possible. There could however happen to be a mismatch between how users expect field values to be formatted. | ||
|
|
||
| What does it mean for you? | ||
|
|
||
| [discrete] | ||
| [[logsdb-alerts]] | ||
| == Alerts | ||
|
|
||
| During alert creation, the `_source` event is copied over into the alert in order to keep reference to the original data. When the logsDB index mode is applied, the `_source` event stored in the alert will be an event reconstructed using synthetic `_source`. | ||
|
|
||
| If you are switching to using logsDB index mode, the `_source` field stored in the alert might look different in certain situations: | ||
|
|
||
| * {ref}/mapping-source-field.html#synthetic-source-modifications-leaf-arrays[Arrays can be reconstructed differently or deduplicated] | ||
| * {ref}/mapping-source-field.html#synthetic-source-modifications-field-names[Field names] | ||
|
|
||
| Alerts produced by the following rule types could be affected: | ||
|
|
||
| * Custom query | ||
| * Event correlation (non-sequence only) | ||
| * Non-aggregate rule types | ||
nastasha-solomon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Alerts that are generated by threshold, {ml}, and event correlation sequence rules are not affected as they do not contain copies of the original source. | ||
|
|
||
| [discrete] | ||
| [[logsdb-rule-actions]] | ||
| == Rule actions | ||
|
|
||
| While we do not recommend using `_source` for actions, in case when the action relies on the `_source`, the same limitations and changes apply. | ||
|
|
||
| If you send out your alerts using actions and then have logic outside of {sec-serverless} that is based on fields being in the format of the original source, their flows may be affected. In particular, affected fields would be array of objects. | ||
|
|
||
| We recommend checking and adjusting the rule actions using `_source` before switching to logsDB index mode. | ||
|
|
||
| [discrete] | ||
| [[logsdb-runtime-fields]] | ||
| == Runtime fields | ||
|
|
||
| Runtime fields on alerts index that reference `_source` may be affected. | ||
approksiu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Changes may be needed to the runtime field settings. | ||
|
|
||
| Here is an example of accessing `_source` that works with logsDB index mode enabled: | ||
|
|
||
| [source,console] | ||
| ---- | ||
| "source": """ emit(params._source.agent.name + "_____" + doc['agent.name'].value ); """ | ||
| "source": """ emit(params._source['agent']['name'] + "_____" + doc['agent.name'].value ); """ | ||
| "source": """ emit(field('agent.name').get(null) + "_____" + doc['agent.name'].value ); """ | ||
| "source": """ emit($('agent.name', null) + "_____" + doc['agent.name'].value ); """ | ||
| ---- | ||
|
|
||
| The following will not work with synthetic source (logsDB index mode enabled): | ||
|
|
||
| [source,console] | ||
| ---- | ||
| "source": """ emit(params._source['agent.name'] + "_____" + doc['agent.name'].value ); """ | ||
| ---- | ||
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.
Uh oh!
There was an error while loading. Please reload this page.