Skip to content

[AuditdManager] Reverting Session Data option - #11420

Merged
opauloh merged 4 commits into
elastic:mainfrom
opauloh:auditd_manager_revert
Oct 15, 2024
Merged

opauloh merged 4 commits into
elastic:mainfrom
opauloh:auditd_manager_revert

Conversation

@opauloh

@opauloh opauloh commented Oct 15, 2024 •

Copy link
Copy Markdown
Contributor

Proposed commit message

This PR reverts the Session Data option introduced on this PR.

The revert is needed because the 1.8.0 version relies on the escape_multiline_string helper that was introduced in Kibana in this PR.

It fixes the error below when attempting to save the Auditd Manager integration version 1.8.0 in Serverless environments that don't contain the Kibana changes:

image

Reasoning:

1.8.0 manifest was set to be enabled Starting on Kibana 8.16+, but serverless release cadences follow a different cadence and it's on version 9.0.0 already, therefore this Kibana PR must be deployed on serverless in order to escape_multiline_string be available.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

@opauloh opauloh added the bugfix Pull request that fixes a bug issue label Oct 15, 2024
@opauloh
opauloh requested a review from a team as a code owner October 15, 2024 18:30
@andrewkroh andrewkroh added Integration:auditd_manager Auditd Manager Team:Security-Linux Platform Linux Platform Security team [elastic/sec-linux-platform] labels Oct 15, 2024
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

Package auditd_manager 👍(0) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
auditd 13698.63 9009.01 -4689.62 (-34.23%) 💔

To see the full report comment with /test benchmark fullreport

version: "1.18.1"
description: "The Auditd Manager Integration receives audit events from the Linux Audit Framework that is a part of the Linux kernel."
type: integration
categories:

@andrewkroh andrewkroh Oct 15, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to include ^9.0.0 in the kibana condition should be backed out too. As per the email to the elastic-packages mailing list,

"TLDR; Please don't update the kibana constraints in packages for 9.0.0 yet. We will communicate a more definitive plan in the following weeks."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted, thanks for the info

failure_mode: {{failure_mode}}
{{#if session_data}}
audit_rules: "{{escape_multiline_string audit_rules}}
{{escape_multiline_string "

@andrewkroh andrewkroh Oct 15, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding escape_multiline_string, if we could get a to_json function (that doesn't exempt string types) this would cover many use cases of properly encoding data for use inside of YAML. The fact that the current to_json helper exempts strings makes is almost useless (in fact, it's never used in this repo). I would love to see the string exemption removed, then we could use to_json here to form a properly escaped string.

For example, this would become audit_rules: {{ to_json audit_rules }}, and we would not have to think about escaping anything because JSON encoding is entirely valid within YAML.

@opauloh opauloh Oct 15, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is similar to what I faced when I noticed that escape_string always wraps the string with single quotes, it doesn't allow for flexibility with concatenating YAMLs.

I will check the possibility of enhancing the to_json in Kibana to remove the string exempt instead if that can provide more value, I didn't notice it wasn't being used

@elastic-sonarqube

Copy link
Copy Markdown

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

@opauloh
opauloh merged commit c76f80f into elastic:main Oct 15, 2024
@opauloh
opauloh deleted the auditd_manager_revert branch October 15, 2024 21:26
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package auditd_manager - 1.18.1 containing this change is available at https://epr.elastic.co/search?package=auditd_manager

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
* reverting session_data toggle

* updating PR changelog

* fixing change type

* reverting kibana changes
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
* reverting session_data toggle

* updating PR changelog

* fixing change type

* reverting kibana changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:auditd_manager Auditd Manager Team:Security-Linux Platform Linux Platform Security team [elastic/sec-linux-platform]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants