Skip to content

Commit 4fffbd9

Browse files
committed
aws: remove redundant conditional in config agent template
The two branches of the ternary were identical mod syntax.
1 parent 7f1bc5b commit 4fffbd9

File tree

3 files changed

+7
-42
lines changed

3 files changed

+7
-42
lines changed

packages/aws/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "3.13.3"
3+
changes:
4+
- description: Remove redundant code from config data stream agent configuration.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/14734
27
- version: "3.13.2"
38
changes:
49
- description: Remove Include Linked Accounts config option from AWS Health.

packages/aws/data_stream/config/agent/stream/cel.yml.hbs

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -81,47 +81,7 @@ program: |
8181
}
8282
:
8383
(
84-
state.?want_more.orValue(false) ?
8584
state.with({
86-
87-
// Perform a succession of keyed hash operations (HMAC) on the request date, Region, and service,
88-
// with the AWS secret access key as the key for the initial hashing operation.
89-
// Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#derive-signing-key
90-
91-
"signing_key": "aws4_request".hmac("sha256",
92-
"config".hmac("sha256",
93-
state.aws_region.hmac("sha256",
94-
now.format("20060102").hmac("sha256",
95-
bytes("AWS4" + state.secret_key)
96-
)
97-
)
98-
)
99-
),
100-
// Create a string_to_sign that includes the algorithm, request timestamp, credential scope, and hashed canonical request
101-
// Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#create-string-to-sign
102-
"string_to_sign": [
103-
'AWS4-HMAC-SHA256',
104-
now.format("20060102T150405Z"),
105-
now.format("20060102") + '/' + state.aws_region + '/config/aws4_request',
106-
[
107-
'POST',
108-
'/',
109-
'',
110-
"content-type:application/x-amz-json-1.1",
111-
"host:config." + state.aws_region + "." + state.tld,
112-
"x-amz-date:" + now.format("20060102T150405Z"),
113-
"x-amz-target:StarlingDoveService.DescribeConfigRules",
114-
'',
115-
"content-type;host;x-amz-date;x-amz-target",
116-
{
117-
?"NextToken": state.?next_page.rule_token
118-
}.encode_json().sha256().hex()
119-
].join("\n").sha256().hex()
120-
].join("\n"),
121-
})
122-
:
123-
state.with({
124-
12585
// Perform a succession of keyed hash operations (HMAC) on the request date, Region, and service,
12686
// with the AWS secret access key as the key for the initial hashing operation.
12787
// Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html#derive-signing-key
@@ -156,7 +116,7 @@ program: |
156116
?"NextToken": state.?next_page.rule_token
157117
}.encode_json().sha256().hex()
158118
].join("\n").sha256().hex()
159-
].join("\n")
119+
].join("\n"),
160120
})
161121
).as(state,
162122
post_request(

packages/aws/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: 3.3.2
22
name: aws
33
title: AWS
4-
version: 3.13.2
4+
version: 3.13.3
55
description: Collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
66
type: integration
77
categories:

0 commit comments

Comments
 (0)