[Heartbeat] Add base64 encoding option to inline monitors#45100
Merged
emilioalvap merged 6 commits intomainfrom Jul 9, 2025
Merged
[Heartbeat] Add base64 encoding option to inline monitors#45100emilioalvap merged 6 commits intomainfrom
emilioalvap merged 6 commits intomainfrom
Conversation
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
mcapell
reviewed
Jul 1, 2025
mcapell
approved these changes
Jul 2, 2025
Contributor
|
@Mergifyio backport 8.17 8.18 8.19 9.0 9.1 |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
* Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395)
mergify bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
* Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395)
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
* Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395)
This was referenced Jul 9, 2025
mergify bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
* Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395)
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
* Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395)
6 tasks
emilioalvap
added a commit
that referenced
this pull request
Jul 10, 2025
…ne monitors (#45260) * [Heartbeat] Add base64 encoding option to inline monitors (#45100) * Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395) * Update CHANGELOG.next.asciidoc Co-authored-by: Marc Capell <marc.capell@gmail.com> --------- Co-authored-by: Emilio Alvarez Piñeiro <95703246+emilioalvap@users.noreply.github.com> Co-authored-by: Marc Capell <marc.capell@gmail.com>
emilioalvap
added a commit
that referenced
this pull request
Jul 10, 2025
…ine monitors (#45258) * [Heartbeat] Add base64 encoding option to inline monitors (#45100) * Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395) * Update CHANGELOG.next.asciidoc Co-authored-by: Marc Capell <marc.capell@gmail.com> --------- Co-authored-by: Emilio Alvarez Piñeiro <95703246+emilioalvap@users.noreply.github.com> Co-authored-by: Marc Capell <marc.capell@gmail.com>
emilioalvap
added a commit
that referenced
this pull request
Jul 10, 2025
…ine monitors (#45256) * [Heartbeat] Add base64 encoding option to inline monitors (#45100) * Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395) * Update CHANGELOG.next.asciidoc Co-authored-by: Marc Capell <marc.capell@gmail.com> --------- Co-authored-by: Emilio Alvarez Piñeiro <95703246+emilioalvap@users.noreply.github.com> Co-authored-by: Marc Capell <marc.capell@gmail.com>
emilioalvap
added a commit
that referenced
this pull request
Jul 10, 2025
…ine monitors (#45257) * [Heartbeat] Add base64 encoding option to inline monitors (#45100) * Add base64 encoding option to inline monitors * Fix linter * Fix linter * Remove unused Decode() method * Fix linter * Add changelog (cherry picked from commit 2266395) * Update CHANGELOG.next.asciidoc Co-authored-by: Marc Capell <marc.capell@gmail.com> --------- Co-authored-by: Emilio Alvarez Piñeiro <95703246+emilioalvap@users.noreply.github.com> Co-authored-by: Marc Capell <marc.capell@gmail.com>
6 tasks
This was referenced Feb 3, 2026
fkanout
added a commit
to elastic/kibana
that referenced
this pull request
Feb 20, 2026
…r monitors (#251499) It fixes #251477 Related to elastic/integrations#17208 ### Summary Encodes inline browser monitor scripts as base64 before sending to Fleet. This prevents Elastic Agent from interpreting JavaScript template literals (`${variable}`) as policy variables and mangling the scripts. Leverages the base64 encoding support added in Heartbeat via elastic/beats#45100 ### Changes - Add `base64InlineScriptFormatter` for private location browser monitors - Set `source.inline.encoding: 'base64'` in package policies - Remove unused `inlineSourceFormatter` reference from private formatters - Add `SOURCE_INLINE_ENCODING` config key ### Testing Verified with scripts containing: - JS template literals (`${variable}`) - Object literals (`{ key: value }`) - Multi-line scripts ### Scope - Private locations only (Fleet/Agent path) - Browser monitors with inline scripts only - Public locations and project monitors unaffected --------- Co-authored-by: Shahzad <shahzad31comp@gmail.com>
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
Add
encoding: base64option to inline monitors. This change allows inline monitors to support characters that would otherwise break yaml format.Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Related issues