Skip to content

Commit bbaf7ff

Browse files
Merge branch 'main' into fix/remove-unused-upgrade-status
2 parents 5e38ded + 15ae4bd commit bbaf7ff

File tree

17 files changed

+183
-97
lines changed

17 files changed

+183
-97
lines changed

.github/workflows/release-notes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
bc_commit_sha: ${{ inputs.bc_commit_sha }}
2222
version: ${{ inputs.version }}
2323
release_manager: ${{ github.triggering_actor }}
24+
branching_model: '`main`'
2425
permissions:
2526
contents: read
2627
id-token: write

NOTICE-fips.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,11 +3089,11 @@ Contents of probable licence file $GOMODCACHE/github.com/spf13/[email protected]/LIC
30893089

30903090
--------------------------------------------------------------------------------
30913091
Dependency : go.elastic.co/apm/module/apmchiv5/v2
3092-
Version: v2.7.1
3092+
Version: v2.7.2
30933093
Licence type (autodetected): Apache-2.0
30943094
--------------------------------------------------------------------------------
30953095

3096-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmchiv5/[email protected].1/LICENSE:
3096+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmchiv5/[email protected].2/LICENSE:
30973097

30983098
Apache License
30993099
Version 2.0, January 2004
@@ -3300,11 +3300,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmchiv5/
33003300

33013301
--------------------------------------------------------------------------------
33023302
Dependency : go.elastic.co/apm/module/apmelasticsearch/v2
3303-
Version: v2.7.1
3303+
Version: v2.7.2
33043304
Licence type (autodetected): Apache-2.0
33053305
--------------------------------------------------------------------------------
33063306

3307-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasticsearch/[email protected].1/LICENSE:
3307+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasticsearch/[email protected].2/LICENSE:
33083308

33093309
Apache License
33103310
Version 2.0, January 2004
@@ -3511,11 +3511,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasti
35113511

35123512
--------------------------------------------------------------------------------
35133513
Dependency : go.elastic.co/apm/module/apmhttp/v2
3514-
Version: v2.7.1
3514+
Version: v2.7.2
35153515
Licence type (autodetected): Apache-2.0
35163516
--------------------------------------------------------------------------------
35173517

3518-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/[email protected].1/LICENSE:
3518+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/[email protected].2/LICENSE:
35193519

35203520
Apache License
35213521
Version 2.0, January 2004
@@ -3722,11 +3722,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/v
37223722

37233723
--------------------------------------------------------------------------------
37243724
Dependency : go.elastic.co/apm/module/apmprometheus/v2
3725-
Version: v2.7.1
3725+
Version: v2.7.2
37263726
Licence type (autodetected): Apache-2.0
37273727
--------------------------------------------------------------------------------
37283728

3729-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmprometheus/[email protected].1/LICENSE:
3729+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmprometheus/[email protected].2/LICENSE:
37303730

37313731
Apache License
37323732
Version 2.0, January 2004
@@ -3933,11 +3933,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmpromet
39333933

39343934
--------------------------------------------------------------------------------
39353935
Dependency : go.elastic.co/apm/module/apmzerolog/v2
3936-
Version: v2.7.1
3936+
Version: v2.7.2
39373937
Licence type (autodetected): Apache-2.0
39383938
--------------------------------------------------------------------------------
39393939

3940-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzerolog/[email protected].1/LICENSE:
3940+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzerolog/[email protected].2/LICENSE:
39413941

39423942
Apache License
39433943
Version 2.0, January 2004
@@ -4144,11 +4144,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzerolo
41444144

41454145
--------------------------------------------------------------------------------
41464146
Dependency : go.elastic.co/apm/v2
4147-
Version: v2.7.1
4147+
Version: v2.7.2
41484148
Licence type (autodetected): Apache-2.0
41494149
--------------------------------------------------------------------------------
41504150

4151-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/[email protected].1/LICENSE:
4151+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/[email protected].2/LICENSE:
41524152

41534153
Apache License
41544154
Version 2.0, January 2004

NOTICE.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,11 +3089,11 @@ Contents of probable licence file $GOMODCACHE/github.com/spf13/[email protected]/LIC
30893089

30903090
--------------------------------------------------------------------------------
30913091
Dependency : go.elastic.co/apm/module/apmchiv5/v2
3092-
Version: v2.7.1
3092+
Version: v2.7.2
30933093
Licence type (autodetected): Apache-2.0
30943094
--------------------------------------------------------------------------------
30953095

3096-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmchiv5/[email protected].1/LICENSE:
3096+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmchiv5/[email protected].2/LICENSE:
30973097

30983098
Apache License
30993099
Version 2.0, January 2004
@@ -3300,11 +3300,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmchiv5/
33003300

33013301
--------------------------------------------------------------------------------
33023302
Dependency : go.elastic.co/apm/module/apmelasticsearch/v2
3303-
Version: v2.7.1
3303+
Version: v2.7.2
33043304
Licence type (autodetected): Apache-2.0
33053305
--------------------------------------------------------------------------------
33063306

3307-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasticsearch/[email protected].1/LICENSE:
3307+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasticsearch/[email protected].2/LICENSE:
33083308

33093309
Apache License
33103310
Version 2.0, January 2004
@@ -3511,11 +3511,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmelasti
35113511

35123512
--------------------------------------------------------------------------------
35133513
Dependency : go.elastic.co/apm/module/apmhttp/v2
3514-
Version: v2.7.1
3514+
Version: v2.7.2
35153515
Licence type (autodetected): Apache-2.0
35163516
--------------------------------------------------------------------------------
35173517

3518-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/[email protected].1/LICENSE:
3518+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/[email protected].2/LICENSE:
35193519

35203520
Apache License
35213521
Version 2.0, January 2004
@@ -3722,11 +3722,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmhttp/v
37223722

37233723
--------------------------------------------------------------------------------
37243724
Dependency : go.elastic.co/apm/module/apmprometheus/v2
3725-
Version: v2.7.1
3725+
Version: v2.7.2
37263726
Licence type (autodetected): Apache-2.0
37273727
--------------------------------------------------------------------------------
37283728

3729-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmprometheus/[email protected].1/LICENSE:
3729+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmprometheus/[email protected].2/LICENSE:
37303730

37313731
Apache License
37323732
Version 2.0, January 2004
@@ -3933,11 +3933,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmpromet
39333933

39343934
--------------------------------------------------------------------------------
39353935
Dependency : go.elastic.co/apm/module/apmzerolog/v2
3936-
Version: v2.7.1
3936+
Version: v2.7.2
39373937
Licence type (autodetected): Apache-2.0
39383938
--------------------------------------------------------------------------------
39393939

3940-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzerolog/[email protected].1/LICENSE:
3940+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzerolog/[email protected].2/LICENSE:
39413941

39423942
Apache License
39433943
Version 2.0, January 2004
@@ -4144,11 +4144,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/module/apmzerolo
41444144

41454145
--------------------------------------------------------------------------------
41464146
Dependency : go.elastic.co/apm/v2
4147-
Version: v2.7.1
4147+
Version: v2.7.2
41484148
Licence type (autodetected): Apache-2.0
41494149
--------------------------------------------------------------------------------
41504150

4151-
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/[email protected].1/LICENSE:
4151+
Contents of probable licence file $GOMODCACHE/go.elastic.co/apm/[email protected].2/LICENSE:
41524152

41534153
Apache License
41544154
Version 2.0, January 2004
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Support secrets in agent.download section of policy
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: fleet-server
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
#pr: https://github.com/owner/repo/1234
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

dev-tools/integration/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# If you use change this version without a pinned one, please update
22
# .ci/bump-elastic-stack-snapshot.yml or .github/workflows/bump-golang.yml
3-
ELASTICSEARCH_VERSION=9.3.0-9b9de3e6-SNAPSHOT
3+
ELASTICSEARCH_VERSION=9.3.0-41aebda2-SNAPSHOT
44
ELASTICSEARCH_USERNAME=elastic
55
ELASTICSEARCH_PASSWORD=changeme
66
TEST_ELASTICSEARCH_HOSTS=localhost:9200

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ require (
2929
github.com/rs/zerolog v1.34.0
3030
github.com/spf13/cobra v1.10.1
3131
github.com/stretchr/testify v1.11.1
32-
go.elastic.co/apm/module/apmchiv5/v2 v2.7.1
33-
go.elastic.co/apm/module/apmelasticsearch/v2 v2.7.1
34-
go.elastic.co/apm/module/apmhttp/v2 v2.7.1
35-
go.elastic.co/apm/module/apmprometheus/v2 v2.7.1
36-
go.elastic.co/apm/module/apmzerolog/v2 v2.7.1
37-
go.elastic.co/apm/v2 v2.7.1
32+
go.elastic.co/apm/module/apmchiv5/v2 v2.7.2
33+
go.elastic.co/apm/module/apmelasticsearch/v2 v2.7.2
34+
go.elastic.co/apm/module/apmhttp/v2 v2.7.2
35+
go.elastic.co/apm/module/apmprometheus/v2 v2.7.2
36+
go.elastic.co/apm/module/apmzerolog/v2 v2.7.2
37+
go.elastic.co/apm/v2 v2.7.2
3838
go.elastic.co/ecszerolog v0.2.0
3939
go.uber.org/zap v1.27.1
4040
golang.org/x/net v0.47.0

go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,18 @@ github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zU
184184
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
185185
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
186186
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
187-
go.elastic.co/apm/module/apmchiv5/v2 v2.7.1 h1:7mZkjS9YxHNy1Gsh72jEz8pKenFnhbCQILGoCdxOs9s=
188-
go.elastic.co/apm/module/apmchiv5/v2 v2.7.1/go.mod h1:yB0ksX+UKlhgC5+4wBR+18dym3TZKEMe4VFmBlkB5S8=
189-
go.elastic.co/apm/module/apmelasticsearch/v2 v2.7.1 h1:nA7I325lIxf6hlVN1SdoOuVJG3gadWlejWngfadGUP8=
190-
go.elastic.co/apm/module/apmelasticsearch/v2 v2.7.1/go.mod h1:+Xna0uioc2zNzfQzal40RfZ5PPLd2jRBsv49TGHmF8Y=
191-
go.elastic.co/apm/module/apmhttp/v2 v2.7.1 h1:1uPHesdm9nKytQ/N0bPmlS7F69oXvkzW+IlvzQuDUs8=
192-
go.elastic.co/apm/module/apmhttp/v2 v2.7.1/go.mod h1:DlBnNivf+eArsEI1QtUx7fygo/JDbdMIcU9+i/Wid1U=
193-
go.elastic.co/apm/module/apmprometheus/v2 v2.7.1 h1:7N6ihtUgZD8Wpfy/ZG9wZaFlmP5jXuPu98dab1rL8y4=
194-
go.elastic.co/apm/module/apmprometheus/v2 v2.7.1/go.mod h1:wi/E2WnWK3tcKwaIhPijq7dmCo6H+pvx1R1G0yVzmkI=
195-
go.elastic.co/apm/module/apmzerolog/v2 v2.7.1 h1:C9+KrlqS8F4SZFu+ct0Jmv2YLmzDhWsI8htK6exd3vg=
196-
go.elastic.co/apm/module/apmzerolog/v2 v2.7.1/go.mod h1:wXViB7paxMUrERgZrmUb+0FCqgb13Dull1JOOd8Hcj0=
197-
go.elastic.co/apm/v2 v2.7.1 h1:OFjARuESjBsxw7wHrEAnfSVNCHGBATXSI/kPvBARY/A=
198-
go.elastic.co/apm/v2 v2.7.1/go.mod h1:tQhBAjwh93b2leuAdzGwta/sP7Yc7QoKTSjeIHHDuog=
187+
go.elastic.co/apm/module/apmchiv5/v2 v2.7.2 h1:i2SbQfMECPXw1A+YZOmc9Kw2pFHUWeNzfnbavFU+XgQ=
188+
go.elastic.co/apm/module/apmchiv5/v2 v2.7.2/go.mod h1:fhj7buFZqlKoXDO8Qs9mO78codp2srBxaqKME7HsjSY=
189+
go.elastic.co/apm/module/apmelasticsearch/v2 v2.7.2 h1:oy9PA89RuFAbGO4Mhvv0lzwUuHgX1HJUXYZfuR7WJn8=
190+
go.elastic.co/apm/module/apmelasticsearch/v2 v2.7.2/go.mod h1:Nlv96Nq6AvRhG10NHyWCgU1zWGF9cS8G7l1RXgr3WIs=
191+
go.elastic.co/apm/module/apmhttp/v2 v2.7.2 h1:grLycchDH4B6aGRkZjIV/sweAivJDl8IcP+nCorktm8=
192+
go.elastic.co/apm/module/apmhttp/v2 v2.7.2/go.mod h1:N9CJn3x7cyFnZ54WKxgm/t76drcsmSpu6aU8zGwP4zQ=
193+
go.elastic.co/apm/module/apmprometheus/v2 v2.7.2 h1:lLrgrs/0f9YEfxNnQFb+xXC3k8K+gfCOGto+lolcq4k=
194+
go.elastic.co/apm/module/apmprometheus/v2 v2.7.2/go.mod h1:mWdBH/IWiObSuJklF0nu+NuPb78AafcWOsZKk5dZ+qM=
195+
go.elastic.co/apm/module/apmzerolog/v2 v2.7.2 h1:JPgmhFEUDfjvIrfZdWEgkwu5H2Nzhze6GFan+qoUQYo=
196+
go.elastic.co/apm/module/apmzerolog/v2 v2.7.2/go.mod h1:oQIxTgTMMef1FgFghymN+GCXpWhW6rpQRihV8Gjoi+w=
197+
go.elastic.co/apm/v2 v2.7.2 h1:0blxpxOMOcpBTz034RBqvEw806y0CDJwo/ut+2wZsHA=
198+
go.elastic.co/apm/v2 v2.7.2/go.mod h1:KJcwwsaouDzcLd8EviAO+y8yrfZzD6PhUCEg82bvLV4=
199199
go.elastic.co/ecszap v1.0.3 h1:RQtagS3uSftE8mPZ3msqb6mVI67jgcDuy1PUqiMv8ow=
200200
go.elastic.co/ecszap v1.0.3/go.mod h1:fM1RLWDU25TB/L48RUJgz5Le2AnoCeY/g0zf2op8gDU=
201201
go.elastic.co/ecszerolog v0.2.0 h1:nbX4dQ08jb3+vsvACfmzAqGDoBh8F2HQDUgpqwAVTg0=

internal/pkg/model/schema.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/pkg/policy/parsed_policy.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type ParsedPolicy struct {
5050
Outputs map[string]Output
5151
Default ParsedPolicyDefaults
5252
Inputs []map[string]interface{}
53+
Agent map[string]interface{}
5354
SecretKeys []string
5455
Links apm.SpanLink
5556
}
@@ -87,6 +88,17 @@ func NewParsedPolicy(ctx context.Context, bulker bulk.Bulk, p model.Policy) (*Pa
8788
policyInputs, keys := secret.ProcessInputsSecrets(p.Data, secretValues)
8889
secretKeys = append(secretKeys, keys...)
8990

91+
// Replace secrets in 'agent.download' section of policy
92+
if agentDownload, exists := p.Data.Agent["download"]; exists {
93+
if section, ok := agentDownload.(map[string]interface{}); ok {
94+
agentDownloadSecretKeys := secret.ProcessMapSecrets(section, secretValues)
95+
for _, key := range agentDownloadSecretKeys {
96+
secretKeys = append(secretKeys, "agent.download."+key)
97+
}
98+
p.Data.Agent["download"] = section
99+
}
100+
}
101+
90102
// Done replacing secrets.
91103
p.Data.SecretReferences = nil
92104

@@ -99,6 +111,7 @@ func NewParsedPolicy(ctx context.Context, bulker bulk.Bulk, p model.Policy) (*Pa
99111
Name: defaultName,
100112
},
101113
Inputs: policyInputs,
114+
Agent: p.Data.Agent,
102115
SecretKeys: secretKeys,
103116
}
104117

internal/pkg/policy/parsed_policy_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import (
1212
"encoding/json"
1313
"testing"
1414

15+
ftesting "github.com/elastic/fleet-server/v7/internal/pkg/testing"
16+
1517
"github.com/stretchr/testify/require"
1618

1719
"github.com/elastic/fleet-server/v7/internal/pkg/model"
18-
ftesting "github.com/elastic/fleet-server/v7/internal/pkg/testing"
1920
)
2021

2122
//go:embed testdata/test_policy.json
@@ -124,11 +125,13 @@ func TestParsedPolicyMixedSecretsReplacement(t *testing.T) {
124125
require.NoError(t, err)
125126

126127
// Validate that secrets were identified
127-
require.Len(t, pp.SecretKeys, 4)
128+
require.Len(t, pp.SecretKeys, 6)
128129
require.Contains(t, pp.SecretKeys, "outputs.fs-output.type")
129130
require.Contains(t, pp.SecretKeys, "outputs.fs-output.ssl.key")
130131
require.Contains(t, pp.SecretKeys, "inputs.0.streams.0.auth.basic.password")
131132
require.Contains(t, pp.SecretKeys, "inputs.0.streams.1.auth.basic.password")
133+
require.Contains(t, pp.SecretKeys, "agent.download.sourceURI")
134+
require.Contains(t, pp.SecretKeys, "agent.download.ssl.key")
132135

133136
// Validate that secret references were replaced
134137
firstInputStreams := pp.Inputs[0]["streams"].([]any)
@@ -138,4 +141,6 @@ func TestParsedPolicyMixedSecretsReplacement(t *testing.T) {
138141
require.Equal(t, "0Mx2UZoBTAyw4gQKSaao_value", firstInputSecondStream["auth.basic.password"])
139142
require.Equal(t, "abcdef123_value", pp.Policy.Data.Outputs["fs-output"]["type"])
140143
require.Equal(t, "w8yELZoBTAyw4gQK9KZ7_value", pp.Policy.Data.Outputs["fs-output"]["ssl"].(map[string]interface{})["key"])
144+
require.Equal(t, "bcdefg234_value", pp.Policy.Data.Agent["download"].(map[string]interface{})["sourceURI"])
145+
require.Equal(t, "rwXzUJoBxE9I-QCxFt9m_value", pp.Policy.Data.Agent["download"].(map[string]interface{})["ssl"].(map[string]interface{})["key"])
141146
}

0 commit comments

Comments
 (0)