aws-sdk-core 3.241.0 → 3.241.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -1
- data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +28 -16
- data/lib/aws-sdk-signin/client.rb +1 -1
- data/lib/aws-sdk-signin.rb +1 -1
- data/lib/aws-sdk-sso/client.rb +1 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +1 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/aws-sdk-sts.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2bb055425607f2a8b6ec90788d038eb14f05f611f705797d31acd04abaf429d0
|
|
4
|
+
data.tar.gz: defdafdbb1fad35d409e1562e0e2f8cad977901919655ba7fc31fa6f01a0178f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ef77628a938900170ccc335d06d6236ef0b01f438b1253e44c10002064f5bbff6aef8c223a828aec55cd2e85abcd4afcd5d99c54de1929e0d560ee7e2c0a4c7
|
|
7
|
+
data.tar.gz: 2dd72d4d3542b6798202763f461c1e4d0a39ce285ce03ce409dcbb5bd4168c1c5dddf56fac29f60f9416a3989dabc8595eab4889c11a1b60d377c0d3f7fa2684
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
3.241.2 (2026-01-07)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Issue - Preserve existing Content-Encoding when applying request trailer checksum.
|
|
8
|
+
|
|
9
|
+
3.241.1 (2026-01-06)
|
|
10
|
+
------------------
|
|
11
|
+
|
|
12
|
+
* Issue - Fix memory leak in ClockSkew retry plugin by normalizing endpoints to prevent unlimited hash growth.
|
|
13
|
+
|
|
4
14
|
3.241.0 (2026-01-05)
|
|
5
15
|
------------------
|
|
6
16
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.241.
|
|
1
|
+
3.241.2
|
|
@@ -381,7 +381,12 @@ module Aws
|
|
|
381
381
|
location_name = checksum_properties[:name]
|
|
382
382
|
|
|
383
383
|
# set required headers
|
|
384
|
-
headers['Content-Encoding'] =
|
|
384
|
+
headers['Content-Encoding'] =
|
|
385
|
+
if headers['Content-Encoding']
|
|
386
|
+
headers['Content-Encoding'] += ', aws-chunked'
|
|
387
|
+
else
|
|
388
|
+
'aws-chunked'
|
|
389
|
+
end
|
|
385
390
|
headers['X-Amz-Content-Sha256'] = 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'
|
|
386
391
|
headers['X-Amz-Trailer'] = location_name
|
|
387
392
|
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
module Aws
|
|
4
4
|
module Plugins
|
|
5
5
|
module Retries
|
|
6
|
-
|
|
7
6
|
# @api private
|
|
8
7
|
class ClockSkew
|
|
9
|
-
|
|
10
8
|
CLOCK_SKEW_THRESHOLD = 5 * 60 # five minutes
|
|
11
9
|
|
|
12
10
|
def initialize
|
|
@@ -22,9 +20,9 @@ module Aws
|
|
|
22
20
|
end
|
|
23
21
|
|
|
24
22
|
# Gets the clock_correction in seconds to apply to a given endpoint
|
|
25
|
-
# @param endpoint [URI
|
|
23
|
+
# @param endpoint [URI, String]
|
|
26
24
|
def clock_correction(endpoint)
|
|
27
|
-
@mutex.synchronize { @endpoint_clock_corrections[endpoint
|
|
25
|
+
@mutex.synchronize { @endpoint_clock_corrections[normalized_endpoint(endpoint)] }
|
|
28
26
|
end
|
|
29
27
|
|
|
30
28
|
# The estimated skew factors in any clock skew from
|
|
@@ -35,7 +33,7 @@ module Aws
|
|
|
35
33
|
# Estimated Skew should not be used to correct clock skew errors
|
|
36
34
|
# it should only be used to estimate TTL for a request
|
|
37
35
|
def estimated_skew(endpoint)
|
|
38
|
-
@mutex.synchronize { @endpoint_estimated_skews[endpoint
|
|
36
|
+
@mutex.synchronize { @endpoint_estimated_skews[normalized_endpoint(endpoint)] }
|
|
39
37
|
end
|
|
40
38
|
|
|
41
39
|
# Determines whether a request has clock skew by comparing
|
|
@@ -55,9 +53,9 @@ module Aws
|
|
|
55
53
|
endpoint = context.http_request.endpoint
|
|
56
54
|
now_utc = Time.now.utc
|
|
57
55
|
server_time = server_time(context.http_response)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
return unless server_time && (now_utc - server_time).abs > CLOCK_SKEW_THRESHOLD
|
|
57
|
+
|
|
58
|
+
set_clock_correction(normalized_endpoint(endpoint), server_time - now_utc)
|
|
61
59
|
end
|
|
62
60
|
|
|
63
61
|
# Called for every request
|
|
@@ -69,20 +67,35 @@ module Aws
|
|
|
69
67
|
now_utc = Time.now.utc
|
|
70
68
|
server_time = server_time(context.http_response)
|
|
71
69
|
return unless server_time
|
|
70
|
+
|
|
72
71
|
@mutex.synchronize do
|
|
73
|
-
@endpoint_estimated_skews[endpoint
|
|
72
|
+
@endpoint_estimated_skews[normalized_endpoint(endpoint)] = server_time - now_utc
|
|
74
73
|
end
|
|
75
74
|
end
|
|
76
75
|
|
|
77
76
|
private
|
|
78
77
|
|
|
78
|
+
##
|
|
79
|
+
# @param endpoint [URI, String]
|
|
80
|
+
# the endpoint to normalize
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
# the endpoint's schema, host, and port - without any path or query arguments
|
|
84
|
+
def normalized_endpoint(endpoint)
|
|
85
|
+
uri = endpoint.is_a?(URI::Generic) ? endpoint : URI(endpoint.to_s)
|
|
86
|
+
|
|
87
|
+
return endpoint.to_s unless uri.scheme && uri.host
|
|
88
|
+
|
|
89
|
+
"#{uri.scheme}://#{uri.host}:#{uri.port}"
|
|
90
|
+
rescue URI::InvalidURIError
|
|
91
|
+
endpoint.to_s
|
|
92
|
+
end
|
|
93
|
+
|
|
79
94
|
# @param response [Seahorse::Client::Http::Response:]
|
|
80
95
|
def server_time(response)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
nil
|
|
85
|
-
end
|
|
96
|
+
Time.parse(response.headers['date']).utc
|
|
97
|
+
rescue StandardError
|
|
98
|
+
nil
|
|
86
99
|
end
|
|
87
100
|
|
|
88
101
|
# Sets the clock correction for an endpoint
|
|
@@ -90,11 +103,10 @@ module Aws
|
|
|
90
103
|
# @param correction [Number]
|
|
91
104
|
def set_clock_correction(endpoint, correction)
|
|
92
105
|
@mutex.synchronize do
|
|
93
|
-
@endpoint_clock_corrections[endpoint
|
|
106
|
+
@endpoint_clock_corrections[normalized_endpoint(endpoint)] = correction
|
|
94
107
|
end
|
|
95
108
|
end
|
|
96
109
|
end
|
|
97
110
|
end
|
|
98
111
|
end
|
|
99
112
|
end
|
|
100
|
-
|
data/lib/aws-sdk-signin.rb
CHANGED
data/lib/aws-sdk-sso/client.rb
CHANGED
data/lib/aws-sdk-sso.rb
CHANGED
data/lib/aws-sdk-ssooidc.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
data/lib/aws-sdk-sts.rb
CHANGED