fog-aws 3.16.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: d49d93b5a31789230c04265427a1f030d971e30bc7e0fffa32b0396ee4beb899
4
- data.tar.gz: 70083f86f427d17a92f39044e7a5d6cb06c8591e2b9913e760a0fff839672b9f
3
+ metadata.gz: fdc36ea4342e1c08409d77ed825b69f533c288fc0f61508fc9e6a1ce8a3f95b6
4
+ data.tar.gz: 85d243645c46cfca8a9e13072cadd8d7e76722260b868f0dd2719c6383c9ebd8
5
5
  SHA512:
6
- metadata.gz: 957f2207642f1d2336233f0a5d892c0873274b3069c5a92835e0b8ba727ac93387520ee5ea1b676bb7872f061b640b5f9c95cd04e44cdd429b49c4b4a828b011
7
- data.tar.gz: b62d8eb328fcd947ad5221646912ff8c9473baeb12b3b8a638292ac025e35bed68acf5efc01800aeaae49f828980719ff755b29cada556a9dd0ebe398bfe8723
6
+ metadata.gz: 7612830e760fd0ba381ad962c9df500f4ff05032c8c8d2ebd611329e3147d57151d896dca2c1c6ba3106e3f923a744d3a94b306925fd9bc605b632ec28c63722
7
+ data.tar.gz: 380ba1a8c1a2edfbd75c35e05dd595a0656608f939a658131f3305b70e1d957897ee95dde16c9dfe20a2b569b25331a6ae569aea340d4dd12eea185881539e36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## [v3.16.0](https://github.com/fog/fog-aws/tree/v3.16.0) (2023-01-26)
4
12
 
5
13
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.15.0...v3.16.0)
@@ -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.16.0"
3
+ VERSION = "3.17.0"
4
4
  end
5
5
  end
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.16.0
4
+ version: 3.17.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: 2023-01-26 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