From d097546ab2ef2476ad5472ccbc31b28f77e1a390 Mon Sep 17 00:00:00 2001 From: "Lee E. Hinman" Date: Wed, 17 Dec 2025 16:36:11 -0600 Subject: [PATCH 1/2] handle curve_types to []curve_types conversion in beat es config --- ...-for-elasticsearch-config-translation.yaml | 47 +++++++++++++++++++ go.mod | 2 +- go.sum | 4 +- internal/edot/go.mod | 2 +- internal/edot/go.sum | 4 +- .../otel/translate/output_elasticsearch.go | 6 +++ .../translate/output_elasticsearch_test.go | 2 +- 7 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 changelog/fragments/1766011716-handle-curve_types-to-[]curve_types-conversion-for-elasticsearch-config-translation.yaml diff --git a/changelog/fragments/1766011716-handle-curve_types-to-[]curve_types-conversion-for-elasticsearch-config-translation.yaml b/changelog/fragments/1766011716-handle-curve_types-to-[]curve_types-conversion-for-elasticsearch-config-translation.yaml new file mode 100644 index 00000000000..b8bc85ed3f8 --- /dev/null +++ b/changelog/fragments/1766011716-handle-curve_types-to-[]curve_types-conversion-for-elasticsearch-config-translation.yaml @@ -0,0 +1,47 @@ +# REQUIRED +# Kind can be one of: +# - breaking-change: a change to previously-documented behavior +# - deprecation: functionality that is being removed in a later release +# - bug-fix: fixes a problem in a previous version +# - enhancement: extends functionality but does not break or fix existing behavior +# - feature: new functionality +# - known-issue: problems that we are aware of in a given version +# - security: impacts on the security of a product or a user’s deployment. +# - upgrade: important information for someone upgrading from a prior version +# - other: does not fit into any of the other categories +kind: bug-fix + +# REQUIRED for all kinds +# Change summary; a 80ish characters long description of the change. +summary: handle curve_types to []curve_types conversion for elasticsearch config translation + +# REQUIRED for breaking-change, deprecation, known-issue +# Long description; in case the summary is not enough to describe the change +# this field accommodate a description without length limits. +# description: + +# REQUIRED for breaking-change, deprecation, known-issue +# impact: + +# REQUIRED for breaking-change, deprecation, known-issue +# action: + +# REQUIRED for all kinds +# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc. +component: elastic-agent + +# AUTOMATED +# OPTIONAL to manually add other PR URLs +# PR URL: A link the PR that added the changeset. +# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. +# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. +# Please provide it if you are adding a fragment for a different PR. +# pr: https://github.com/owner/repo/1234 +pr: https://github.com/elastic/elastic-agent/pull/11892 + +# AUTOMATED +# OPTIONAL to manually add other issue URLs +# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of). +# If not present is automatically filled by the tooling with the issue linked to the PR number. +# issue: https://github.com/owner/repo/1234 +issue: https://github.com/elastic/elastic-agent/issues/11776 diff --git a/go.mod b/go.mod index 0378ef8a146..af4a1947e00 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae github.com/elastic/elastic-agent-autodiscover v0.10.0 github.com/elastic/elastic-agent-client/v7 v7.17.2 - github.com/elastic/elastic-agent-libs v0.28.0 + github.com/elastic/elastic-agent-libs v0.29.0 github.com/elastic/elastic-agent-system-metrics v0.13.5 github.com/elastic/elastic-transport-go/v8 v8.8.0 github.com/elastic/go-elasticsearch/v8 v8.19.0 diff --git a/go.sum b/go.sum index 15d72cc799c..9db94b8b432 100644 --- a/go.sum +++ b/go.sum @@ -161,8 +161,8 @@ github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQB github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE= github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA= github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk= -github.com/elastic/elastic-agent-libs v0.28.0 h1:UDL9aSxgjqC9TrHAEHgI8gtuhRYPM/1gSfh7ztHWWLw= -github.com/elastic/elastic-agent-libs v0.28.0/go.mod h1:0xUg7alsNE/WhY9DZRIdTYW75nqSHC1octIAg//j/PQ= +github.com/elastic/elastic-agent-libs v0.29.0 h1:PstDLTwqiN/5Z6WBycwWtP8ggaFVmwkD4d1amU0855I= +github.com/elastic/elastic-agent-libs v0.29.0/go.mod h1:0xUg7alsNE/WhY9DZRIdTYW75nqSHC1octIAg//j/PQ= github.com/elastic/elastic-agent-system-metrics v0.13.5 h1:VPTkk3C0ixsgqhAS2S++0/BKe+X6tYn+GzHbBLVuiO4= github.com/elastic/elastic-agent-system-metrics v0.13.5/go.mod h1:JNfnZrC0viAjlJRUzQKKuMpDlXgjXBn4WdWEXQF7jcA= github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo= diff --git a/internal/edot/go.mod b/internal/edot/go.mod index 9c7a6aa458b..b2e98b90240 100644 --- a/internal/edot/go.mod +++ b/internal/edot/go.mod @@ -10,7 +10,7 @@ replace github.com/elastic/beats/v7 => ../../beats require ( github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251217000341-af5d23e75f47 github.com/elastic/elastic-agent v0.0.0-00010101000000-000000000000 - github.com/elastic/elastic-agent-libs v0.28.0 + github.com/elastic/elastic-agent-libs v0.29.0 github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.24.0 github.com/elastic/opentelemetry-collector-components/connector/profilingmetricsconnector v0.25.0 github.com/elastic/opentelemetry-collector-components/extension/apikeyauthextension v0.24.0 diff --git a/internal/edot/go.sum b/internal/edot/go.sum index 6b67a2c0ead..4ee0b0c55ca 100644 --- a/internal/edot/go.sum +++ b/internal/edot/go.sum @@ -447,8 +447,8 @@ github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQB github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE= github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA= github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk= -github.com/elastic/elastic-agent-libs v0.28.0 h1:UDL9aSxgjqC9TrHAEHgI8gtuhRYPM/1gSfh7ztHWWLw= -github.com/elastic/elastic-agent-libs v0.28.0/go.mod h1:0xUg7alsNE/WhY9DZRIdTYW75nqSHC1octIAg//j/PQ= +github.com/elastic/elastic-agent-libs v0.29.0 h1:PstDLTwqiN/5Z6WBycwWtP8ggaFVmwkD4d1amU0855I= +github.com/elastic/elastic-agent-libs v0.29.0/go.mod h1:0xUg7alsNE/WhY9DZRIdTYW75nqSHC1octIAg//j/PQ= github.com/elastic/elastic-agent-system-metrics v0.13.5 h1:VPTkk3C0ixsgqhAS2S++0/BKe+X6tYn+GzHbBLVuiO4= github.com/elastic/elastic-agent-system-metrics v0.13.5/go.mod h1:JNfnZrC0viAjlJRUzQKKuMpDlXgjXBn4WdWEXQF7jcA= github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo= diff --git a/internal/pkg/otel/translate/output_elasticsearch.go b/internal/pkg/otel/translate/output_elasticsearch.go index 1ac442c63bb..c01a50be5f5 100644 --- a/internal/pkg/otel/translate/output_elasticsearch.go +++ b/internal/pkg/otel/translate/output_elasticsearch.go @@ -300,6 +300,12 @@ func cfgDecodeHookFunc() mapstructure.DecodeHookFunc { return nil, fmt.Errorf("failed parsing ssl supported_protocols: %w", err) } return []tlscommon.TLSVersion{tlsVersion}, nil + case t == reflect.TypeOf([]tlscommon.TLSCurveType{tlscommon.TLSCurveType(0)}): + tlsCurveType := tlscommon.TLSCurveType(0) + if err := tlsCurveType.Unpack(data); err != nil { + return nil, fmt.Errorf("failed parsing ssl curve_types: %w", err) + } + return []tlscommon.TLSCurveType{tlsCurveType}, nil default: return data, nil } diff --git a/internal/pkg/otel/translate/output_elasticsearch_test.go b/internal/pkg/otel/translate/output_elasticsearch_test.go index bb156907651..1f074d53839 100644 --- a/internal/pkg/otel/translate/output_elasticsearch_test.go +++ b/internal/pkg/otel/translate/output_elasticsearch_test.go @@ -181,7 +181,7 @@ api_key: "TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA" ssl.certificate_authorities: "/not/a/real/path/ca.pem" ssl.supported_protocols: "TLSv1.3" ssl.cipher_suites: "ECDHE-ECDSA-AES-256-CBC-SHA" - +ssl.curve_types: "P-256" ` OTelCfg := ` From 223b447d37bc1ec39412094f5eaf227d9518e2e7 Mon Sep 17 00:00:00 2001 From: "Lee E. Hinman" Date: Mon, 22 Dec 2025 12:22:46 -0600 Subject: [PATCH 2/2] update notice --- NOTICE-fips.txt | 4 ++-- NOTICE.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NOTICE-fips.txt b/NOTICE-fips.txt index 6d19e478a91..04be5243944 100644 --- a/NOTICE-fips.txt +++ b/NOTICE-fips.txt @@ -1254,11 +1254,11 @@ SOFTWARE -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-libs -Version: v0.28.0 +Version: v0.29.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.28.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.29.0/LICENSE: Apache License Version 2.0, January 2004 diff --git a/NOTICE.txt b/NOTICE.txt index 3e6a3736680..42e96f03f50 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1254,11 +1254,11 @@ SOFTWARE -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-libs -Version: v0.28.0 +Version: v0.29.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.28.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.29.0/LICENSE: Apache License Version 2.0, January 2004