fog-aws 3.22.0 → 3.31.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/CHANGELOG.md +13 -1305
- data/fog-aws.gemspec +7 -4
- data/lib/fog/aws/credential_fetcher.rb +15 -2
- data/lib/fog/aws/elasticache.rb +1 -1
- data/lib/fog/aws/kms.rb +5 -1
- data/lib/fog/aws/models/compute/dhcp_option.rb +1 -1
- data/lib/fog/aws/models/compute/flavors.rb +3 -3
- data/lib/fog/aws/models/compute/network_interfaces.rb +1 -1
- data/lib/fog/aws/models/elasticache/cluster.rb +1 -1
- data/lib/fog/aws/models/storage/file.rb +2 -2
- data/lib/fog/aws/models/storage/files.rb +3 -2
- data/lib/fog/aws/parsers/compute/describe_instance_status.rb +5 -3
- data/lib/fog/aws/parsers/iam/list_server_certificates.rb +1 -1
- data/lib/fog/aws/parsers/kms/describe_key.rb +2 -2
- data/lib/fog/aws/parsers/kms/get_public_key.rb +30 -0
- data/lib/fog/aws/parsers/kms/schedule_key_deletion.rb +28 -0
- data/lib/fog/aws/parsers/kms/sign.rb +24 -0
- data/lib/fog/aws/parsers/rds/db_cluster_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
- data/lib/fog/aws/parsers/rds/modify_db_subnet_group.rb +1 -1
- data/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/attach_load_balancer_target_groups.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/describe_scaling_activities.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/create_change_set.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/create_stack.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/get_template_summary.rb +1 -1
- data/lib/fog/aws/requests/cloud_formation/update_stack.rb +1 -1
- data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_egress.rb +1 -1
- data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/compute/create_network_interface.rb +1 -1
- data/lib/fog/aws/requests/compute/create_vpc.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_network_interfaces.rb +2 -2
- data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +1 -1
- data/lib/fog/aws/requests/compute/modify_volume.rb +1 -1
- data/lib/fog/aws/requests/compute/revoke_security_group_egress.rb +1 -1
- data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/compute/run_instances.rb +2 -2
- data/lib/fog/aws/requests/data_pipeline/deactivate_pipeline.rb +1 -1
- data/lib/fog/aws/requests/ecs/list_task_definitions.rb +1 -1
- data/lib/fog/aws/requests/efs/create_file_system.rb +1 -1
- data/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +1 -1
- data/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +2 -2
- data/lib/fog/aws/requests/elasticache/describe_engine_default_parameters.rb +1 -1
- data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +1 -1
- data/lib/fog/aws/requests/elbv2/describe_tags.rb +2 -2
- data/lib/fog/aws/requests/glacier/initiate_job.rb +1 -1
- data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +1 -1
- data/lib/fog/aws/requests/kinesis/list_streams.rb +1 -1
- data/lib/fog/aws/requests/kms/create_key.rb +74 -36
- data/lib/fog/aws/requests/kms/get_public_key.rb +35 -0
- data/lib/fog/aws/requests/kms/list_keys.rb +3 -4
- data/lib/fog/aws/requests/kms/schedule_key_deletion.rb +37 -0
- data/lib/fog/aws/requests/kms/sign.rb +62 -0
- data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +2 -2
- data/lib/fog/aws/requests/rds/create_db_cluster.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +1 -1
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +1 -1
- data/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +1 -1
- data/lib/fog/aws/requests/ses/send_raw_email.rb +1 -1
- data/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
- data/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
- data/lib/fog/aws/requests/storage/copy_object.rb +1 -1
- data/lib/fog/aws/requests/storage/get_bucket.rb +2 -2
- data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +2 -2
- data/lib/fog/aws/requests/storage/list_parts.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket.rb +0 -4
- data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_notification.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object.rb +1 -1
- data/lib/fog/aws/requests/storage/upload_part_copy.rb +1 -1
- data/lib/fog/aws/ses.rb +19 -16
- data/lib/fog/aws/signaturev4.rb +1 -1
- data/lib/fog/aws/storage.rb +21 -11
- data/lib/fog/aws/version.rb +1 -1
- data/lib/fog/aws.rb +5 -2
- metadata +29 -8
data/lib/fog/aws/ses.rb
CHANGED
@@ -48,18 +48,21 @@ module Fog
|
|
48
48
|
def initialize(options={})
|
49
49
|
|
50
50
|
@use_iam_profile = options[:use_iam_profile]
|
51
|
-
setup_credentials(options)
|
52
51
|
|
53
52
|
@instrumentor = options[:instrumentor]
|
54
53
|
@instrumentor_name = options[:instrumentor_name] || 'fog.aws.ses'
|
55
54
|
@connection_options = options[:connection_options] || {}
|
56
55
|
options[:region] ||= 'us-east-1'
|
56
|
+
@region = options[:region]
|
57
|
+
|
57
58
|
@host = options[:host] || "email.#{options[:region]}.amazonaws.com"
|
58
59
|
@path = options[:path] || '/'
|
59
60
|
@persistent = options[:persistent] || false
|
60
61
|
@port = options[:port] || 443
|
61
62
|
@scheme = options[:scheme] || 'https'
|
62
63
|
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
64
|
+
|
65
|
+
setup_credentials(options)
|
63
66
|
end
|
64
67
|
|
65
68
|
def reload
|
@@ -74,7 +77,7 @@ module Fog
|
|
74
77
|
@aws_session_token = options[:aws_session_token]
|
75
78
|
@aws_credentials_expire_at = options[:aws_credentials_expire_at]
|
76
79
|
|
77
|
-
@
|
80
|
+
@signer = Fog::AWS::SignatureV4.new(@aws_access_key_id, @aws_secret_access_key, @region, 'ses')
|
78
81
|
end
|
79
82
|
|
80
83
|
def request(params)
|
@@ -87,20 +90,20 @@ module Fog
|
|
87
90
|
'Content-Type' => 'application/x-www-form-urlencoded',
|
88
91
|
'Date' => Fog::Time.now.to_date_header,
|
89
92
|
}
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
93
|
+
|
94
|
+
body, headers = AWS.signed_params_v4(
|
95
|
+
params,
|
96
|
+
{ 'Content-Type' => 'application/x-www-form-urlencoded' },
|
97
|
+
{
|
98
|
+
:method => 'POST',
|
99
|
+
:aws_session_token => @aws_session_token,
|
100
|
+
:signer => @signer,
|
101
|
+
:host => @host,
|
102
|
+
:path => @path,
|
103
|
+
:port => @port,
|
104
|
+
:version => '2010-12-01'
|
105
|
+
}
|
106
|
+
)
|
104
107
|
|
105
108
|
if @instrumentor
|
106
109
|
@instrumentor.instrument("#{@instrumentor_name}.request", params) do
|
data/lib/fog/aws/signaturev4.rb
CHANGED
data/lib/fog/aws/storage.rb
CHANGED
@@ -7,6 +7,8 @@ module Fog
|
|
7
7
|
|
8
8
|
DEFAULT_REGION = 'us-east-1'
|
9
9
|
ACCELERATION_HOST = 's3-accelerate.amazonaws.com'
|
10
|
+
AWS_FIPS_REGIONS = %w(us-east-1 us-east-2 us-west-1 us-west-2 us-gov-east-1 us-gov-west-1 ca-central-1 ca-west-1).freeze
|
11
|
+
AWS_GOVCLOUD_REGIONS = %w(us-gov-east-1 us-gov-west-1).freeze
|
10
12
|
|
11
13
|
DEFAULT_SCHEME = 'https'
|
12
14
|
DEFAULT_SCHEME_PORT = {
|
@@ -16,10 +18,7 @@ module Fog
|
|
16
18
|
|
17
19
|
DEFAULT_CONNECTION_OPTIONS = {
|
18
20
|
retry_limit: 5,
|
19
|
-
retry_interval: 1
|
20
|
-
retry_errors: [
|
21
|
-
Excon::Error::Timeout, Excon::Error::Socket, Excon::Error::Server
|
22
|
-
]
|
21
|
+
retry_interval: 1
|
23
22
|
}
|
24
23
|
|
25
24
|
MIN_MULTIPART_CHUNK_SIZE = 5242880
|
@@ -261,13 +260,17 @@ module Fog
|
|
261
260
|
end
|
262
261
|
|
263
262
|
def region_to_host(region=nil)
|
264
|
-
|
265
|
-
|
266
|
-
's3.amazonaws.com'
|
267
|
-
when %r{\Acn-.*}
|
268
|
-
"s3.#{region}.amazonaws.com.cn"
|
263
|
+
if ENV['AWS_USE_FIPS_ENDPOINT'] == 'true' && AWS_FIPS_REGIONS.include?(region)
|
264
|
+
"s3-fips.#{region}.amazonaws.com" # https://aws.amazon.com/compliance/fips/
|
269
265
|
else
|
270
|
-
|
266
|
+
case region.to_s
|
267
|
+
when DEFAULT_REGION, ''
|
268
|
+
's3.amazonaws.com'
|
269
|
+
when %r{\Acn-.*}
|
270
|
+
"s3.#{region}.amazonaws.com.cn"
|
271
|
+
else
|
272
|
+
"s3.#{region}.amazonaws.com"
|
273
|
+
end
|
271
274
|
end
|
272
275
|
end
|
273
276
|
|
@@ -559,7 +562,7 @@ module Fog
|
|
559
562
|
@persistent = options.fetch(:persistent, false)
|
560
563
|
@acceleration = options.fetch(:acceleration, false)
|
561
564
|
@signature_version = options.fetch(:aws_signature_version, 4)
|
562
|
-
@enable_signature_v4_streaming = options.fetch(:enable_signature_v4_streaming,
|
565
|
+
@enable_signature_v4_streaming = options.fetch(:enable_signature_v4_streaming, false)
|
563
566
|
validate_signature_version!
|
564
567
|
@path_style = options[:path_style] || false
|
565
568
|
|
@@ -581,6 +584,13 @@ module Fog
|
|
581
584
|
@port = options[:port] || DEFAULT_SCHEME_PORT[@scheme]
|
582
585
|
end
|
583
586
|
|
587
|
+
# GovCloud doesn't support S3 Transfer Acceleration https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-s3.html
|
588
|
+
# S3 Transfer Acceleration doesn't support FIPS endpoints. When both fog_aws_accelerate=true and AWS_USE_FIPS_ENDPOINT=true, don't use Accelerate.
|
589
|
+
if @acceleration && (AWS_GOVCLOUD_REGIONS.include?(@region) || ENV['AWS_USE_FIPS_ENDPOINT'] == 'true')
|
590
|
+
Fog::Logger.warning("fog: S3 Transfer Acceleration is not available in GovCloud regions or when AWS_USE_FIPS_ENDPOINT=true. Disabling acceleration.")
|
591
|
+
@acceleration = false
|
592
|
+
end
|
593
|
+
|
584
594
|
@host = ACCELERATION_HOST if @acceleration
|
585
595
|
setup_credentials(options)
|
586
596
|
end
|
data/lib/fog/aws/version.rb
CHANGED
data/lib/fog/aws.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'base64'
|
1
2
|
require 'fog/core'
|
2
3
|
require 'fog/xml'
|
3
4
|
require 'fog/json'
|
@@ -225,13 +226,15 @@ module Fog
|
|
225
226
|
'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3',
|
226
227
|
'ap-south-1',
|
227
228
|
'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-3', 'ap-southeast-4',
|
228
|
-
'ca-central-1',
|
229
|
+
'ca-central-1',
|
230
|
+
'ca-west-1',
|
229
231
|
'cn-north-1',
|
230
232
|
'cn-northwest-1',
|
231
233
|
'eu-central-1',
|
232
234
|
'eu-north-1',
|
233
235
|
'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1', 'eu-south-2',
|
234
|
-
'
|
236
|
+
'il-central-1',
|
237
|
+
'me-south-1', 'me-central-1',
|
235
238
|
'us-east-1', 'us-east-2',
|
236
239
|
'us-west-1', 'us-west-2',
|
237
240
|
'sa-east-1',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.
|
62
|
+
version: 2.4.1
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.
|
69
|
+
version: 2.4.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: shindo
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,20 +81,34 @@ dependencies:
|
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0.3'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: base64
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 0.2.0
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 0.2.0
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: fog-core
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
102
|
- - "~>"
|
89
103
|
- !ruby/object:Gem::Version
|
90
|
-
version: '2.
|
104
|
+
version: '2.6'
|
91
105
|
type: :runtime
|
92
106
|
prerelease: false
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
109
|
- - "~>"
|
96
110
|
- !ruby/object:Gem::Version
|
97
|
-
version: '2.
|
111
|
+
version: '2.6'
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: fog-json
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -600,7 +614,10 @@ files:
|
|
600
614
|
- lib/fog/aws/parsers/iam/upload_server_certificate.rb
|
601
615
|
- lib/fog/aws/parsers/iam/upload_signing_certificate.rb
|
602
616
|
- lib/fog/aws/parsers/kms/describe_key.rb
|
617
|
+
- lib/fog/aws/parsers/kms/get_public_key.rb
|
603
618
|
- lib/fog/aws/parsers/kms/list_keys.rb
|
619
|
+
- lib/fog/aws/parsers/kms/schedule_key_deletion.rb
|
620
|
+
- lib/fog/aws/parsers/kms/sign.rb
|
604
621
|
- lib/fog/aws/parsers/lambda/base.rb
|
605
622
|
- lib/fog/aws/parsers/rds/authorize_db_security_group_ingress.rb
|
606
623
|
- lib/fog/aws/parsers/rds/base.rb
|
@@ -1222,7 +1239,10 @@ files:
|
|
1222
1239
|
- lib/fog/aws/requests/kinesis/split_shard.rb
|
1223
1240
|
- lib/fog/aws/requests/kms/create_key.rb
|
1224
1241
|
- lib/fog/aws/requests/kms/describe_key.rb
|
1242
|
+
- lib/fog/aws/requests/kms/get_public_key.rb
|
1225
1243
|
- lib/fog/aws/requests/kms/list_keys.rb
|
1244
|
+
- lib/fog/aws/requests/kms/schedule_key_deletion.rb
|
1245
|
+
- lib/fog/aws/requests/kms/sign.rb
|
1226
1246
|
- lib/fog/aws/requests/lambda/add_permission.rb
|
1227
1247
|
- lib/fog/aws/requests/lambda/create_event_source_mapping.rb
|
1228
1248
|
- lib/fog/aws/requests/lambda/create_function.rb
|
@@ -1442,7 +1462,8 @@ files:
|
|
1442
1462
|
homepage: https://github.com/fog/fog-aws
|
1443
1463
|
licenses:
|
1444
1464
|
- MIT
|
1445
|
-
metadata:
|
1465
|
+
metadata:
|
1466
|
+
changelog_uri: https://github.com/fog/fog-aws/blob/master/CHANGELOG.md
|
1446
1467
|
post_install_message:
|
1447
1468
|
rdoc_options: []
|
1448
1469
|
require_paths:
|
@@ -1458,7 +1479,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1458
1479
|
- !ruby/object:Gem::Version
|
1459
1480
|
version: '0'
|
1460
1481
|
requirements: []
|
1461
|
-
rubygems_version: 3.
|
1482
|
+
rubygems_version: 3.5.18
|
1462
1483
|
signing_key:
|
1463
1484
|
specification_version: 4
|
1464
1485
|
summary: Module for the 'fog' gem to support Amazon Web Services.
|