aws-sdk-core 3.68.0 → 3.71.0
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/VERSION +1 -1
- data/lib/aws-sdk-core/credential_provider.rb +9 -12
- data/lib/aws-sdk-core/deprecations.rb +16 -10
- data/lib/aws-sdk-core/log/param_filter.rb +1 -1
- data/lib/aws-sdk-core/param_validator.rb +4 -5
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +3 -1
- data/lib/aws-sdk-core/shared_config.rb +15 -0
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +8 -1
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +32 -0
- data/lib/aws-sdk-sts/types.rb +1 -1
- data/lib/seahorse/client/base.rb +3 -1
- data/lib/seahorse/client/plugin.rb +1 -1
- 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: baef9364982f05b50ce49aec481c67f013b8d4b2
|
4
|
+
data.tar.gz: 816c82b64b0ad53c2ad46589eb0dee360e889504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85e5b9133be8849c738f9744bef031d85168a41ae295c4339ef3b4e3eb62868dcc77ca63e2b08db7888fe6df6acb9aa844dc0b60361c09f2c383c358fbf300fb
|
7
|
+
data.tar.gz: 461ec0a49091bedcb0a8da524c8e0dc4303b114cb19f078028b84c966119c2e33e703bd8175bfba03400ec584efd7f13ae9728fac03082440836238f26d8e831
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.71.0
|
@@ -13,32 +13,29 @@ module Aws
|
|
13
13
|
!!credentials && credentials.set?
|
14
14
|
end
|
15
15
|
|
16
|
-
# @deprecated
|
17
|
-
#
|
18
|
-
# objects. Will be removed in 2.2.0.
|
16
|
+
# @deprecated This method is subject to errors from a race condition when
|
17
|
+
# called against refreshable credential objects. This will be removed.
|
19
18
|
# @see #credentials
|
20
19
|
def access_key_id
|
21
20
|
credentials ? credentials.access_key_id : nil
|
22
21
|
end
|
23
|
-
deprecated(:access_key_id, use: '#credentials')
|
22
|
+
deprecated(:access_key_id, use: '#credentials', version: '3.75')
|
24
23
|
|
25
|
-
# @deprecated
|
26
|
-
#
|
27
|
-
# objects. Will be removed in 2.2.0.
|
24
|
+
# @deprecated This method is subject to errors from a race condition when
|
25
|
+
# called against refreshable credential objects. This will be removed.
|
28
26
|
# @see #credentials
|
29
27
|
def secret_access_key
|
30
28
|
credentials ? credentials.secret_access_key : nil
|
31
29
|
end
|
32
|
-
deprecated(:secret_access_key, use: '#credentials')
|
30
|
+
deprecated(:secret_access_key, use: '#credentials', version: '3.75')
|
33
31
|
|
34
|
-
# @deprecated
|
35
|
-
#
|
36
|
-
# objects. Will be removed in 2.2.0.
|
32
|
+
# @deprecated This method is subject to errors from a race condition when
|
33
|
+
# called against refreshable credential objects. This will be removed.
|
37
34
|
# @see #credentials
|
38
35
|
def session_token
|
39
36
|
credentials ? credentials.session_token : nil
|
40
37
|
end
|
41
|
-
deprecated(:session_token, use: '#credentials')
|
38
|
+
deprecated(:session_token, use: '#credentials', version: '3.75')
|
42
39
|
|
43
40
|
end
|
44
41
|
end
|
@@ -35,33 +35,39 @@ module Aws
|
|
35
35
|
# @api private
|
36
36
|
module Deprecations
|
37
37
|
|
38
|
-
# @param [Symbol]
|
38
|
+
# @param [Symbol] method The name of the deprecated method.
|
39
39
|
#
|
40
40
|
# @option options [String] :message The warning message to issue
|
41
41
|
# when the deprecated method is called.
|
42
42
|
#
|
43
|
-
# @option options [
|
44
|
-
# method that should be used.
|
43
|
+
# @option options [String] :use The name of a method that should be used.
|
45
44
|
#
|
46
|
-
|
45
|
+
# @option options [String] :version The version that will remove the
|
46
|
+
# deprecated method.
|
47
|
+
#
|
48
|
+
def deprecated(method, options = {})
|
47
49
|
|
48
50
|
deprecation_msg = options[:message] || begin
|
49
|
-
msg = "DEPRECATION WARNING
|
50
|
-
msg << "of
|
51
|
-
msg << "
|
51
|
+
msg = "#################### DEPRECATION WARNING ####################\n"
|
52
|
+
msg << "Called deprecated method `#{method}` of #{self}."
|
53
|
+
msg << " Use `#{options[:use]}` instead.\n" if options[:use]
|
54
|
+
if options[:version]
|
55
|
+
msg << "Method `#{method}` will be removed in #{options[:version]}."
|
56
|
+
end
|
57
|
+
msg << "\n#############################################################"
|
52
58
|
msg
|
53
59
|
end
|
54
60
|
|
55
|
-
alias_method(:"deprecated_#{
|
61
|
+
alias_method(:"deprecated_#{method}", method)
|
56
62
|
|
57
63
|
warned = false # we only want to issue this warning once
|
58
64
|
|
59
|
-
define_method(
|
65
|
+
define_method(method) do |*args, &block|
|
60
66
|
unless warned
|
61
67
|
warned = true
|
62
68
|
warn(deprecation_msg + "\n" + caller.join("\n"))
|
63
69
|
end
|
64
|
-
send("deprecated_#{
|
70
|
+
send("deprecated_#{method}", *args, &block)
|
65
71
|
end
|
66
72
|
end
|
67
73
|
|
@@ -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, :block, :block_address, :body, :bot_configuration, :bot_email, :cause, :client_id, :client_secret, :comment, :configuration, :copy_source_sse_customer_key, :credentials, :current_password, :custom_attributes, :db_password, :default_phone_number, :definition, :description, :digest_tip_address, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :host_key, :id, :id_token, :input, :input_text, :ion_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, :next_password, :notes, :number, :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, :proof, :proposed_password, :public_key, :qr_code_png, :query, :random_password, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :revision, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :secret_to_authenticate_initiator, :secret_to_authenticate_target, :security_token, :service_password, :session_attributes, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_encryption_context, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :type, :upload_credentials, :upload_url, :uri, :user_email, :user_name, :user_password, :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, :block, :block_address, :body, :bot_configuration, :bot_email, :cause, :client_id, :client_secret, :comment, :configuration, :copy_source_sse_customer_key, :credentials, :current_password, :custom_attributes, :custom_private_key, :db_password, :default_phone_number, :definition, :description, :digest_tip_address, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :host_key, :id, :id_token, :input, :input_text, :ion_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, :next_password, :notes, :number, :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, :proof, :proposed_password, :public_key, :qr_code_png, :query, :random_password, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :revision, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :secret_to_authenticate_initiator, :secret_to_authenticate_target, :security_token, :service_password, :session_attributes, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_encryption_context, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :type, :upload_credentials, :upload_url, :uri, :user_email, :user_name, :user_password, :username, :value, :values, :variables, :vpn_psk, :zip_file]
|
15
15
|
# end
|
16
16
|
|
17
17
|
def initialize(options = {})
|
@@ -141,8 +141,8 @@ module Aws
|
|
141
141
|
errors << expected_got(context, "true or false", value)
|
142
142
|
end
|
143
143
|
when BlobShape
|
144
|
-
unless
|
145
|
-
errors << expected_got(context, "a String or
|
144
|
+
unless value.is_a?(String) || io_like?(value)
|
145
|
+
errors << expected_got(context, "a String or File object", value)
|
146
146
|
end
|
147
147
|
else
|
148
148
|
raise "unhandled shape type: #{ref.shape.class.name}"
|
@@ -166,9 +166,8 @@ module Aws
|
|
166
166
|
end
|
167
167
|
|
168
168
|
def io_like?(value)
|
169
|
-
value.respond_to?(:read) &&
|
170
|
-
|
171
|
-
value.respond_to?(:size)
|
169
|
+
value.respond_to?(:read) && value.respond_to?(:rewind) &&
|
170
|
+
value.respond_to?(:size)
|
172
171
|
end
|
173
172
|
|
174
173
|
def error_messages(errors)
|
@@ -35,7 +35,9 @@ to test endpoints. This should be avalid HTTP(S) URI.
|
|
35
35
|
DOCS
|
36
36
|
endpoint_prefix = cfg.api.metadata['endpointPrefix']
|
37
37
|
if cfg.region && endpoint_prefix
|
38
|
-
|
38
|
+
sts_regional = cfg.respond_to?(:sts_regional_endpoints) ? cfg.sts_regional_endpoints : nil
|
39
|
+
Aws::Partitions::EndpointProvider.resolve(
|
40
|
+
cfg.region, endpoint_prefix, sts_regional)
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
@@ -153,6 +153,21 @@ module Aws
|
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
156
|
+
def sts_regional_endpoints(opts = {})
|
157
|
+
p = opts[:profile] || @profile_name
|
158
|
+
if @config_enabled
|
159
|
+
if @parsed_credentials
|
160
|
+
mode = @parsed_credentials.fetch(p, {})["sts_regional_endpoints"]
|
161
|
+
end
|
162
|
+
if @parsed_config
|
163
|
+
mode ||= @parsed_config.fetch(p, {})["sts_regional_endpoints"]
|
164
|
+
end
|
165
|
+
mode
|
166
|
+
else
|
167
|
+
nil
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
156
171
|
def endpoint_discovery(opts = {})
|
157
172
|
p = opts[:profile] || @profile_name
|
158
173
|
if @config_enabled && @parsed_config
|
data/lib/aws-sdk-sts.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -26,6 +26,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
26
26
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
27
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
28
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
29
|
+
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
29
30
|
|
30
31
|
Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
|
31
32
|
|
@@ -59,6 +60,7 @@ module Aws::STS
|
|
59
60
|
add_plugin(Aws::Plugins::TransferEncoding)
|
60
61
|
add_plugin(Aws::Plugins::SignatureV4)
|
61
62
|
add_plugin(Aws::Plugins::Protocols::Query)
|
63
|
+
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
62
64
|
|
63
65
|
# @overload initialize(options)
|
64
66
|
# @param [Hash] options
|
@@ -192,6 +194,11 @@ module Aws::STS
|
|
192
194
|
#
|
193
195
|
# @option options [String] :session_token
|
194
196
|
#
|
197
|
+
# @option options [String] :sts_regional_endpoints ("legacy")
|
198
|
+
# Passing in 'regional' to enable regional endpoint for STS for all supported
|
199
|
+
# regions (except 'aws-global'), defaults to 'legacy' mode, using global endpoint
|
200
|
+
# for legacy regions.
|
201
|
+
#
|
195
202
|
# @option options [Boolean] :stub_responses (false)
|
196
203
|
# Causes the client to return stubbed responses. By default
|
197
204
|
# fake responses are generated and returned. You can specify
|
@@ -1808,7 +1815,7 @@ module Aws::STS
|
|
1808
1815
|
params: params,
|
1809
1816
|
config: config)
|
1810
1817
|
context[:gem_name] = 'aws-sdk-core'
|
1811
|
-
context[:gem_version] = '3.
|
1818
|
+
context[:gem_version] = '3.71.0'
|
1812
1819
|
Seahorse::Client::Request.new(handlers, context)
|
1813
1820
|
end
|
1814
1821
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Aws
|
2
|
+
module STS
|
3
|
+
module Plugins
|
4
|
+
|
5
|
+
class STSRegionalEndpoints < Seahorse::Client::Plugin
|
6
|
+
|
7
|
+
option(:sts_regional_endpoints,
|
8
|
+
default: 'legacy',
|
9
|
+
doc_type: String,
|
10
|
+
docstring: <<-DOCS) do |cfg|
|
11
|
+
Passing in 'regional' to enable regional endpoint for STS for all supported
|
12
|
+
regions (except 'aws-global'), defaults to 'legacy' mode, using global endpoint
|
13
|
+
for legacy regions.
|
14
|
+
DOCS
|
15
|
+
resolve_sts_regional_endpoints(cfg)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def self.resolve_sts_regional_endpoints(cfg)
|
21
|
+
env_mode = ENV['AWS_STS_REGIONAL_ENDPOINTS']
|
22
|
+
env_mode = nil if env_mode == ''
|
23
|
+
cfg_mode = Aws.shared_config.sts_regional_endpoints(
|
24
|
+
profile: cfg.profile)
|
25
|
+
env_mode || cfg_mode || 'legacy'
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/aws-sdk-sts/types.rb
CHANGED
@@ -1205,7 +1205,7 @@ module Aws::STS
|
|
1205
1205
|
include Aws::Structure
|
1206
1206
|
end
|
1207
1207
|
|
1208
|
-
#
|
1208
|
+
# This error is returned if the message passed to
|
1209
1209
|
# `DecodeAuthorizationMessage` was invalid. This can happen if the token
|
1210
1210
|
# contains invalid characters, such as linebreaks.
|
1211
1211
|
#
|
data/lib/seahorse/client/base.rb
CHANGED
@@ -194,13 +194,15 @@ module Seahorse
|
|
194
194
|
private
|
195
195
|
|
196
196
|
def define_operation_methods
|
197
|
+
operations_module = Module.new
|
197
198
|
@api.operation_names.each do |method_name|
|
198
|
-
define_method
|
199
|
+
operations_module.send(:define_method, method_name) do |*args, &block|
|
199
200
|
params = args[0] || {}
|
200
201
|
options = args[1] || {}
|
201
202
|
build_request(method_name, params).send_request(options, &block)
|
202
203
|
end
|
203
204
|
end
|
205
|
+
include(operations_module)
|
204
206
|
end
|
205
207
|
|
206
208
|
def build_plugins
|
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.71.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-
|
11
|
+
date: 2019-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- lib/aws-sdk-sts/client_api.rb
|
214
214
|
- lib/aws-sdk-sts/customizations.rb
|
215
215
|
- lib/aws-sdk-sts/errors.rb
|
216
|
+
- lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
|
216
217
|
- lib/aws-sdk-sts/resource.rb
|
217
218
|
- lib/aws-sdk-sts/types.rb
|
218
219
|
- lib/seahorse.rb
|