aws-sdk-core 3.51.0 → 3.52.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/aws-sdk-core/errors.rb +9 -0
- data/lib/aws-sdk-core/log/param_filter.rb +1 -1
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +3 -1
- data/lib/seahorse/client/plugins/content_length.rb +7 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01b5ed8216df81feb40c1a17ea7fd0e096bf5ae9
|
4
|
+
data.tar.gz: 96c2d0598a107536dab4e1038828d093e82cb0ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529ba5e1d1ead711cc0a0ad24eb735804fd3f28e9e5085b85a66a7de1c6150276b60fe727ca9206cc016c3028492a4a95574d7c140fe572faa05b1916b7b125b
|
7
|
+
data.tar.gz: 77e9b78f97a6e73a01da06a69f1ea01b186baf2ad752aa9d1a3ffb14dc88cd56f6a82a9c67826a503010ec032d867cc0a5b8d48c113f4ed93af9976c9617a36c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.52.0
|
data/lib/aws-sdk-core/errors.rb
CHANGED
@@ -34,6 +34,15 @@ module Aws
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
# Raised when a `streaming` operation has `requiresLength` trait
|
38
|
+
# enabled but request payload size/length cannot be calculated
|
39
|
+
class MissingContentLength < RuntimeError
|
40
|
+
def initialize(*args)
|
41
|
+
msg = 'Required `Content-Length` value missing for the request.'
|
42
|
+
super(msg)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
37
46
|
# Rasied when endpoint discovery failed for operations
|
38
47
|
# that requires endpoints from endpoint discovery
|
39
48
|
class EndpointDiscoveryError < RuntimeError
|
@@ -11,7 +11,7 @@ module Aws
|
|
11
11
|
#
|
12
12
|
# @api private
|
13
13
|
# begin
|
14
|
-
SENSITIVE = [:access_token, :account_name, :account_password, :address, :admin_contact, :admin_password, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :body, :bot_configuration, :cause, :client_id, :client_secret, :configuration, :copy_source_sse_customer_key, :credentials, :custom_attributes, :db_password, :default_phone_number, :definition, :description, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :id, :id_token, :input, :input_text, :key_id, :key_store_password, :kms_key_id, :kms_master_key_id, :last_name, :local_console_password, :master_account_email, :master_user_password, :message, :name, :new_password, :notes, :old_password, :output, :owner_information, :parameters, :passphrase, :password, :payload, :phone_number, :plaintext, :previous_password, :primary_email, :primary_provisioned_number, :private_key, :proposed_password, :public_key, :qr_code_png, :query, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :service_password, :session_attributes, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :upload_credentials, :upload_url, :user_email, :user_name, :username, :value, :values, :variables, :zip_file]
|
14
|
+
SENSITIVE = [:access_token, :account_name, :account_password, :address, :admin_contact, :admin_password, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :body, :bot_configuration, :bot_email, :cause, :client_id, :client_secret, :configuration, :copy_source_sse_customer_key, :credentials, :custom_attributes, :db_password, :default_phone_number, :definition, :description, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :id, :id_token, :input, :input_text, :key_id, :key_store_password, :kms_key_id, :kms_master_key_id, :lambda_function_arn, :last_name, :local_console_password, :master_account_email, :master_user_password, :message, :name, :new_password, :notes, :old_password, :outbound_events_https_endpoint, :output, :owner_information, :parameters, :passphrase, :password, :payload, :phone_number, :plaintext, :previous_password, :primary_email, :primary_provisioned_number, :private_key, :proposed_password, :public_key, :qr_code_png, :query, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :security_token, :service_password, :session_attributes, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :upload_credentials, :upload_url, :user_email, :user_name, :username, :value, :values, :variables, :zip_file]
|
15
15
|
# end
|
16
16
|
|
17
17
|
def initialize(options = {})
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Aws
|
2
|
+
module Plugins
|
3
|
+
|
4
|
+
# For Streaming Input Operations, when `requiresLength` is enabled
|
5
|
+
# checking whether `Content-Length` header can be set,
|
6
|
+
# for `v4-unsigned-body` operations, set `Transfer-Encoding` header
|
7
|
+
class TransferEncoding < Seahorse::Client::Plugin
|
8
|
+
|
9
|
+
# @api private
|
10
|
+
class Handler < Seahorse::Client::Handler
|
11
|
+
|
12
|
+
def call(context)
|
13
|
+
if streaming?(context.operation.input)
|
14
|
+
begin
|
15
|
+
context.http_request.body.size
|
16
|
+
rescue
|
17
|
+
if requires_length?(context.operation.input)
|
18
|
+
# if size of the IO is not available but required
|
19
|
+
raise Aws::Errors::MissingContentLength.new
|
20
|
+
elsif context.operation['authtype'] == "v4-unsigned-body"
|
21
|
+
context.http_request.headers['Transfer-Encoding'] = 'chunked'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
@handler.call(context)
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def streaming?(ref)
|
32
|
+
if payload = ref[:payload_member]
|
33
|
+
payload["streaming"] || # checking ref and shape
|
34
|
+
payload.shape["streaming"]
|
35
|
+
else
|
36
|
+
false
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def requires_length?(ref)
|
41
|
+
payload = ref[:payload_member]
|
42
|
+
payload["requiresLength"] || # checking ref and shape
|
43
|
+
payload.shape["requiresLength"]
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
handler(Handler, step: :sign)
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
data/lib/aws-sdk-sts.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -23,6 +23,7 @@ require 'aws-sdk-core/plugins/idempotency_token.rb'
|
|
23
23
|
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
24
24
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
25
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
26
27
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
27
28
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
28
29
|
|
@@ -55,6 +56,7 @@ module Aws::STS
|
|
55
56
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
56
57
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
57
58
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
58
60
|
add_plugin(Aws::Plugins::SignatureV4)
|
59
61
|
add_plugin(Aws::Plugins::Protocols::Query)
|
60
62
|
|
@@ -1734,7 +1736,7 @@ module Aws::STS
|
|
1734
1736
|
params: params,
|
1735
1737
|
config: config)
|
1736
1738
|
context[:gem_name] = 'aws-sdk-core'
|
1737
|
-
context[:gem_version] = '3.
|
1739
|
+
context[:gem_version] = '3.52.0'
|
1738
1740
|
Seahorse::Client::Request.new(handlers, context)
|
1739
1741
|
end
|
1740
1742
|
|
@@ -7,8 +7,13 @@ module Seahorse
|
|
7
7
|
class Handler < Client::Handler
|
8
8
|
|
9
9
|
def call(context)
|
10
|
-
|
11
|
-
|
10
|
+
begin
|
11
|
+
length = context.http_request.body.size
|
12
|
+
context.http_request.headers['Content-Length'] = length
|
13
|
+
rescue
|
14
|
+
# allowing `Content-Length` failed to be set
|
15
|
+
# see Aws::Plugins::TransferEncoding
|
16
|
+
end
|
12
17
|
@handler.call(context)
|
13
18
|
end
|
14
19
|
|
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.
|
4
|
+
version: 3.52.0
|
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: 2019-05-
|
11
|
+
date: 2019-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/aws-sdk-core/plugins/signature_v2.rb
|
151
151
|
- lib/aws-sdk-core/plugins/signature_v4.rb
|
152
152
|
- lib/aws-sdk-core/plugins/stub_responses.rb
|
153
|
+
- lib/aws-sdk-core/plugins/transfer_encoding.rb
|
153
154
|
- lib/aws-sdk-core/plugins/user_agent.rb
|
154
155
|
- lib/aws-sdk-core/process_credentials.rb
|
155
156
|
- lib/aws-sdk-core/query.rb
|