Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions internal/pkg/otel/translate/output_elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/otel/translate/output_elasticsearch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 := `
Expand Down