aws-sdk-core 3.67.0 → 3.70.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/process_credentials.rb +3 -3
- data/lib/aws-sdk-core/shared_config.rb +15 -11
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/seahorse/client/base.rb +3 -1
- data/lib/seahorse/client/plugin.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e22b340294a19ae57b22e0c983be429b2d32ae89
|
4
|
+
data.tar.gz: f8c3acd444c2aaee65289be6f5d79a889219245b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c91d15e63499a0289acd0317c8d5efc04955e95f4e11cbc84c8e9623e60c5cdedf0b08b12c2bbc8e0a59998b37352bb11719b2bce84246d72f05e0a0a2245e
|
7
|
+
data.tar.gz: 1c004b1ce426c64b4c6920f00a9046fce850dca6b963751db7bf99ff37974e81591317ba666a5152d7e1a5f1a02e3ad9ea8b16a59ca30f2193ab746b5cf02582
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.70.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)
|
@@ -5,7 +5,7 @@ module Aws
|
|
5
5
|
# A credential provider that executes a given process and attempts
|
6
6
|
# to read its stdout to recieve a JSON payload containing the credentials
|
7
7
|
#
|
8
|
-
# Automatically handles refreshing credentials if an Expiration time is
|
8
|
+
# Automatically handles refreshing credentials if an Expiration time is
|
9
9
|
# provided in the credentials payload
|
10
10
|
#
|
11
11
|
# credentials = Aws::ProcessCredentials.new('/usr/bin/credential_proc').credentials
|
@@ -23,11 +23,11 @@ module Aws
|
|
23
23
|
# external process to be used as a credential provider.
|
24
24
|
#
|
25
25
|
# @param [String] process Invocation string for process
|
26
|
-
# credentials provider.
|
26
|
+
# credentials provider.
|
27
27
|
def initialize(process)
|
28
28
|
@process = process
|
29
29
|
@credentials = credentials_from_process(@process)
|
30
|
-
|
30
|
+
|
31
31
|
super
|
32
32
|
end
|
33
33
|
|
@@ -99,12 +99,10 @@ module Aws
|
|
99
99
|
def credentials(opts = {})
|
100
100
|
p = opts[:profile] || @profile_name
|
101
101
|
validate_profile_exists(p) if credentials_present?
|
102
|
-
if credentials = credentials_from_shared(p, opts)
|
102
|
+
if (credentials = credentials_from_shared(p, opts))
|
103
103
|
credentials
|
104
|
-
elsif credentials = credentials_from_config(p, opts)
|
104
|
+
elsif (credentials = credentials_from_config(p, opts))
|
105
105
|
credentials
|
106
|
-
else
|
107
|
-
nil
|
108
106
|
end
|
109
107
|
end
|
110
108
|
|
@@ -228,6 +226,7 @@ module Aws
|
|
228
226
|
end
|
229
227
|
|
230
228
|
private
|
229
|
+
|
231
230
|
def credentials_present?
|
232
231
|
(@parsed_credentials && !@parsed_credentials.empty?) ||
|
233
232
|
(@parsed_config && !@parsed_config.empty?)
|
@@ -293,17 +292,17 @@ module Aws
|
|
293
292
|
end
|
294
293
|
end
|
295
294
|
|
296
|
-
def resolve_source_profile(
|
297
|
-
if (creds = credentials(profile:
|
295
|
+
def resolve_source_profile(profile)
|
296
|
+
if (creds = credentials(profile: profile))
|
298
297
|
creds # static credentials
|
299
|
-
elsif (provider = assume_role_web_identity_credentials_from_config(
|
298
|
+
elsif (provider = assume_role_web_identity_credentials_from_config(profile))
|
299
|
+
if provider.credentials.set?
|
300
|
+
provider.credentials
|
301
|
+
end
|
302
|
+
elsif (provider = assume_role_process_credentials_from_config(profile))
|
300
303
|
if provider.credentials.set?
|
301
304
|
provider.credentials
|
302
|
-
else
|
303
|
-
nil
|
304
305
|
end
|
305
|
-
else
|
306
|
-
nil
|
307
306
|
end
|
308
307
|
end
|
309
308
|
|
@@ -324,6 +323,11 @@ module Aws
|
|
324
323
|
end
|
325
324
|
end
|
326
325
|
|
326
|
+
def assume_role_process_credentials_from_config(profile)
|
327
|
+
credential_process = credentials_process(profile)
|
328
|
+
ProcessCredentials.new(credential_process) if credential_process
|
329
|
+
end
|
330
|
+
|
327
331
|
def credentials_from_shared(profile, opts)
|
328
332
|
if @parsed_credentials && prof_config = @parsed_credentials[profile]
|
329
333
|
credentials_from_profile(prof_config)
|
data/lib/aws-sdk-sts.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
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.70.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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|