aws-sdk-core 3.214.1 → 3.217.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99d23d77dd74ca639579a7a2b7aab408659ad813b8e767b0ab0b6a5e43aed50d
4
- data.tar.gz: ea6ada6b8cf80e872f985fc5e289b2cb1a17ab49e34d373f764d01da490af825
3
+ metadata.gz: 13c7508d3fe8738d7cf214927f7ce2c56291b98bd48140df95f9b870f4d47b22
4
+ data.tar.gz: b02761bcdae833ec72bde159bfbdebeaf31cbe6d1a133218b2431fcbb9678bef
5
5
  SHA512:
6
- metadata.gz: 5d22bc46279b4f56fc95750e3dc771b5dea133a358a3b2750a4216969ec5e93ae7c9c134107eba6a2f496a1b59f9c2f020bcf58770eb9cc96e6046b9bd17f4d7
7
- data.tar.gz: f678aa56840d77c47824e38e633763a9a94697750c395aeaa9220987ce852adbc32684f213e68230f3e3e9320b4d444f2179ea13965de8b70f1387ef0bd26aac
6
+ metadata.gz: 97147bdd4fd7e610d78e9b058cc8b0db1b4dc88dcb7ec16aa4c9f08819d3c4e6acc965ddc8591b8e52f0f34b33c2beec1a76bdf39bbb6e34b405dd8c63fbe348
7
+ data.tar.gz: 8290e9fae3593b24ae2247882bdaced352fb4f86989b20493473ffa84685ede8c6ff7c4e46397a5711a0eeeedbd8bee5b3b8205571babb937f25f9b9e38e35bf
data/CHANGELOG.md CHANGED
@@ -1,6 +1,52 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.217.1 (2025-01-30)
5
+ ------------------
6
+
7
+ * Issue - Add `transfer-encoding` and `connection` to list of unsigned sigv4 headers.
8
+
9
+ 3.217.0 (2025-01-24)
10
+ ------------------
11
+
12
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
13
+
14
+ * Feature - Fixed typos in the descriptions.
15
+
16
+ 3.216.1 (2025-01-22)
17
+ ------------------
18
+
19
+ * Issue - Use epoch seconds instead of milliseconds in cbor encode/decode.
20
+
21
+ * Issue - Add handling of block in response delegation (#3169).
22
+
23
+ 3.216.0 (2025-01-15)
24
+ ------------------
25
+
26
+ * Feature - Updated Aws::STS::Client with the latest API changes.
27
+
28
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
29
+
30
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
31
+
32
+ * Feature - Always calculate request checksums for operations that support or require it. Supported config options are `when_supported` and `when_required`. The default value is `when_supported`. This option is configured in code with `:request_checksum_calculation`, in the shared config file as `request_checksum_calculation`, and in the ENV as `ENV['AWS_REQUEST_CHECKSUM_CALCULATION']`.
33
+
34
+ * Feature - Always validate response checksums for operations that support or require it. Supported config options are `when_supported` and `when_required`. The default value is `when_supported`. This option is configured in code with `:response_checksum_validation`, in the shared config file as `response_checksum_validation`, and in the ENV as `ENV['AWS_RESPONSE_CHECKSUM_VALIDATION']`.
35
+
36
+ * Feature - Support CRC64NVME checksums through the `aws-crt` gem.
37
+
38
+ 3.215.1 (2025-01-14)
39
+ ------------------
40
+
41
+ * Issue - Fixed error when attempting to log an unlinked tempfile.
42
+
43
+ 3.215.0 (2025-01-10)
44
+ ------------------
45
+
46
+ * Feature - Updated Aws::STS::Client with the latest API changes.
47
+
48
+ * Feature - Fixed typos in the descriptions.
49
+
4
50
  3.214.1 (2024-12-28)
5
51
  ------------------
6
52
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.214.1
1
+ 3.217.1
@@ -61,9 +61,7 @@ module Aws
61
61
  when :tag
62
62
  case (tag = read_tag)
63
63
  when TAG_TYPE_EPOCH
64
- type = peek_type
65
64
  item = decode_item
66
- item /= 1000.0 if type == :integer
67
65
  Time.at(item)
68
66
  when TAG_TYPE_BIGNUM, TAG_TYPE_NEG_BIGNUM
69
67
  read_bignum(tag)
@@ -226,8 +226,8 @@ module Aws
226
226
 
227
227
  def add_time(value)
228
228
  head(MAJOR_TYPE_TAG, TAG_TYPE_EPOCH)
229
- epoch_ms = (value.to_f * 1000).to_i
230
- add_integer(epoch_ms)
229
+ epoch = value.to_f
230
+ add_double(epoch)
231
231
  end
232
232
 
233
233
  def bignum_to_bytes(value)
@@ -51,13 +51,17 @@ module Aws
51
51
  when String then summarize_string(value)
52
52
  when Hash then '{' + summarize_hash(value) + '}'
53
53
  when Array then summarize_array(value)
54
- when File then summarize_file(value.path)
55
- when Pathname then summarize_file(value)
54
+ when File then summarize_file(value)
55
+ when Pathname then summarize_filepath(value)
56
56
  else value.inspect
57
57
  end
58
58
  end
59
59
 
60
- def summarize_file(path)
60
+ def summarize_file(file)
61
+ "#<File:#{file.path} (#{file.size} bytes)>"
62
+ end
63
+
64
+ def summarize_filepath(path)
61
65
  "#<File:#{path} (#{File.size(path)} bytes)>"
62
66
  end
63
67
 
@@ -13,34 +13,131 @@ module Aws
13
13
  begin
14
14
  require 'aws-crt'
15
15
  supported << 'CRC32C'
16
+ supported << 'CRC64NVME' if Aws::Crt::GEM_VERSION >= '0.3.0'
16
17
  rescue LoadError
18
+ # Ignored
17
19
  end
18
20
  supported
19
21
  end.freeze
20
22
 
21
- # priority order of checksum algorithms to validate responses against
22
- # Remove any algorithms not supported by client (ie, depending on CRT availability)
23
- CHECKSUM_ALGORITHM_PRIORITIES = %w[CRC32C SHA1 CRC32 SHA256] & CLIENT_ALGORITHMS
23
+ CRT_ALGORITHMS = %w[CRC32C CRC64NVME].freeze
24
+
25
+ # Priority order of checksum algorithms to validate responses against.
26
+ # Remove any algorithms not supported by client (ie, depending on CRT availability).
27
+ # This list was chosen based on average performance.
28
+ CHECKSUM_ALGORITHM_PRIORITIES = %w[CRC32 CRC32C CRC64NVME SHA1 SHA256] & CLIENT_ALGORITHMS
24
29
 
25
30
  # byte size of checksums, used in computing the trailer length
26
31
  CHECKSUM_SIZE = {
27
- 'CRC32' => 16,
28
- 'CRC32C' => 16,
29
- 'SHA1' => 36,
30
- 'SHA256' => 52
31
- }
32
+ 'CRC32' => 9,
33
+ 'CRC32C' => 9,
34
+ 'CRC64NVME' => 13,
35
+ # SHA functions need 1 byte padding because of how they are encoded
36
+ 'SHA1' => 28 + 1,
37
+ 'SHA256' => 44 + 1
38
+ }.freeze
39
+
40
+ DEFAULT_CHECKSUM = 'CRC32'
41
+
42
+ option(:request_checksum_calculation,
43
+ doc_default: 'when_supported',
44
+ doc_type: 'String',
45
+ docstring: <<~DOCS) do |cfg|
46
+ Determines when a checksum will be calculated for request payloads. Values are:
47
+
48
+ * `when_supported` - (default) When set, a checksum will be
49
+ calculated for all request payloads of operations modeled with the
50
+ `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
51
+ `requestAlgorithmMember` is modeled.
52
+ * `when_required` - When set, a checksum will only be calculated for
53
+ request payloads of operations modeled with the `httpChecksum` trait where
54
+ `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
55
+ is modeled and supplied.
56
+ DOCS
57
+ resolve_request_checksum_calculation(cfg)
58
+ end
32
59
 
33
- # Interface for computing digests on request/response bodies
34
- # which may be files, strings or IO like objects
35
- # Applies only to digest functions that produce 32 bit integer checksums
36
- # (eg CRC32)
37
- class Digest32
60
+ option(:response_checksum_validation,
61
+ doc_default: 'when_supported',
62
+ doc_type: 'String',
63
+ docstring: <<~DOCS) do |cfg|
64
+ Determines when checksum validation will be performed on response payloads. Values are:
65
+
66
+ * `when_supported` - (default) When set, checksum validation is performed on all
67
+ response payloads of operations modeled with the `httpChecksum` trait where
68
+ `responseAlgorithms` is modeled, except when no modeled checksum algorithms
69
+ are supported.
70
+ * `when_required` - When set, checksum validation is not performed on
71
+ response payloads of operations unless the checksum algorithm is supported and
72
+ the `requestValidationModeMember` member is set to `ENABLED`.
73
+ DOCS
74
+ resolve_response_checksum_validation(cfg)
75
+ end
38
76
 
39
- attr_reader :value
77
+ class << self
78
+ def digest_for_algorithm(algorithm)
79
+ case algorithm
80
+ when 'CRC32'
81
+ Digest.new(Zlib.method(:crc32), 'N')
82
+ when 'CRC32C'
83
+ Digest.new(Aws::Crt::Checksums.method(:crc32c), 'N')
84
+ when 'CRC64NVME'
85
+ Digest.new(Aws::Crt::Checksums.method(:crc64nvme), 'Q>')
86
+ when 'SHA1'
87
+ ::Digest::SHA1.new
88
+ when 'SHA256'
89
+ ::Digest::SHA256.new
90
+ else
91
+ raise ArgumentError,
92
+ "#{algorithm} is not a supported checksum algorithm."
93
+ end
94
+ end
95
+
96
+ # The trailer size (in bytes) is the overhead (0, \r, \n) + the trailer
97
+ # name + the bytesize of the base64 encoded checksum.
98
+ def trailer_length(algorithm, location_name)
99
+ 7 + location_name.size + CHECKSUM_SIZE[algorithm]
100
+ end
40
101
 
41
- # @param [Object] digest_fn
42
- def initialize(digest_fn)
102
+ private
103
+
104
+ def resolve_request_checksum_calculation(cfg)
105
+ mode = ENV['AWS_REQUEST_CHECKSUM_CALCULATION'] ||
106
+ Aws.shared_config.request_checksum_calculation(profile: cfg.profile) ||
107
+ 'when_supported'
108
+ mode = mode.downcase
109
+ unless %w[when_supported when_required].include?(mode)
110
+ raise ArgumentError,
111
+ 'expected :request_checksum_calculation or' \
112
+ " ENV['AWS_REQUEST_CHECKSUM_CALCULATION'] to be " \
113
+ '`when_supported` or `when_required`.'
114
+ end
115
+ mode
116
+ end
117
+
118
+ def resolve_response_checksum_validation(cfg)
119
+ mode = ENV['AWS_RESPONSE_CHECKSUM_VALIDATION'] ||
120
+ Aws.shared_config.response_checksum_validation(profile: cfg.profile) ||
121
+ 'when_supported'
122
+ mode = mode.downcase
123
+ unless %w[when_supported when_required].include?(mode)
124
+ raise ArgumentError,
125
+ 'expected :response_checksum_validation or' \
126
+ " ENV['AWS_RESPONSE_CHECKSUM_VALIDATION'] to be " \
127
+ '`when_supported` or `when_required`.'
128
+ end
129
+ mode
130
+ end
131
+ end
132
+
133
+ # Interface for computing digests on request/response bodies
134
+ # which may be files, strings or IO like objects.
135
+ # Applies only to digest functions that produce 32 or 64 bit
136
+ # integer checksums (eg CRC32 or CRC64).
137
+ class Digest
138
+ def initialize(digest_fn, directive)
43
139
  @digest_fn = digest_fn
140
+ @directive = directive
44
141
  @value = 0
45
142
  end
46
143
 
@@ -49,125 +146,223 @@ module Aws
49
146
  end
50
147
 
51
148
  def base64digest
52
- Base64.encode64([@value].pack('N')).chomp
149
+ Base64.encode64([@value].pack(@directive)).chomp
53
150
  end
54
151
  end
55
152
 
56
153
  def add_handlers(handlers, _config)
57
154
  handlers.add(OptionHandler, step: :initialize)
58
- # priority set low to ensure checksum is computed AFTER the request is
59
- # built but before it is signed
155
+ # Priority is set low to ensure the checksum is computed AFTER the
156
+ # request is built but before it is signed.
60
157
  handlers.add(ChecksumHandler, priority: 15, step: :build)
61
158
  end
62
159
 
63
- private
64
-
65
- def self.request_algorithm_selection(context)
66
- return unless context.operation.http_checksum
67
-
68
- input_member = context.operation.http_checksum['requestAlgorithmMember']
69
- context.params[input_member.to_sym]&.upcase if input_member
70
- end
71
-
72
- def self.request_validation_mode(context)
73
- return unless context.operation.http_checksum
74
-
75
- input_member = context.operation.http_checksum['requestValidationModeMember']
76
- context.params[input_member.to_sym] if input_member
77
- end
78
-
79
- def self.operation_response_algorithms(context)
80
- return unless context.operation.http_checksum
81
-
82
- context.operation.http_checksum['responseAlgorithms']
83
- end
84
-
85
-
86
- # @api private
87
160
  class OptionHandler < Seahorse::Client::Handler
88
161
  def call(context)
89
162
  context[:http_checksum] ||= {}
90
163
 
91
- # validate request configuration
92
- if (request_input = ChecksumAlgorithm.request_algorithm_selection(context))
93
- unless CLIENT_ALGORITHMS.include? request_input
94
- if (request_input == 'CRC32C')
95
- raise ArgumentError, "CRC32C requires crt support - install the aws-crt gem for support."
96
- else
97
- raise ArgumentError, "#{request_input} is not a supported checksum algorithm."
98
- end
99
- end
100
- end
101
-
102
- # validate response configuration
103
- if (ChecksumAlgorithm.request_validation_mode(context))
104
- # Compute an ordered list as the union between priority supported and the
105
- # operation's modeled response algorithms.
106
- validation_list = CHECKSUM_ALGORITHM_PRIORITIES &
107
- ChecksumAlgorithm.operation_response_algorithms(context)
108
- context[:http_checksum][:validation_list] = validation_list
164
+ # Set validation mode to enabled when supported.
165
+ if context.config.response_checksum_validation == 'when_supported'
166
+ enable_request_validation_mode(context)
109
167
  end
110
168
 
111
169
  @handler.call(context)
112
170
  end
171
+
172
+ private
173
+
174
+ def enable_request_validation_mode(context)
175
+ return unless context.operation.http_checksum
176
+
177
+ input_member = context.operation.http_checksum['requestValidationModeMember']
178
+ context.params[input_member.to_sym] ||= 'ENABLED' if input_member
179
+ end
113
180
  end
114
181
 
115
- # @api private
116
182
  class ChecksumHandler < Seahorse::Client::Handler
117
-
118
183
  def call(context)
184
+ algorithm = nil
119
185
  if should_calculate_request_checksum?(context)
120
- request_algorithm_input = ChecksumAlgorithm.request_algorithm_selection(context) ||
121
- context[:default_request_checksum_algorithm]
122
- context[:checksum_algorithms] = request_algorithm_input
123
-
124
- request_checksum_property = {
125
- 'algorithm' => request_algorithm_input,
126
- 'in' => checksum_request_in(context),
127
- 'name' => "x-amz-checksum-#{request_algorithm_input.downcase}"
186
+ algorithm = choose_request_algorithm!(context)
187
+ request_algorithm = {
188
+ algorithm: algorithm,
189
+ in: checksum_request_in(context),
190
+ name: "x-amz-checksum-#{algorithm.downcase}",
191
+ request_algorithm_header: request_algorithm_header(context)
128
192
  }
129
193
 
130
- calculate_request_checksum(context, request_checksum_property)
194
+ context[:http_checksum][:request_algorithm] = request_algorithm
195
+ calculate_request_checksum(context, request_algorithm)
131
196
  end
132
197
 
133
198
  if should_verify_response_checksum?(context)
134
199
  add_verify_response_checksum_handlers(context)
135
200
  end
136
201
 
137
- @handler.call(context)
202
+ with_metrics(context.config, algorithm) { @handler.call(context) }
138
203
  end
139
204
 
140
205
  private
141
206
 
142
- def should_calculate_request_checksum?(context)
207
+ def with_metrics(config, algorithm, &block)
208
+ metrics = []
209
+ add_request_config_metric(config, metrics)
210
+ add_response_config_metric(config, metrics)
211
+ add_request_checksum_metrics(algorithm, metrics)
212
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
213
+ end
214
+
215
+ def add_request_config_metric(config, metrics)
216
+ case config.request_checksum_calculation
217
+ when 'when_supported'
218
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED'
219
+ when 'when_required'
220
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED'
221
+ end
222
+ end
223
+
224
+ def add_response_config_metric(config, metrics)
225
+ case config.response_checksum_validation
226
+ when 'when_supported'
227
+ metrics << 'FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED'
228
+ when 'when_required'
229
+ metrics << 'FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED'
230
+ end
231
+ end
232
+
233
+ def add_request_checksum_metrics(algorithm, metrics)
234
+ case algorithm
235
+ when 'CRC32'
236
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_CRC32'
237
+ when 'CRC32C'
238
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_CRC32C'
239
+ when 'CRC64NVME'
240
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_CRC64'
241
+ when 'SHA1'
242
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_SHA1'
243
+ when 'SHA256'
244
+ metrics << 'FLEXIBLE_CHECKSUMS_REQ_SHA256'
245
+ end
246
+ end
247
+
248
+ def request_algorithm_selection(context)
249
+ return unless context.operation.http_checksum
250
+
251
+ input_member = context.operation.http_checksum['requestAlgorithmMember']
252
+ context.params[input_member.to_sym] ||= DEFAULT_CHECKSUM if input_member
253
+ end
254
+
255
+ def request_algorithm_header(context)
256
+ input_member = context.operation.http_checksum['requestAlgorithmMember']
257
+ shape = context.operation.input.shape.member(input_member)
258
+ shape.location_name if shape && shape.location == 'header'
259
+ end
260
+
261
+ def request_validation_mode(context)
262
+ return unless context.operation.http_checksum
263
+
264
+ input_member = context.operation.http_checksum['requestValidationModeMember']
265
+ context.params[input_member.to_sym] if input_member
266
+ end
267
+
268
+ def operation_response_algorithms(context)
269
+ return unless context.operation.http_checksum
270
+
271
+ context.operation.http_checksum['responseAlgorithms']
272
+ end
273
+
274
+ def checksum_required?(context)
275
+ (http_checksum = context.operation.http_checksum) &&
276
+ (checksum_required = http_checksum['requestChecksumRequired']) &&
277
+ (checksum_required && context.config.request_checksum_calculation == 'when_required')
278
+ end
279
+
280
+ def checksum_optional?(context)
143
281
  context.operation.http_checksum &&
144
- (ChecksumAlgorithm.request_algorithm_selection(context) ||
145
- context[:default_request_checksum_algorithm])
282
+ context.config.request_checksum_calculation != 'when_required'
146
283
  end
147
284
 
148
- def should_verify_response_checksum?(context)
149
- context[:http_checksum][:validation_list] && !context[:http_checksum][:validation_list].empty?
285
+ def checksum_provided_as_header?(headers)
286
+ headers.any? { |k, _| k.start_with?('x-amz-checksum-') }
287
+ end
288
+
289
+ def should_calculate_request_checksum?(context)
290
+ !checksum_provided_as_header?(context.http_request.headers) &&
291
+ request_algorithm_selection(context) &&
292
+ (checksum_required?(context) || checksum_optional?(context))
293
+ end
294
+
295
+ def choose_request_algorithm!(context)
296
+ algorithm = request_algorithm_selection(context).upcase
297
+ return algorithm if CLIENT_ALGORITHMS.include?(algorithm)
298
+
299
+ if CRT_ALGORITHMS.include?(algorithm)
300
+ raise ArgumentError,
301
+ 'CRC32C and CRC64NVME requires CRT support ' \
302
+ '- install the aws-crt gem'
303
+ end
304
+
305
+ raise ArgumentError,
306
+ "#{algorithm} is not a supported checksum algorithm."
307
+ end
308
+
309
+ def checksum_request_in(context)
310
+ if context.operation['unsignedPayload'] ||
311
+ context.operation['authtype'] == 'v4-unsigned-body'
312
+ 'trailer'
313
+ else
314
+ 'header'
315
+ end
150
316
  end
151
317
 
152
318
  def calculate_request_checksum(context, checksum_properties)
153
- case checksum_properties['in']
319
+ headers = context.http_request.headers
320
+ if (algorithm_header = checksum_properties[:request_algorithm_header])
321
+ headers[algorithm_header] = checksum_properties[:algorithm]
322
+ end
323
+ case checksum_properties[:in]
154
324
  when 'header'
155
- header_name = checksum_properties['name']
156
- body = context.http_request.body_contents
157
- if body
158
- context.http_request.headers[header_name] ||=
159
- ChecksumAlgorithm.calculate_checksum(checksum_properties['algorithm'], body)
160
- end
325
+ apply_request_checksum(context, headers, checksum_properties)
161
326
  when 'trailer'
162
- apply_request_trailer_checksum(context, checksum_properties)
327
+ apply_request_trailer_checksum(context, headers, checksum_properties)
328
+ else
329
+ # nothing
330
+ end
331
+ end
332
+
333
+ def apply_request_checksum(context, headers, checksum_properties)
334
+ header_name = checksum_properties[:name]
335
+ body = context.http_request.body_contents
336
+ headers[header_name] = calculate_checksum(
337
+ checksum_properties[:algorithm],
338
+ body
339
+ )
340
+ end
341
+
342
+ def calculate_checksum(algorithm, body)
343
+ digest = ChecksumAlgorithm.digest_for_algorithm(algorithm)
344
+ if body.respond_to?(:read)
345
+ update_in_chunks(digest, body)
346
+ else
347
+ digest.update(body)
348
+ end
349
+ digest.base64digest
350
+ end
351
+
352
+ def update_in_chunks(digest, io)
353
+ loop do
354
+ chunk = io.read(CHUNK_SIZE)
355
+ break unless chunk
356
+
357
+ digest.update(chunk)
163
358
  end
359
+ io.rewind
164
360
  end
165
361
 
166
- def apply_request_trailer_checksum(context, checksum_properties)
167
- location_name = checksum_properties['name']
362
+ def apply_request_trailer_checksum(context, headers, checksum_properties)
363
+ location_name = checksum_properties[:name]
168
364
 
169
365
  # set required headers
170
- headers = context.http_request.headers
171
366
  headers['Content-Encoding'] = 'aws-chunked'
172
367
  headers['X-Amz-Content-Sha256'] = 'STREAMING-UNSIGNED-PAYLOAD-TRAILER'
173
368
  headers['X-Amz-Trailer'] = location_name
@@ -176,121 +371,88 @@ module Aws
176
371
  # to set the Content-Length header (set by content_length plugin).
177
372
  # This means we cannot use Transfer-Encoding=chunked
178
373
 
179
- if !context.http_request.body.respond_to?(:size)
374
+ unless context.http_request.body.respond_to?(:size)
180
375
  raise Aws::Errors::ChecksumError, 'Could not determine length of the body'
181
376
  end
182
377
  headers['X-Amz-Decoded-Content-Length'] = context.http_request.body.size
183
378
 
184
379
  context.http_request.body = AwsChunkedTrailerDigestIO.new(
185
380
  context.http_request.body,
186
- checksum_properties['algorithm'],
381
+ checksum_properties[:algorithm],
187
382
  location_name
188
383
  )
189
384
  end
190
385
 
386
+ def should_verify_response_checksum?(context)
387
+ request_validation_mode(context) == 'ENABLED'
388
+ end
389
+
191
390
  # Add events to the http_response to verify the checksum as its read
192
391
  # This prevents the body from being read multiple times
193
392
  # verification is done only once a successful response has completed
194
393
  def add_verify_response_checksum_handlers(context)
195
- http_response = context.http_response
196
- checksum_context = { }
197
- http_response.on_headers do |_status, headers|
198
- header_name, algorithm = response_header_to_verify(headers, context[:http_checksum][:validation_list])
199
- if header_name
200
- expected = headers[header_name]
201
-
202
- unless context[:http_checksum][:skip_on_suffix] && /-[\d]+$/.match(expected)
203
- checksum_context[:algorithm] = algorithm
204
- checksum_context[:header_name] = header_name
205
- checksum_context[:digest] = ChecksumAlgorithm.digest_for_algorithm(algorithm)
206
- checksum_context[:expected] = expected
207
- end
208
- end
209
- end
394
+ checksum_context = {}
395
+ add_verify_response_headers_handler(context, checksum_context)
396
+ add_verify_response_data_handler(context, checksum_context)
397
+ add_verify_response_success_handler(context, checksum_context)
398
+ end
210
399
 
211
- http_response.on_data do |chunk|
212
- checksum_context[:digest].update(chunk) if checksum_context[:digest]
400
+ def add_verify_response_headers_handler(context, checksum_context)
401
+ validation_list = CHECKSUM_ALGORITHM_PRIORITIES &
402
+ operation_response_algorithms(context)
403
+ context[:http_checksum][:validation_list] = validation_list
404
+
405
+ context.http_response.on_headers do |_status, headers|
406
+ header_name, algorithm = response_header_to_verify(
407
+ headers,
408
+ validation_list
409
+ )
410
+ next unless header_name
411
+
412
+ expected = headers[header_name]
413
+ next if context[:http_checksum][:skip_on_suffix] && /-\d+$/.match(expected)
414
+
415
+ checksum_context[:algorithm] = algorithm
416
+ checksum_context[:header_name] = header_name
417
+ checksum_context[:digest] = ChecksumAlgorithm.digest_for_algorithm(algorithm)
418
+ checksum_context[:expected] = expected
213
419
  end
420
+ end
214
421
 
215
- http_response.on_success do
216
- if checksum_context[:digest] &&
217
- (computed = checksum_context[:digest].base64digest)
422
+ def add_verify_response_data_handler(context, checksum_context)
423
+ context.http_response.on_data do |chunk|
424
+ checksum_context[:digest]&.update(chunk)
425
+ end
426
+ end
218
427
 
219
- if computed != checksum_context[:expected]
220
- raise Aws::Errors::ChecksumError,
221
- "Checksum validation failed on #{checksum_context[:header_name]} "\
222
- "computed: #{computed}, expected: #{checksum_context[:expected]}"
223
- end
428
+ def add_verify_response_success_handler(context, checksum_context)
429
+ context.http_response.on_success do
430
+ next unless checksum_context[:digest]
224
431
 
432
+ computed = checksum_context[:digest].base64digest
433
+ if computed == checksum_context[:expected]
225
434
  context[:http_checksum][:validated] = checksum_context[:algorithm]
435
+ else
436
+ raise Aws::Errors::ChecksumError,
437
+ "Checksum validation failed on #{checksum_context[:header_name]} "\
438
+ "computed: #{computed}, expected: #{checksum_context[:expected]}"
226
439
  end
227
440
  end
228
441
  end
229
442
 
230
- # returns nil if no headers to verify
231
443
  def response_header_to_verify(headers, validation_list)
232
444
  validation_list.each do |algorithm|
233
- header_name = "x-amz-checksum-#{algorithm}"
445
+ header_name = "x-amz-checksum-#{algorithm.downcase}"
234
446
  return [header_name, algorithm] if headers[header_name]
235
447
  end
236
448
  nil
237
449
  end
238
-
239
- # determine where (header vs trailer) a request checksum should be added
240
- def checksum_request_in(context)
241
- if context.operation['unsignedPayload'] ||
242
- context.operation['authtype'] == 'v4-unsigned-body'
243
- 'trailer'
244
- else
245
- 'header'
246
- end
247
- end
248
-
249
- end
250
-
251
- def self.calculate_checksum(algorithm, body)
252
- digest = ChecksumAlgorithm.digest_for_algorithm(algorithm)
253
- if body.respond_to?(:read)
254
- ChecksumAlgorithm.update_in_chunks(digest, body)
255
- else
256
- digest.update(body)
257
- end
258
- digest.base64digest
259
- end
260
-
261
- def self.digest_for_algorithm(algorithm)
262
- case algorithm
263
- when 'CRC32'
264
- Digest32.new(Zlib.method(:crc32))
265
- when 'CRC32C'
266
- # this will only be used if input algorithm is CRC32C AND client supports it (crt available)
267
- Digest32.new(Aws::Crt::Checksums.method(:crc32c))
268
- when 'SHA1'
269
- Digest::SHA1.new
270
- when 'SHA256'
271
- Digest::SHA256.new
272
- end
273
- end
274
-
275
- # The trailer size (in bytes) is the overhead + the trailer name +
276
- # the length of the base64 encoded checksum
277
- def self.trailer_length(algorithm, location_name)
278
- CHECKSUM_SIZE[algorithm] + location_name.size
279
- end
280
-
281
- def self.update_in_chunks(digest, io)
282
- loop do
283
- chunk = io.read(CHUNK_SIZE)
284
- break unless chunk
285
- digest.update(chunk)
286
- end
287
- io.rewind
288
450
  end
289
451
 
290
452
  # Wrapper for request body that implements application-layer
291
453
  # chunking with Digest computed on chunks + added as a trailer
292
454
  class AwsChunkedTrailerDigestIO
293
- CHUNK_SIZE = 16384
455
+ CHUNK_SIZE = 16_384
294
456
 
295
457
  def initialize(io, algorithm, location_name)
296
458
  @io = io
@@ -331,7 +493,7 @@ module Aws
331
493
  else
332
494
  trailers = {}
333
495
  trailers[@location_name] = @digest.base64digest
334
- trailers = trailers.map { |k,v| "#{k}:#{v}"}.join("\r\n")
496
+ trailers = trailers.map { |k,v| "#{k}:#{v}" }.join("\r\n")
335
497
  @trailer_io = StringIO.new("0\r\n#{trailers}\r\n\r\n")
336
498
  chunk = @trailer_io.read(length, buf)
337
499
  end
@@ -11,8 +11,8 @@ module Aws
11
11
  CHUNK_SIZE = 1 * 1024 * 1024 # one MB
12
12
 
13
13
  def call(context)
14
- if checksum_required?(context) &&
15
- !context[:checksum_algorithms] && # skip in favor of flexible checksum
14
+ if context.operation.http_checksum_required &&
15
+ !context[:http_checksum][:request_algorithm] && # skip in favor of flexible checksum
16
16
  !context[:s3_express_endpoint] # s3 express endpoints do not support md5
17
17
  body = context.http_request.body
18
18
  context.http_request.headers['Content-Md5'] ||= md5(body)
@@ -22,12 +22,6 @@ module Aws
22
22
 
23
23
  private
24
24
 
25
- def checksum_required?(context)
26
- context.operation.http_checksum_required ||
27
- (context.operation.http_checksum &&
28
- context.operation.http_checksum['requestChecksumRequired'])
29
- end
30
-
31
25
  # @param [File, Tempfile, IO#read, String] value
32
26
  # @return [String<MD5>]
33
27
  def md5(value)
@@ -113,7 +113,7 @@ module Aws
113
113
  signing_algorithm: scheme_name.to_sym,
114
114
  uri_escape_path: !!!auth_scheme['disableDoubleEncoding'],
115
115
  normalize_path: !!!auth_scheme['disableNormalizePath'],
116
- unsigned_headers: %w[content-length user-agent x-amzn-trace-id]
116
+ unsigned_headers: %w[content-length user-agent x-amzn-trace-id expect transfer-encoding connection]
117
117
  )
118
118
  rescue Aws::Sigv4::Errors::MissingCredentialsError
119
119
  raise Aws::Errors::MissingCredentialsError
@@ -25,7 +25,16 @@ module Aws
25
25
  "ACCOUNT_ID_MODE_DISABLED": "Q",
26
26
  "ACCOUNT_ID_MODE_REQUIRED": "R",
27
27
  "SIGV4A_SIGNING": "S",
28
- "RESOLVED_ACCOUNT_ID": "T"
28
+ "RESOLVED_ACCOUNT_ID": "T",
29
+ "FLEXIBLE_CHECKSUMS_REQ_CRC32" : "U",
30
+ "FLEXIBLE_CHECKSUMS_REQ_CRC32C" : "V",
31
+ "FLEXIBLE_CHECKSUMS_REQ_CRC64" : "W",
32
+ "FLEXIBLE_CHECKSUMS_REQ_SHA1" : "X",
33
+ "FLEXIBLE_CHECKSUMS_REQ_SHA256" : "Y",
34
+ "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED" : "Z",
35
+ "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED" : "a",
36
+ "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED" : "b",
37
+ "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED" : "c"
29
38
  }
30
39
  METRICS
31
40
 
@@ -212,6 +212,8 @@ module Aws
212
212
  :retry_mode,
213
213
  :adaptive_retry_wait_to_fill,
214
214
  :correct_clock_skew,
215
+ :request_checksum_calculation,
216
+ :response_checksum_validation,
215
217
  :csm_client_id,
216
218
  :csm_enabled,
217
219
  :csm_host,
@@ -257,11 +257,34 @@ module Aws::SSO
257
257
  # Used when loading credentials from the shared credentials file
258
258
  # at HOME/.aws/credentials. When not specified, 'default' is used.
259
259
  #
260
+ # @option options [String] :request_checksum_calculation ("when_supported")
261
+ # Determines when a checksum will be calculated for request payloads. Values are:
262
+ #
263
+ # * `when_supported` - (default) When set, a checksum will be
264
+ # calculated for all request payloads of operations modeled with the
265
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
266
+ # `requestAlgorithmMember` is modeled.
267
+ # * `when_required` - When set, a checksum will only be calculated for
268
+ # request payloads of operations modeled with the `httpChecksum` trait where
269
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
270
+ # is modeled and supplied.
271
+ #
260
272
  # @option options [Integer] :request_min_compression_size_bytes (10240)
261
273
  # The minimum size in bytes that triggers compression for request
262
274
  # bodies. The value must be non-negative integer value between 0
263
275
  # and 10485780 bytes inclusive.
264
276
  #
277
+ # @option options [String] :response_checksum_validation ("when_supported")
278
+ # Determines when checksum validation will be performed on response payloads. Values are:
279
+ #
280
+ # * `when_supported` - (default) When set, checksum validation is performed on all
281
+ # response payloads of operations modeled with the `httpChecksum` trait where
282
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
283
+ # are supported.
284
+ # * `when_required` - When set, checksum validation is not performed on
285
+ # response payloads of operations unless the checksum algorithm is supported and
286
+ # the `requestValidationModeMember` member is set to `ENABLED`.
287
+ #
265
288
  # @option options [Proc] :retry_backoff
266
289
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
267
290
  # This option is only used in the `legacy` retry mode.
@@ -669,7 +692,7 @@ module Aws::SSO
669
692
  tracer: tracer
670
693
  )
671
694
  context[:gem_name] = 'aws-sdk-core'
672
- context[:gem_version] = '3.214.1'
695
+ context[:gem_version] = '3.217.1'
673
696
  Seahorse::Client::Request.new(handlers, context)
674
697
  end
675
698
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.214.1'
59
+ GEM_VERSION = '3.217.1'
60
60
 
61
61
  end
62
62
 
@@ -257,11 +257,34 @@ module Aws::SSOOIDC
257
257
  # Used when loading credentials from the shared credentials file
258
258
  # at HOME/.aws/credentials. When not specified, 'default' is used.
259
259
  #
260
+ # @option options [String] :request_checksum_calculation ("when_supported")
261
+ # Determines when a checksum will be calculated for request payloads. Values are:
262
+ #
263
+ # * `when_supported` - (default) When set, a checksum will be
264
+ # calculated for all request payloads of operations modeled with the
265
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
266
+ # `requestAlgorithmMember` is modeled.
267
+ # * `when_required` - When set, a checksum will only be calculated for
268
+ # request payloads of operations modeled with the `httpChecksum` trait where
269
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
270
+ # is modeled and supplied.
271
+ #
260
272
  # @option options [Integer] :request_min_compression_size_bytes (10240)
261
273
  # The minimum size in bytes that triggers compression for request
262
274
  # bodies. The value must be non-negative integer value between 0
263
275
  # and 10485780 bytes inclusive.
264
276
  #
277
+ # @option options [String] :response_checksum_validation ("when_supported")
278
+ # Determines when checksum validation will be performed on response payloads. Values are:
279
+ #
280
+ # * `when_supported` - (default) When set, checksum validation is performed on all
281
+ # response payloads of operations modeled with the `httpChecksum` trait where
282
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
283
+ # are supported.
284
+ # * `when_required` - When set, checksum validation is not performed on
285
+ # response payloads of operations unless the checksum algorithm is supported and
286
+ # the `requestValidationModeMember` member is set to `ENABLED`.
287
+ #
265
288
  # @option options [Proc] :retry_backoff
266
289
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
267
290
  # This option is only used in the `legacy` retry mode.
@@ -449,7 +472,7 @@ module Aws::SSOOIDC
449
472
 
450
473
  # Creates and returns access and refresh tokens for clients that are
451
474
  # authenticated using client secrets. The access token can be used to
452
- # fetch short-term credentials for the assigned AWS accounts or to
475
+ # fetch short-lived credentials for the assigned AWS accounts or to
453
476
  # access application APIs using `bearer` authentication.
454
477
  #
455
478
  # @option params [required, String] :client_id
@@ -461,30 +484,28 @@ module Aws::SSOOIDC
461
484
  # the persisted result of the RegisterClient API.
462
485
  #
463
486
  # @option params [required, String] :grant_type
464
- # Supports the following OAuth grant types: Device Code and Refresh
465
- # Token. Specify either of the following values, depending on the grant
466
- # type that you want:
487
+ # Supports the following OAuth grant types: Authorization Code, Device
488
+ # Code, and Refresh Token. Specify one of the following values,
489
+ # depending on the grant type that you want:
490
+ #
491
+ # * Authorization Code - `authorization_code`
467
492
  #
468
493
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
469
494
  #
470
495
  # * Refresh Token - `refresh_token`
471
496
  #
472
- # For information about how to obtain the device code, see the
473
- # StartDeviceAuthorization topic.
474
- #
475
497
  # @option params [String] :device_code
476
498
  # Used only when calling this API for the Device Code grant type. This
477
- # short-term code is used to identify this authorization request. This
499
+ # short-lived code is used to identify this authorization request. This
478
500
  # comes from the result of the StartDeviceAuthorization API.
479
501
  #
480
502
  # @option params [String] :code
481
503
  # Used only when calling this API for the Authorization Code grant type.
482
- # The short-term code is used to identify this authorization request.
483
- # This grant type is currently unsupported for the CreateToken API.
504
+ # The short-lived code is used to identify this authorization request.
484
505
  #
485
506
  # @option params [String] :refresh_token
486
507
  # Used only when calling this API for the Refresh Token grant type. This
487
- # token is used to refresh short-term tokens, such as the access token,
508
+ # token is used to refresh short-lived tokens, such as the access token,
488
509
  # that might expire.
489
510
  #
490
511
  # For more information about the features and limitations of the current
@@ -590,7 +611,7 @@ module Aws::SSOOIDC
590
611
 
591
612
  # Creates and returns access and refresh tokens for clients and
592
613
  # applications that are authenticated using IAM entities. The access
593
- # token can be used to fetch short-term credentials for the assigned
614
+ # token can be used to fetch short-lived credentials for the assigned
594
615
  # Amazon Web Services accounts or to access application APIs using
595
616
  # `bearer` authentication.
596
617
  #
@@ -613,14 +634,14 @@ module Aws::SSOOIDC
613
634
  #
614
635
  # @option params [String] :code
615
636
  # Used only when calling this API for the Authorization Code grant type.
616
- # This short-term code is used to identify this authorization request.
637
+ # This short-lived code is used to identify this authorization request.
617
638
  # The code is obtained through a redirect from IAM Identity Center to a
618
639
  # redirect URI persisted in the Authorization Code GrantOptions for the
619
640
  # application.
620
641
  #
621
642
  # @option params [String] :refresh_token
622
643
  # Used only when calling this API for the Refresh Token grant type. This
623
- # token is used to refresh short-term tokens, such as the access token,
644
+ # token is used to refresh short-lived tokens, such as the access token,
624
645
  # that might expire.
625
646
  #
626
647
  # For more information about the features and limitations of the current
@@ -823,9 +844,10 @@ module Aws::SSOOIDC
823
844
  req.send_request(options)
824
845
  end
825
846
 
826
- # Registers a client with IAM Identity Center. This allows clients to
827
- # initiate device authorization. The output should be persisted for
828
- # reuse through many authentication requests.
847
+ # Registers a public client with IAM Identity Center. This allows
848
+ # clients to perform authorization using the authorization
849
+ # code grant with Proof Key for Code Exchange (PKCE) or the device
850
+ # code grant.
829
851
  #
830
852
  # @option params [required, String] :client_name
831
853
  # The friendly name of the client.
@@ -847,7 +869,14 @@ module Aws::SSOOIDC
847
869
  # @option params [Array<String>] :grant_types
848
870
  # The list of OAuth 2.0 grant types that are defined by the client. This
849
871
  # list is used to restrict the token granting flows available to the
850
- # client.
872
+ # client. Supports the following OAuth 2.0 grant types: Authorization
873
+ # Code, Device Code, and Refresh Token.
874
+ #
875
+ # * Authorization Code - `authorization_code`
876
+ #
877
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
878
+ #
879
+ # * Refresh Token - `refresh_token`
851
880
  #
852
881
  # @option params [String] :issuer_url
853
882
  # The IAM Identity Center Issuer URL associated with an instance of IAM
@@ -1022,7 +1051,7 @@ module Aws::SSOOIDC
1022
1051
  tracer: tracer
1023
1052
  )
1024
1053
  context[:gem_name] = 'aws-sdk-core'
1025
- context[:gem_version] = '3.214.1'
1054
+ context[:gem_version] = '3.217.1'
1026
1055
  Seahorse::Client::Request.new(handlers, context)
1027
1056
  end
1028
1057
 
@@ -64,34 +64,32 @@ module Aws::SSOOIDC
64
64
  # @return [String]
65
65
  #
66
66
  # @!attribute [rw] grant_type
67
- # Supports the following OAuth grant types: Device Code and Refresh
68
- # Token. Specify either of the following values, depending on the
69
- # grant type that you want:
67
+ # Supports the following OAuth grant types: Authorization Code, Device
68
+ # Code, and Refresh Token. Specify one of the following values,
69
+ # depending on the grant type that you want:
70
+ #
71
+ # * Authorization Code - `authorization_code`
70
72
  #
71
73
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
72
74
  #
73
75
  # * Refresh Token - `refresh_token`
74
- #
75
- # For information about how to obtain the device code, see the
76
- # StartDeviceAuthorization topic.
77
76
  # @return [String]
78
77
  #
79
78
  # @!attribute [rw] device_code
80
79
  # Used only when calling this API for the Device Code grant type. This
81
- # short-term code is used to identify this authorization request. This
82
- # comes from the result of the StartDeviceAuthorization API.
80
+ # short-lived code is used to identify this authorization request.
81
+ # This comes from the result of the StartDeviceAuthorization API.
83
82
  # @return [String]
84
83
  #
85
84
  # @!attribute [rw] code
86
85
  # Used only when calling this API for the Authorization Code grant
87
- # type. The short-term code is used to identify this authorization
88
- # request. This grant type is currently unsupported for the
89
- # CreateToken API.
86
+ # type. The short-lived code is used to identify this authorization
87
+ # request.
90
88
  # @return [String]
91
89
  #
92
90
  # @!attribute [rw] refresh_token
93
91
  # Used only when calling this API for the Refresh Token grant type.
94
- # This token is used to refresh short-term tokens, such as the access
92
+ # This token is used to refresh short-lived tokens, such as the access
95
93
  # token, that might expire.
96
94
  #
97
95
  # For more information about the features and limitations of the
@@ -217,7 +215,7 @@ module Aws::SSOOIDC
217
215
  #
218
216
  # @!attribute [rw] code
219
217
  # Used only when calling this API for the Authorization Code grant
220
- # type. This short-term code is used to identify this authorization
218
+ # type. This short-lived code is used to identify this authorization
221
219
  # request. The code is obtained through a redirect from IAM Identity
222
220
  # Center to a redirect URI persisted in the Authorization Code
223
221
  # GrantOptions for the application.
@@ -225,7 +223,7 @@ module Aws::SSOOIDC
225
223
  #
226
224
  # @!attribute [rw] refresh_token
227
225
  # Used only when calling this API for the Refresh Token grant type.
228
- # This token is used to refresh short-term tokens, such as the access
226
+ # This token is used to refresh short-lived tokens, such as the access
229
227
  # token, that might expire.
230
228
  #
231
229
  # For more information about the features and limitations of the
@@ -606,7 +604,14 @@ module Aws::SSOOIDC
606
604
  # @!attribute [rw] grant_types
607
605
  # The list of OAuth 2.0 grant types that are defined by the client.
608
606
  # This list is used to restrict the token granting flows available to
609
- # the client.
607
+ # the client. Supports the following OAuth 2.0 grant types:
608
+ # Authorization Code, Device Code, and Refresh Token.
609
+ #
610
+ # * Authorization Code - `authorization_code`
611
+ #
612
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
613
+ #
614
+ # * Refresh Token - `refresh_token`
610
615
  # @return [Array<String>]
611
616
  #
612
617
  # @!attribute [rw] issuer_url
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.214.1'
59
+ GEM_VERSION = '3.217.1'
60
60
 
61
61
  end
62
62
 
@@ -259,11 +259,34 @@ module Aws::STS
259
259
  # Used when loading credentials from the shared credentials file
260
260
  # at HOME/.aws/credentials. When not specified, 'default' is used.
261
261
  #
262
+ # @option options [String] :request_checksum_calculation ("when_supported")
263
+ # Determines when a checksum will be calculated for request payloads. Values are:
264
+ #
265
+ # * `when_supported` - (default) When set, a checksum will be
266
+ # calculated for all request payloads of operations modeled with the
267
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
268
+ # `requestAlgorithmMember` is modeled.
269
+ # * `when_required` - When set, a checksum will only be calculated for
270
+ # request payloads of operations modeled with the `httpChecksum` trait where
271
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
272
+ # is modeled and supplied.
273
+ #
262
274
  # @option options [Integer] :request_min_compression_size_bytes (10240)
263
275
  # The minimum size in bytes that triggers compression for request
264
276
  # bodies. The value must be non-negative integer value between 0
265
277
  # and 10485780 bytes inclusive.
266
278
  #
279
+ # @option options [String] :response_checksum_validation ("when_supported")
280
+ # Determines when checksum validation will be performed on response payloads. Values are:
281
+ #
282
+ # * `when_supported` - (default) When set, checksum validation is performed on all
283
+ # response payloads of operations modeled with the `httpChecksum` trait where
284
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
285
+ # are supported.
286
+ # * `when_required` - When set, checksum validation is not performed on
287
+ # response payloads of operations unless the checksum algorithm is supported and
288
+ # the `requestValidationModeMember` member is set to `ENABLED`.
289
+ #
267
290
  # @option options [Proc] :retry_backoff
268
291
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
269
292
  # This option is only used in the `legacy` retry mode.
@@ -831,7 +854,7 @@ module Aws::STS
831
854
  # The regex used to validate this parameter is a string of characters
832
855
  # consisting of upper- and lower-case alphanumeric characters with no
833
856
  # spaces. You can also include underscores or any of the following
834
- # characters: =,.@-. You cannot use a value that begins with the text
857
+ # characters: +=,.@-. You cannot use a value that begins with the text
835
858
  # `aws:`. This prefix is reserved for Amazon Web Services internal use.
836
859
  #
837
860
  #
@@ -1514,8 +1537,9 @@ module Aws::STS
1514
1537
  # authenticating the user who is using your application with a web
1515
1538
  # identity provider before the application makes an
1516
1539
  # `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
1517
- # formatted as either an integer or a long integer. Only tokens with RSA
1518
- # algorithms (RS256) are supported.
1540
+ # formatted as either an integer or a long integer. Tokens must be
1541
+ # signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
1542
+ # (ES256, ES384, or ES512).
1519
1543
  #
1520
1544
  # @option params [String] :provider_id
1521
1545
  # The fully qualified host component of the domain name of the OAuth 2.0
@@ -1708,14 +1732,14 @@ module Aws::STS
1708
1732
  end
1709
1733
 
1710
1734
  # Returns a set of short term credentials you can use to perform
1711
- # privileged tasks in a member account.
1735
+ # privileged tasks on a member account in your organization.
1712
1736
  #
1713
- # Before you can launch a privileged session, you must have enabled
1714
- # centralized root access in your organization. For steps to enable this
1715
- # feature, see [Centralize root access for member accounts][1] in the
1716
- # *IAM User Guide*.
1737
+ # Before you can launch a privileged session, you must have centralized
1738
+ # root access in your organization. For steps to enable this feature,
1739
+ # see [Centralize root access for member accounts][1] in the *IAM User
1740
+ # Guide*.
1717
1741
  #
1718
- # <note markdown="1"> The global endpoint is not supported for AssumeRoot. You must send
1742
+ # <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
1719
1743
  # this request to a Regional STS endpoint. For more information, see
1720
1744
  # [Endpoints][2].
1721
1745
  #
@@ -1737,9 +1761,7 @@ module Aws::STS
1737
1761
  # @option params [required, Types::PolicyDescriptorType] :task_policy_arn
1738
1762
  # The identity based policy that scopes the session to the privileged
1739
1763
  # tasks that can be performed. You can use one of following Amazon Web
1740
- # Services managed policies to scope root session actions. You can add
1741
- # additional customer managed policies to further limit the permissions
1742
- # for the root session.
1764
+ # Services managed policies to scope root session actions.
1743
1765
  #
1744
1766
  # * [IAMAuditRootUserCredentials][1]
1745
1767
  #
@@ -2573,7 +2595,7 @@ module Aws::STS
2573
2595
  tracer: tracer
2574
2596
  )
2575
2597
  context[:gem_name] = 'aws-sdk-core'
2576
- context[:gem_version] = '3.214.1'
2598
+ context[:gem_version] = '3.217.1'
2577
2599
  Seahorse::Client::Request.new(handlers, context)
2578
2600
  end
2579
2601
 
@@ -291,7 +291,7 @@ module Aws::STS
291
291
  # The regex used to validate this parameter is a string of characters
292
292
  # consisting of upper- and lower-case alphanumeric characters with no
293
293
  # spaces. You can also include underscores or any of the following
294
- # characters: =,.@-. You cannot use a value that begins with the text
294
+ # characters: +=,.@-. You cannot use a value that begins with the text
295
295
  # `aws:`. This prefix is reserved for Amazon Web Services internal
296
296
  # use.
297
297
  #
@@ -717,8 +717,9 @@ module Aws::STS
717
717
  # token by authenticating the user who is using your application with
718
718
  # a web identity provider before the application makes an
719
719
  # `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
720
- # formatted as either an integer or a long integer. Only tokens with
721
- # RSA algorithms (RS256) are supported.
720
+ # formatted as either an integer or a long integer. Tokens must be
721
+ # signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
722
+ # (ES256, ES384, or ES512).
722
723
  # @return [String]
723
724
  #
724
725
  # @!attribute [rw] provider_id
@@ -961,9 +962,7 @@ module Aws::STS
961
962
  # @!attribute [rw] task_policy_arn
962
963
  # The identity based policy that scopes the session to the privileged
963
964
  # tasks that can be performed. You can use one of following Amazon Web
964
- # Services managed policies to scope root session actions. You can add
965
- # additional customer managed policies to further limit the
966
- # permissions for the root session.
965
+ # Services managed policies to scope root session actions.
967
966
  #
968
967
  # * [IAMAuditRootUserCredentials][1]
969
968
  #
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.214.1'
59
+ GEM_VERSION = '3.217.1'
60
60
 
61
61
  end
62
62
 
@@ -75,6 +75,8 @@ module Seahorse
75
75
  # Necessary to define as a subclass of Delegator
76
76
  # @api private
77
77
  def __getobj__
78
+ return yield if block_given? && !defined?(@data)
79
+
78
80
  @data
79
81
  end
80
82
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.214.1
4
+ version: 3.217.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-28 00:00:00.000000000 Z
11
+ date: 2025-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath