Skip to content
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

Cherry-pick #22190 to 7.x: [Heartbeat] Add tls fields when connecting through proxy #22881

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Dec 3, 2020

Cherry-pick of PR #22190 to 7.x branch. Original message:

What does this PR do?

This updates Heartbeat to enrich an event with TLS information when the connection has been established via an HTTP proxy.

Why is it important?

Because tls fields are missing from events when an HTTPS connection is performed through a proxy.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

Tested with tinyproxy (HTTP) and stunnel+tinyproxy (HTTPS)

diff --git a/heartbeat/heartbeat.yml b/heartbeat/heartbeat.yml
index 19c3f79e96..3ed6e835e1 100644
--- a/heartbeat/heartbeat.yml
+++ b/heartbeat/heartbeat.yml
@@ -27,7 +27,9 @@ heartbeat.monitors:
   # Human readable display name for this service in Uptime UI and elsewhere
   name: My Monitor
   # List or urls to query
-  urls: ["http://localhost:9200"]
+  urls: ["https://elastic.co/"]
+  proxy_url: "https://localhost:3333/"
+  ssl.verification_mode: none
   # Configure task schedule
   schedule: '@every 10s'
   # Total test connection and data exchange timeout

Related issues

Closes #15797

This updates Heartbeat to enrich an event with TLS information when the
connection has been established via an HTTP proxy.

Closes elastic#15797

(cherry picked from commit cd16ca0)
@adriansr adriansr requested a review from a team as a code owner December 3, 2020 07:25
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 3, 2020
@adriansr adriansr added needs_team Indicates that the issue/PR needs a Team:* label Team:obs-ds-hosted-services Label for the Observability Hosted Services team labels Dec 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 3, 2020
@adriansr adriansr added needs_team Indicates that the issue/PR needs a Team:* label review labels Dec 3, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 3, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #22881 opened

  • Start Time: 2020-12-03T07:26:40.550+0000

  • Duration: 24 min 53 sec

Test stats 🧪

Test Results
Failed 0
Passed 932
Skipped 13
Total 945

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 932
Skipped 13
Total 945

@adriansr adriansr merged commit 5c6aedf into elastic:7.x Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement review Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants