aws-sdk-core 3.197.0 → 3.197.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +5 -1
- data/lib/aws-sdk-core/process_credentials.rb +45 -27
- data/lib/aws-sdk-core/rest/request/endpoint.rb +3 -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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f61e79b590be2eabebf10df5c7874a56969ca427361200575a47d6d63fbaf5e
|
4
|
+
data.tar.gz: d50082ed7879c9267e78abb89ad9c973c7a99734562492347777041d3e4b28df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: affb188b8ecf1117d712f6c0a71c62338333e726c3d4c0ba180d3cc6baba3beabf2f30a8c33ba97d7baccb0196fa720714f04b32f39d98a48b38d1edfd66140a
|
7
|
+
data.tar.gz: 794ea09971b702916755a6ad06b954be23d3e30874ac41e16e3f9285784a0038e1192b334298ace9691b4631f835a2adf96312254b5d073dfc5ba85c66db62a8
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
3.197.2 (2024-06-20)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Issue - fix issue in Endpoint `attr` matcher when path is only an array index.
|
8
|
+
|
9
|
+
* Issue - Fix trailing slash in endpoint URLs for rest-json and rest-xml services.
|
10
|
+
|
11
|
+
3.197.1 (2024-06-19)
|
12
|
+
------------------
|
13
|
+
|
14
|
+
* Issue - Support an array of string arguments for `Aws::ProcessCredentials` to be executed by `system`.
|
15
|
+
|
4
16
|
3.197.0 (2024-06-05)
|
5
17
|
------------------
|
6
18
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.197.
|
1
|
+
3.197.2
|
@@ -28,7 +28,11 @@ module Aws
|
|
28
28
|
|
29
29
|
val = if (index = parts.first[BRACKET_REGEX, 1])
|
30
30
|
# remove brackets and index from part before indexing
|
31
|
-
|
31
|
+
if (base = parts.first.gsub(BRACKET_REGEX, '')) && !base.empty?
|
32
|
+
value[base][index.to_i]
|
33
|
+
else
|
34
|
+
value[index.to_i]
|
35
|
+
end
|
32
36
|
else
|
33
37
|
value[parts.first]
|
34
38
|
end
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
module Aws
|
4
4
|
# A credential provider that executes a given process and attempts
|
5
|
-
# to read its stdout to
|
5
|
+
# to read its stdout to receive a JSON payload containing the credentials.
|
6
6
|
#
|
7
|
-
# credentials = Aws::ProcessCredentials.new('/usr/bin/credential_proc')
|
7
|
+
# credentials = Aws::ProcessCredentials.new(['/usr/bin/credential_proc'])
|
8
|
+
# ec2 = Aws::EC2::Client.new(credentials: credentials)
|
9
|
+
#
|
10
|
+
# Arguments should be provided as strings in the array, for example:
|
11
|
+
#
|
12
|
+
# process = ['/usr/bin/credential_proc', 'arg1', 'arg2']
|
13
|
+
# credentials = Aws::ProcessCredentials.new(process)
|
8
14
|
# ec2 = Aws::EC2::Client.new(credentials: credentials)
|
9
15
|
#
|
10
16
|
# Automatically handles refreshing credentials if an Expiration time is
|
@@ -19,40 +25,49 @@ module Aws
|
|
19
25
|
# Creates a new ProcessCredentials object, which allows an
|
20
26
|
# external process to be used as a credential provider.
|
21
27
|
#
|
22
|
-
# @param [String] process
|
23
|
-
#
|
28
|
+
# @param [Array<String>, String] process An array of strings including
|
29
|
+
# the process name and its arguments to execute, or a single string to be
|
30
|
+
# executed by the shell (deprecated and insecure).
|
24
31
|
def initialize(process)
|
32
|
+
if process.is_a?(String)
|
33
|
+
warn('Passing a single string to Aws::ProcessCredentials.new '\
|
34
|
+
'is insecure, please use use an array of system arguments instead')
|
35
|
+
end
|
25
36
|
@process = process
|
26
|
-
@credentials = credentials_from_process
|
37
|
+
@credentials = credentials_from_process
|
27
38
|
@async_refresh = false
|
28
39
|
|
29
40
|
super
|
30
41
|
end
|
31
42
|
|
32
43
|
private
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
44
|
+
|
45
|
+
def credentials_from_process
|
46
|
+
r, w = IO.pipe
|
47
|
+
success = system(*@process, out: w)
|
48
|
+
w.close
|
49
|
+
raw_out = r.read
|
50
|
+
r.close
|
51
|
+
|
52
|
+
unless success
|
53
|
+
raise Errors::InvalidProcessCredentialsPayload.new(
|
54
|
+
'credential_process provider failure, the credential process had '\
|
55
|
+
'non zero exit status and failed to provide credentials'
|
56
|
+
)
|
39
57
|
end
|
40
58
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
raise Errors::InvalidProcessCredentialsPayload.new("Invalid JSON response")
|
46
|
-
end
|
47
|
-
payload_version = creds_json['Version']
|
48
|
-
if payload_version == 1
|
49
|
-
_parse_payload_format_v1(creds_json)
|
50
|
-
else
|
51
|
-
raise Errors::InvalidProcessCredentialsPayload.new("Invalid version #{payload_version} for credentials payload")
|
52
|
-
end
|
53
|
-
else
|
54
|
-
raise Errors::InvalidProcessCredentialsPayload.new('credential_process provider failure, the credential process had non zero exit status and failed to provide credentials')
|
59
|
+
begin
|
60
|
+
creds_json = Aws::Json.load(raw_out)
|
61
|
+
rescue Aws::Json::ParseError
|
62
|
+
raise Errors::InvalidProcessCredentialsPayload.new('Invalid JSON response')
|
55
63
|
end
|
64
|
+
|
65
|
+
payload_version = creds_json['Version']
|
66
|
+
return _parse_payload_format_v1(creds_json) if payload_version == 1
|
67
|
+
|
68
|
+
raise Errors::InvalidProcessCredentialsPayload.new(
|
69
|
+
"Invalid version #{payload_version} for credentials payload"
|
70
|
+
)
|
56
71
|
end
|
57
72
|
|
58
73
|
def _parse_payload_format_v1(creds_json)
|
@@ -64,11 +79,14 @@ module Aws
|
|
64
79
|
|
65
80
|
@expiration = creds_json['Expiration'] ? Time.iso8601(creds_json['Expiration']) : nil
|
66
81
|
return creds if creds.set?
|
67
|
-
|
82
|
+
|
83
|
+
raise Errors::InvalidProcessCredentialsPayload.new(
|
84
|
+
'Invalid payload for JSON credentials version 1'
|
85
|
+
)
|
68
86
|
end
|
69
87
|
|
70
88
|
def refresh
|
71
|
-
@credentials = credentials_from_process
|
89
|
+
@credentials = credentials_from_process
|
72
90
|
end
|
73
91
|
|
74
92
|
def near_expiration?(expiration_length)
|
@@ -30,7 +30,9 @@ module Aws
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def apply_path_params(uri, params)
|
33
|
-
path = uri.path.sub(%r{/$}, '')
|
33
|
+
path = uri.path.sub(%r{/$}, '')
|
34
|
+
# handle trailing slash
|
35
|
+
path += @path_pattern.split('?')[0] if path.empty? || @path_pattern != '/'
|
34
36
|
uri.path = path.gsub(/{.+?}/) do |placeholder|
|
35
37
|
param_value_for_placeholder(placeholder, params)
|
36
38
|
end
|
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
@@ -2377,7 +2377,7 @@ module Aws::STS
|
|
2377
2377
|
params: params,
|
2378
2378
|
config: config)
|
2379
2379
|
context[:gem_name] = 'aws-sdk-core'
|
2380
|
-
context[:gem_version] = '3.197.
|
2380
|
+
context[:gem_version] = '3.197.2'
|
2381
2381
|
Seahorse::Client::Request.new(handlers, context)
|
2382
2382
|
end
|
2383
2383
|
|
data/lib/aws-sdk-sts.rb
CHANGED
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.197.
|
4
|
+
version: 3.197.2
|
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-06-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|