Skip to content

Implement ECK monitoring support for presenting client certificates to elasticsearch#9334

Merged
pkoutsovasilis merged 2 commits intoelastic:mainfrom
pkoutsovasilis:feat/mtls_es_monitoring
Apr 17, 2026
Merged

Implement ECK monitoring support for presenting client certificates to elasticsearch#9334
pkoutsovasilis merged 2 commits intoelastic:mainfrom
pkoutsovasilis:feat/mtls_es_monitoring

Conversation

@pkoutsovasilis
Copy link
Copy Markdown
Contributor

@pkoutsovasilis pkoutsovasilis commented Apr 9, 2026

Summary

This PR adds client certificate support to the stack monitoring (Metricbeat/Filebeat sidecar) infrastructure so that monitoring sidecars can authenticate via mTLS when connecting to Elasticsearch clusters that have client authentication enabled. This covers two distinct scenarios: the Metricbeat sidecar connecting to the source (monitored) Elasticsearch over its HTTP endpoint, and the monitoring output connecting to the target (monitoring) Elasticsearch cluster.

Relates #9081

Changes

  • Common stackmon output config: Extended buildOutputConfig to return a third value — a client certificate volume — when the monitoring target ES association has clientCertSecretName configured. Adds ssl.certificate and ssl.key to the Beat output configuration pointing to the mounted client certificate files
  • Common stackmon sidecar: Extended NewMetricBeatSidecar to accept an optional clientCertVolume parameter, which is mounted into the sidecar container alongside the existing CA volume
  • Elasticsearch Metricbeat sidecar: When the monitored Elasticsearch cluster has client authentication enabled (clientAuthenticationRequired), the operator mounts the internal operator client certificate into the Metricbeat sidecar so it can authenticate to the local ES HTTP endpoint via mTLS. The clientAuthenticationRequired
    flag is threaded through WithMonitoring, ReconcileConfigSecrets, and Metricbeat
  • E2e tests: Added TestESStackClientAuthTransitionMonitored (verifies monitoring continues working when the monitored ES transitions from client auth enabled to disabled) and TestESStackClientAuthTransitionMonitoring (verifies monitoring continues working when the monitoring target ES transitions from client auth enabled to
    disabled)

@pkoutsovasilis pkoutsovasilis self-assigned this Apr 9, 2026
@pkoutsovasilis pkoutsovasilis added >feature Adds or discusses adding a feature to the product v3.5.0 (next) labels Apr 9, 2026
@prodsecmachine
Copy link
Copy Markdown
Collaborator

prodsecmachine commented Apr 9, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@pkoutsovasilis
Copy link
Copy Markdown
Contributor Author

buildkite test this -f p=gke,t=TestESStackClientAuthTransition.*,E2E_TAGS=es -m s=9.3.3,s=8.19.14,s=9.2.8

@pkoutsovasilis pkoutsovasilis force-pushed the feat/mtls_es_monitoring branch from 48ba8b5 to e8d27fc Compare April 15, 2026 12:13
@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review April 15, 2026 12:14
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner April 15, 2026 12:14
@pkoutsovasilis
Copy link
Copy Markdown
Contributor Author

buildkite test this -f p=gke,t=TestESStackClientAuthTransition.*,E2E_TAGS=es -m s=9.3.3,s=8.19.14,s=9.2.8,s=9.4.0-SNAPSHOT

@pkoutsovasilis pkoutsovasilis merged commit 0b8582a into elastic:main Apr 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>feature Adds or discusses adding a feature to the product v3.5.0 (next)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants