Repository navigation
[Auditd Manager] Add Session Data option - #11336
Merged
Merged
Conversation
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
opauloh
added a commit
to elastic/kibana
that referenced
this pull request
Oct 8, 2024
## Summary
Adding a handlebar helper to escape multiline strings. It has the same
function as `escapeStringHelper`, but does not wrap strings in single
quotes, allowing concatenation of escaped variables in the `hbs`
template such as this example:
```hbs
audit_rules: "{{escape_multiline_string audit_rules}}
{{escape_multiline_string "
# Session data audit rules
-a always,exit -F arch=b64 -S execve,execveat -k exec
-a always,exit -F arch=b64 -S exit_group
-a always,exit -F arch=b64 -S setsid"}}"
{{else}}
{{#if audit_rules}}
audit_rules: {{escape_string audit_rules}}
{{/if}}
{{/if}}
```
The above would not be possible using only `escape_string` as
`audit_rules` would be wrapped in single quotes.
## Screenshots
The example above illustrates how this option allows the Auditd manager
integration to append Session data audit rules to the `audit_rules`
field when Session data is enabled in the integration
([PR](elastic/integrations#11336)).
<img width="872" alt="image"
src="https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060">
<img width="801" alt="image"
src="https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2">
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 8, 2024
## Summary
Adding a handlebar helper to escape multiline strings. It has the same
function as `escapeStringHelper`, but does not wrap strings in single
quotes, allowing concatenation of escaped variables in the `hbs`
template such as this example:
```hbs
audit_rules: "{{escape_multiline_string audit_rules}}
{{escape_multiline_string "
# Session data audit rules
-a always,exit -F arch=b64 -S execve,execveat -k exec
-a always,exit -F arch=b64 -S exit_group
-a always,exit -F arch=b64 -S setsid"}}"
{{else}}
{{#if audit_rules}}
audit_rules: {{escape_string audit_rules}}
{{/if}}
{{/if}}
```
The above would not be possible using only `escape_string` as
`audit_rules` would be wrapped in single quotes.
## Screenshots
The example above illustrates how this option allows the Auditd manager
integration to append Session data audit rules to the `audit_rules`
field when Session data is enabled in the integration
([PR](elastic/integrations#11336)).
<img width="872" alt="image"
src="https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060">
<img width="801" alt="image"
src="https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2">
(cherry picked from commit 407137a)
opauloh
added a commit
to opauloh/kibana
that referenced
this pull request
Oct 8, 2024
## Summary
Adding a handlebar helper to escape multiline strings. It has the same
function as `escapeStringHelper`, but does not wrap strings in single
quotes, allowing concatenation of escaped variables in the `hbs`
template such as this example:
```hbs
audit_rules: "{{escape_multiline_string audit_rules}}
{{escape_multiline_string "
# Session data audit rules
-a always,exit -F arch=b64 -S execve,execveat -k exec
-a always,exit -F arch=b64 -S exit_group
-a always,exit -F arch=b64 -S setsid"}}"
{{else}}
{{#if audit_rules}}
audit_rules: {{escape_string audit_rules}}
{{/if}}
{{/if}}
```
The above would not be possible using only `escape_string` as
`audit_rules` would be wrapped in single quotes.
## Screenshots
The example above illustrates how this option allows the Auditd manager
integration to append Session data audit rules to the `audit_rules`
field when Session data is enabled in the integration
([PR](elastic/integrations#11336)).
<img width="872" alt="image"
src="https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060">
<img width="801" alt="image"
src="https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2">
(cherry picked from commit 407137a)
mjwolf
reviewed
Oct 9, 2024
Contributor
🚀 Benchmarks reportTo see the full report comment with |
|
💚 Build Succeeded
History
|
Contributor
Author
|
I also added one integration in this instance using the zip attached. Credentials here to access the instance. ScreenshotsAgent logsAgent logs shows that 8 of 8 audit rules was successfully added cc @mjwolf |
Contributor
|
Package auditd_manager - 1.18.0 containing this change is available at https://epr.elastic.co/search?package=auditd_manager |
4 tasks
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 4, 2025
* update doc * update version and kibana minimum version * add session_data to manifest * update handlebars rules * add changelog * fixing event.category to array * updating event category to allowed values * adjusting indentation
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 5, 2025
* update doc * update version and kibana minimum version * add session_data to manifest * update handlebars rules * add changelog * fixing event.category to array * updating event category to allowed values * adjusting indentation
1 of 5 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.







Proposed commit message
hbsfile to append Session Data Audit Rules and Session Data Processors when Session Data is selected.Checklist
changelog.ymlfile.How to test this PR locally
To test these changes, go to Kibana -> Integrations -> Create new integration -> upload it as a .zip; and upload the following package:
auditd_manager-1.18.0.zip
Please note. This Kibana PR should first be merged to test this integration.
Related issues
Screenshots
Session Data Switcher
elastic-agent .yml
Docs