fog-aws 3.24.0 → 3.25.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: e0e211d55e044aab96a65857f1233e96d51f46a686f1d09b04320018ba06a081
4
- data.tar.gz: ba929fd4951de9ccd6250f18a154f5c9c8a9a684fd400a6c6f45973847fec392
3
+ metadata.gz: 3cb08aaff9345f1d92ac8657cfb9e988a40ea6df9b4d2798b58451998aab7228
4
+ data.tar.gz: fa2f8726d7c12f65f236078ee76bb9547f1716ee971184b47411a0e8ef9fae06
5
5
  SHA512:
6
- metadata.gz: bc4d7f54b99cec9fddf93e4ba9bcf7ae5a9aa38f2f056a4a6e13bbb5e505da6683aca5f20645982c10a365d34ea708a83ed6513988909e8b694d88d06fd2360d
7
- data.tar.gz: 91d4d78e6de77e551c43dad3a121802d5d3e854b0b13bda3d72d6a38a196009a6c55f5e813125b99afc0700b76f12f4b617d11b9dd156e91a34dfa1f1476e315
6
+ metadata.gz: 805fcafc8ba99443196293eb75bf730a8463f4fe1e43e6f4db8a4143ee7c4dc8fc53f1484e16e9492714b16be25a7e10ab8142c0ffdf78154e61219a836839e9
7
+ data.tar.gz: 6dd4145aa498bf06f0003e71c3bfd537d64776665ba5b1a4375340971b3a82aee14ed6d81509a028722fed02f4bbae3cacbe05ef9b523c4c5716d8d8883ef71e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.25.0](https://github.com/fog/fog-aws/tree/v3.25.0) (2024-08-29)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.24.0...v3.25.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - gsub exception from normalize\_headers with carrierwave [\#720](https://github.com/fog/fog-aws/issues/720)
10
+ - Add AWS EKS Pod Identity support [\#718](https://github.com/fog/fog-aws/issues/718)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - only try to gsub etag on files if there is one closes \#720 [\#722](https://github.com/fog/fog-aws/pull/722) ([geemus](https://github.com/geemus))
15
+ - Added support for EKS Pod Identity. [\#721](https://github.com/fog/fog-aws/pull/721) ([y-sugawara-acs](https://github.com/y-sugawara-acs))
16
+ - Disable S3 Signature v4 Streaming by default [\#719](https://github.com/fog/fog-aws/pull/719) ([stanhu](https://github.com/stanhu))
17
+ - Drop warning if region is not us-east-1 in mock [\#717](https://github.com/fog/fog-aws/pull/717) ([stanhu](https://github.com/stanhu))
18
+ - add base64 require and dependency [\#716](https://github.com/fog/fog-aws/pull/716) ([geemus](https://github.com/geemus))
19
+
3
20
  ## [v3.24.0](https://github.com/fog/fog-aws/tree/v3.24.0) (2024-07-08)
4
21
 
5
22
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.23.0...v3.24.0)
@@ -27,47 +44,6 @@
27
44
  - Fix frozen string literal issue for ruby 3.4.0 [\#709](https://github.com/fog/fog-aws/pull/709) ([chaadow](https://github.com/chaadow))
28
45
  - Fix typos [\#707](https://github.com/fog/fog-aws/pull/707) ([kianmeng](https://github.com/kianmeng))
29
46
 
30
- ## [v3.22.0](https://github.com/fog/fog-aws/tree/v3.22.0) (2024-03-18)
31
-
32
- [Full Changelog](https://github.com/fog/fog-aws/compare/v3.21.1...v3.22.0)
33
-
34
- **Closed issues:**
35
-
36
- - S3 copy\_object won't be retried. [\#704](https://github.com/fog/fog-aws/issues/704)
37
-
38
- **Merged pull requests:**
39
-
40
- - mark copy\_object as idempotent [\#706](https://github.com/fog/fog-aws/pull/706) ([geemus](https://github.com/geemus))
41
-
42
- ## [v3.21.1](https://github.com/fog/fog-aws/tree/v3.21.1) (2024-03-12)
43
-
44
- [Full Changelog](https://github.com/fog/fog-aws/compare/v3.21.0...v3.21.1)
45
-
46
- **Closed issues:**
47
-
48
- - Missing AWS Region - ca-west-1 \(Calgary\) [\#701](https://github.com/fog/fog-aws/issues/701)
49
-
50
- **Merged pull requests:**
51
-
52
- - Add ca-west-1 region [\#703](https://github.com/fog/fog-aws/pull/703) ([jgrammen-agilitypr](https://github.com/jgrammen-agilitypr))
53
- - Bump actions/dependency-review-action from 3 to 4 [\#699](https://github.com/fog/fog-aws/pull/699) ([dependabot[bot]](https://github.com/apps/dependabot))
54
- - Add Ruby 3.3 to CI matrix [\#698](https://github.com/fog/fog-aws/pull/698) ([m-nakamura145](https://github.com/m-nakamura145))
55
- - Bump github/codeql-action from 2 to 3 [\#697](https://github.com/fog/fog-aws/pull/697) ([dependabot[bot]](https://github.com/apps/dependabot))
56
- - Bump actions/stale from 8 to 9 [\#696](https://github.com/fog/fog-aws/pull/696) ([dependabot[bot]](https://github.com/apps/dependabot))
57
- - Fix broken format in CHANGELOG [\#692](https://github.com/fog/fog-aws/pull/692) ([y-yagi](https://github.com/y-yagi))
58
-
59
- ## [v3.21.0](https://github.com/fog/fog-aws/tree/v3.21.0) (2023-09-29)
60
-
61
- [Full Changelog](https://github.com/fog/fog-aws/compare/v3.20.0...v3.21.0)
62
-
63
- **Closed issues:**
64
-
65
- - Fog::AWS::Storage default retry behaviour guarantees 6s delay for 4xx class responses [\#690](https://github.com/fog/fog-aws/issues/690)
66
-
67
- **Merged pull requests:**
68
-
69
- - Fog::AWS::Storage don't retry client errors [\#691](https://github.com/fog/fog-aws/pull/691) ([rahim](https://github.com/rahim))
70
-
71
47
 
72
48
 
73
49
  \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/fog-aws.gemspec CHANGED
@@ -28,9 +28,10 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'rubyzip', '~> 2.3.0'
29
29
  spec.add_development_dependency 'shindo', '~> 0.3'
30
30
 
31
- spec.add_dependency 'fog-core', '~> 2.1'
32
- spec.add_dependency 'fog-json', '~> 1.1'
33
- spec.add_dependency 'fog-xml', '~> 0.1'
31
+ spec.add_dependency 'base64', '~> 0.2.0'
32
+ spec.add_dependency 'fog-core', '~> 2.1'
33
+ spec.add_dependency 'fog-json', '~> 1.1'
34
+ spec.add_dependency 'fog-xml', '~> 0.1'
34
35
 
35
36
  spec.metadata['changelog_uri'] = spec.homepage + '/blob/master/CHANGELOG.md'
36
37
  end
@@ -29,6 +29,17 @@ module Fog
29
29
  role_data = connection.get(:path => credential_path, :idempotent => true, :expects => 200).body
30
30
  session = Fog::JSON.decode(role_data)
31
31
 
32
+ if region.nil?
33
+ connection = options[:metadata_connection] || Excon.new(INSTANCE_METADATA_HOST)
34
+ token_header = fetch_credentials_token_header(connection, options[:disable_imds_v2])
35
+ region = connection.get(:path => INSTANCE_METADATA_AZ, :idempotent => true, :expects => 200, :headers => token_header).body[0..-2]
36
+ end
37
+ elsif ENV["AWS_CONTAINER_CREDENTIALS_FULL_URI"]
38
+ connection = options[:connection] || Excon.new(ENV['AWS_CONTAINER_CREDENTIALS_FULL_URI'])
39
+ container_authorization_token = File.read(options[:aws_container_authorization_token_file] || ENV['AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE'])
40
+ role_data = connection.get(:idempotent => true, :expects => 200, :headers => {'Authorization' => container_authorization_token}).body
41
+ session = Fog::JSON.decode(role_data)
42
+
32
43
  if region.nil?
33
44
  connection = options[:metadata_connection] || Excon.new(INSTANCE_METADATA_HOST)
34
45
  token_header = fetch_credentials_token_header(connection, options[:disable_imds_v2])
@@ -125,8 +125,9 @@ module Fog
125
125
  def normalize_headers(data)
126
126
  data.headers['Last-Modified'] = Time.parse(fetch_and_delete_header(data, 'Last-Modified'))
127
127
 
128
- etag = fetch_and_delete_header(data, 'ETag').gsub('"','')
129
- data.headers['ETag'] = etag
128
+ if (etag = fetch_and_delete_header(data, 'ETag'))
129
+ data.headers['ETag'] = etag.gsub('"', '')
130
+ end
130
131
 
131
132
  DASHED_HEADERS.each do |header|
132
133
  value = fetch_and_delete_header(data, header)
@@ -61,10 +61,6 @@ DATA
61
61
  end
62
62
  if !self.data[:buckets][bucket_name]
63
63
  self.data[:buckets][bucket_name] = bucket
64
- elsif self.region != 'us-east-1'
65
- response.status = 409
66
- Fog::Logger.warning "Your region '#{self.region}' does not match the default region 'us-east-1'"
67
- raise(Excon::Errors.status_error({:expects => 201}, response))
68
64
  end
69
65
  response
70
66
  end
@@ -559,7 +559,7 @@ module Fog
559
559
  @persistent = options.fetch(:persistent, false)
560
560
  @acceleration = options.fetch(:acceleration, false)
561
561
  @signature_version = options.fetch(:aws_signature_version, 4)
562
- @enable_signature_v4_streaming = options.fetch(:enable_signature_v4_streaming, true)
562
+ @enable_signature_v4_streaming = options.fetch(:enable_signature_v4_streaming, false)
563
563
  validate_signature_version!
564
564
  @path_style = options[:path_style] || false
565
565
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.24.0"
3
+ VERSION = "3.25.0"
4
4
  end
5
5
  end
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'
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.24.0
4
+ version: 3.25.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: 2024-07-08 00:00:00.000000000 Z
12
+ date: 2024-08-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -81,6 +81,20 @@ 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