Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…195497) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] add escapeMultilineString Handlebar helper (#195159)](#195159) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Paulo Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-08T18:56:08Z","message":"[Fleet] add escapeMultilineString Handlebar helper (#195159)\n\n## Summary\r\n\r\nAdding a handlebar helper to escape multiline strings. It has the same\r\nfunction as `escapeStringHelper`, but does not wrap strings in single\r\nquotes, allowing concatenation of escaped variables in the `hbs`\r\ntemplate such as this example:\r\n\r\n```hbs\r\naudit_rules: \"{{escape_multiline_string audit_rules}}\r\n {{escape_multiline_string \"\r\n # Session data audit rules\r\n -a always,exit -F arch=b64 -S execve,execveat -k exec\r\n -a always,exit -F arch=b64 -S exit_group\r\n -a always,exit -F arch=b64 -S setsid\"}}\"\r\n{{else}}\r\n {{#if audit_rules}}\r\naudit_rules: {{escape_string audit_rules}}\r\n {{/if}}\r\n{{/if}}\r\n```\r\n\r\nThe above would not be possible using only `escape_string` as\r\n`audit_rules` would be wrapped in single quotes.\r\n\r\n## Screenshots\r\n\r\nThe example above illustrates how this option allows the Auditd manager\r\nintegration to append Session data audit rules to the `audit_rules`\r\nfield when Session data is enabled in the integration\r\n([PR](https://github.com/elastic/integrations/pull/11336)).\r\n\r\n<img width=\"872\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060\">\r\n\r\n<img width=\"801\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2\">","sha":"407137a6befb38f34cb11f6a3b6a741a27977031","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","v8.16.0","backport:version"],"number":195159,"url":"https://github.com/elastic/kibana/pull/195159","mergeCommit":{"message":"[Fleet] add escapeMultilineString Handlebar helper (#195159)\n\n## Summary\r\n\r\nAdding a handlebar helper to escape multiline strings. It has the same\r\nfunction as `escapeStringHelper`, but does not wrap strings in single\r\nquotes, allowing concatenation of escaped variables in the `hbs`\r\ntemplate such as this example:\r\n\r\n```hbs\r\naudit_rules: \"{{escape_multiline_string audit_rules}}\r\n {{escape_multiline_string \"\r\n # Session data audit rules\r\n -a always,exit -F arch=b64 -S execve,execveat -k exec\r\n -a always,exit -F arch=b64 -S exit_group\r\n -a always,exit -F arch=b64 -S setsid\"}}\"\r\n{{else}}\r\n {{#if audit_rules}}\r\naudit_rules: {{escape_string audit_rules}}\r\n {{/if}}\r\n{{/if}}\r\n```\r\n\r\nThe above would not be possible using only `escape_string` as\r\n`audit_rules` would be wrapped in single quotes.\r\n\r\n## Screenshots\r\n\r\nThe example above illustrates how this option allows the Auditd manager\r\nintegration to append Session data audit rules to the `audit_rules`\r\nfield when Session data is enabled in the integration\r\n([PR](https://github.com/elastic/integrations/pull/11336)).\r\n\r\n<img width=\"872\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060\">\r\n\r\n<img width=\"801\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2\">","sha":"407137a6befb38f34cb11f6a3b6a741a27977031"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195159","number":195159,"mergeCommit":{"message":"[Fleet] add escapeMultilineString Handlebar helper (#195159)\n\n## Summary\r\n\r\nAdding a handlebar helper to escape multiline strings. It has the same\r\nfunction as `escapeStringHelper`, but does not wrap strings in single\r\nquotes, allowing concatenation of escaped variables in the `hbs`\r\ntemplate such as this example:\r\n\r\n```hbs\r\naudit_rules: \"{{escape_multiline_string audit_rules}}\r\n {{escape_multiline_string \"\r\n # Session data audit rules\r\n -a always,exit -F arch=b64 -S execve,execveat -k exec\r\n -a always,exit -F arch=b64 -S exit_group\r\n -a always,exit -F arch=b64 -S setsid\"}}\"\r\n{{else}}\r\n {{#if audit_rules}}\r\naudit_rules: {{escape_string audit_rules}}\r\n {{/if}}\r\n{{/if}}\r\n```\r\n\r\nThe above would not be possible using only `escape_string` as\r\n`audit_rules` would be wrapped in single quotes.\r\n\r\n## Screenshots\r\n\r\nThe example above illustrates how this option allows the Auditd manager\r\nintegration to append Session data audit rules to the `audit_rules`\r\nfield when Session data is enabled in the integration\r\n([PR](https://github.com/elastic/integrations/pull/11336)).\r\n\r\n<img width=\"872\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/325d784d-26a4-4dfe-9d0e-54d51c3ed060\">\r\n\r\n<img width=\"801\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ebd521c0-4471-48f9-ba8d-94630ea0efd2\">","sha":"407137a6befb38f34cb11f6a3b6a741a27977031"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
- Loading branch information