fog-aws 3.15.0 → 3.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4dabf89bd737334e85935e36486ca9ba38819c8fc7ce16bae50c5bc9cd73917
4
- data.tar.gz: d29ec0b26cd7917860e1d8a492b68fd24a3b6d64adbece07a90f6520361e9c29
3
+ metadata.gz: fdc36ea4342e1c08409d77ed825b69f533c288fc0f61508fc9e6a1ce8a3f95b6
4
+ data.tar.gz: 85d243645c46cfca8a9e13072cadd8d7e76722260b868f0dd2719c6383c9ebd8
5
5
  SHA512:
6
- metadata.gz: 4d42a8e95ae968471cc18dfd49d9444957ec970b0362a5a8f7736db04dd0fc5f0da17dd1e946585caff3de8d8d93da1784ed42aa660df72cb479553b04e9bbc9
7
- data.tar.gz: 9fd1fe20b8aa767fc6cb925293c042c71af77b554176232c9a24a9fe66323671739174453e3bb687465b33c18493f3c5590adca1a82ee5f3ec6405db91260840
6
+ metadata.gz: 7612830e760fd0ba381ad962c9df500f4ff05032c8c8d2ebd611329e3147d57151d896dca2c1c6ba3106e3f923a744d3a94b306925fd9bc605b632ec28c63722
7
+ data.tar.gz: 380ba1a8c1a2edfbd75c35e05dd595a0656608f939a658131f3305b70e1d957897ee95dde16c9dfe20a2b569b25331a6ae569aea340d4dd12eea185881539e36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.17.0](https://github.com/fog/fog-aws/tree/v3.17.0) (2023-02-09)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.16.0...v3.17.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Support disabling of Content-MD5 for FIPS [\#668](https://github.com/fog/fog-aws/pull/668#issuecomment-1424301523) ([stanhu](https://github.com/stanhu))
10
+
11
+ ## [v3.16.0](https://github.com/fog/fog-aws/tree/v3.16.0) (2023-01-26)
12
+
13
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.15.0...v3.16.0)
14
+
15
+ **Closed issues:**
16
+
17
+ - README lists incorrect usage of IAM auth [\#663](https://github.com/fog/fog-aws/issues/663)
18
+ - How can i config to use s3 in localstack [\#657](https://github.com/fog/fog-aws/issues/657)
19
+ - Fog::Storage::AWS::Files#each always iterates over entire collection [\#232](https://github.com/fog/fog-aws/issues/232)
20
+ - superclass mismatch for class AWS [\#655](https://github.com/fog/fog-aws/issues/655)
21
+ - Lambda IAM Role Not Working [\#650](https://github.com/fog/fog-aws/issues/650)
22
+
23
+ **Merged pull requests:**
24
+
25
+ - adding missing region ap-southeast-4 [\#665](https://github.com/fog/fog-aws/pull/665) ([emptyhammond](https://github.com/emptyhammond))
26
+ o
27
+ - adding missing region eu-south-2 [\#662](https://github.com/fog/fog-aws/pull/662) ([ivangool](https://github.com/ivangool))
28
+ - Bump actions/dependency-review-action from 2 to 3 [\#659](https://github.com/fog/fog-aws/pull/659) ([dependabot[bot]](https://github.com/apps/dependabot))
29
+ - Update aws.rb [\#658](https://github.com/fog/fog-aws/pull/658) ([ivangool](https://github.com/ivangool))
30
+ - Bump actions/stale from 5 to 6 [\#656](https://github.com/fog/fog-aws/pull/656) ([dependabot[bot]](https://github.com/apps/dependabot))
31
+
3
32
  ## [v3.15.0](https://github.com/fog/fog-aws/tree/v3.15.0) (2022-09-12)
4
33
 
5
34
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.14.0...v3.15.0)
data/README.md CHANGED
@@ -132,7 +132,7 @@ that will not last as long as its requested expiration time if
132
132
  the remainder of the authentication token lifetime was shorter.
133
133
 
134
134
  ```ruby
135
- s3 = Fog::Storage.new(provider: 'AWS', use_iam_auth: true)
135
+ s3 = Fog::Storage.new(provider: 'AWS', use_iam_profile: true)
136
136
  directory = s3.directories.get('gaudi-portal-dev', prefix: 'user/1/')
137
137
 
138
138
  directory.files.new(key: 'user/1/Gemfile').url(Time.now + 60)
@@ -154,7 +154,7 @@ is lower than 60 seconds:
154
154
  ```ruby
155
155
  s3 = Fog::Storage.new(
156
156
  provider: 'AWS',
157
- use_iam_auth: true,
157
+ use_iam_profile: true,
158
158
  aws_credentials_refresh_threshold_seconds: 60
159
159
  )
160
160
  directory = s3.directories.get('gaudi-portal-dev', prefix: 'user/1/')
@@ -388,10 +388,10 @@ module Fog
388
388
  end
389
389
 
390
390
  def part_headers(chunk, options)
391
- md5 = Base64.encode64(OpenSSL::Digest::MD5.digest(chunk)).strip
391
+ base_headers = part_checksum_headers(chunk)
392
392
  encryption_keys = encryption_customer_key_headers.keys
393
393
  encryption_headers = options.select { |key| encryption_keys.include?(key) }
394
- { 'Content-MD5' => md5 }.merge(encryption_headers)
394
+ base_headers.merge(encryption_headers)
395
395
  end
396
396
 
397
397
  def encryption_customer_key_headers
@@ -402,6 +402,14 @@ module Fog
402
402
  }
403
403
  end
404
404
 
405
+ def part_checksum_headers(chunk)
406
+ if service.disable_content_md5_validation
407
+ {}
408
+ else
409
+ { 'Content-MD5' => Base64.encode64(OpenSSL::Digest::MD5.digest(chunk)).strip }
410
+ end
411
+ end
412
+
405
413
  def create_part_list(upload_part_options)
406
414
  current_pos = 0
407
415
  count = 0
@@ -46,7 +46,7 @@ module Fog
46
46
  ]
47
47
 
48
48
  requires :aws_access_key_id, :aws_secret_access_key
49
- recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :enable_signature_v4_streaming, :virtual_host, :cname, :max_put_chunk_size, :max_copy_chunk_size, :aws_credentials_refresh_threshold_seconds
49
+ recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :enable_signature_v4_streaming, :virtual_host, :cname, :max_put_chunk_size, :max_copy_chunk_size, :aws_credentials_refresh_threshold_seconds, :disable_content_md5_validation
50
50
 
51
51
  secrets :aws_secret_access_key, :hmac
52
52
 
@@ -119,6 +119,7 @@ module Fog
119
119
 
120
120
  module Utils
121
121
  attr_accessor :region
122
+ attr_accessor :disable_content_md5_validation
122
123
 
123
124
  # Amazon S3 limits max chunk size that can be uploaded/copied in a single request to 5GB.
124
125
  # Other S3-compatible storages (like, Ceph) do not have such limit.
@@ -486,6 +487,8 @@ module Fog
486
487
  init_max_put_chunk_size!(options)
487
488
  init_max_copy_chunk_size!(options)
488
489
 
490
+ @disable_content_md5_validation = options[:disable_content_md5_validation] || false
491
+
489
492
  @signature_version = options.fetch(:aws_signature_version, 4)
490
493
  validate_signature_version!
491
494
  setup_credentials(options)
@@ -554,6 +557,8 @@ module Fog
554
557
  init_max_put_chunk_size!(options)
555
558
  init_max_copy_chunk_size!(options)
556
559
 
560
+ @disable_content_md5_validation = options[:disable_content_md5_validation] || false
561
+
557
562
  @region = options[:region] || DEFAULT_REGION
558
563
 
559
564
  if @endpoint = options[:endpoint]
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.15.0"
3
+ VERSION = "3.17.0"
4
4
  end
5
5
  end
data/lib/fog/aws.rb CHANGED
@@ -224,13 +224,13 @@ module Fog
224
224
  'ap-east-1',
225
225
  'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3',
226
226
  'ap-south-1',
227
- 'ap-southeast-1', 'ap-southeast-2',
227
+ 'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-3', 'ap-southeast-4',
228
228
  'ca-central-1',
229
229
  'cn-north-1',
230
230
  'cn-northwest-1',
231
231
  'eu-central-1',
232
232
  'eu-north-1',
233
- 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1',
233
+ 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-south-1', 'eu-south-2',
234
234
  'me-south-1',
235
235
  'us-east-1', 'us-east-2',
236
236
  'us-west-1', 'us-west-2',
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.15.0
4
+ version: 3.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
8
8
  - Wesley Beary
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-09-12 00:00:00.000000000 Z
12
+ date: 2023-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -1443,7 +1443,7 @@ homepage: https://github.com/fog/fog-aws
1443
1443
  licenses:
1444
1444
  - MIT
1445
1445
  metadata: {}
1446
- post_install_message:
1446
+ post_install_message:
1447
1447
  rdoc_options: []
1448
1448
  require_paths:
1449
1449
  - lib
@@ -1458,8 +1458,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1458
1458
  - !ruby/object:Gem::Version
1459
1459
  version: '0'
1460
1460
  requirements: []
1461
- rubygems_version: 3.3.5
1462
- signing_key:
1461
+ rubygems_version: 3.4.1
1462
+ signing_key:
1463
1463
  specification_version: 4
1464
1464
  summary: Module for the 'fog' gem to support Amazon Web Services.
1465
1465
  test_files: []