elastic / elastic/beats

Heartbeat - Support SNI

Open
#34,329 5 comments 1 reaction 0 assignees View on GitHub
needs_team
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 15m
Merged PRs (30d)
385

Description

**Describe the enhancement:**
In Heartbeat, it should be possible to configure the servername that is passed for SNI.

Similar to https://github.com/elastic/beats/issues/12010

**Describe a specific use case for the enhancement or feature:**
In scenarios where the certificate and related hostname are not registered in DNS, or are registered but not pointing to the load balancer you wish to test, it should be possible to register the load balancer hostname in the monitor, and configure an SNI servername to use.

Our specific example: we have a kubernetes ingress serving many hostnames & certificates (e.g. `www.example.com`). It uses SNI to decide which certificate to pass to the requester. However, the kubernetes ingress is not accessed directly from the internet, so the hostname `www.example.com` DNS will not point to the kubernetes ingress, but to a cloud CDN.
Now, if we were to configure our monitor to test `www.example.com`, it will use DNS and only look at the certificate served the by the cloud CDN. Making it impossible to test the certificate served by the kubernetes ingress.

Contributor guide

Open the contributing guide

Research direction

Start with Heartbeat's monitor configuration and TLS connection path, then trace how the target hostname is resolved and passed during the handshake. The work is done when a monitor can configure a separate SNI servername, use it for certificate selection, and preserve existing behavior when it is unset; add or update coverage for the Kubernetes ingress use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking, observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.