fog-aws 3.27.0 → 3.28.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: 273dd632772ac3f10f6edf04e4c7c92c3f568ccadd00bac17193e911c1924768
4
- data.tar.gz: 3d6136144890c0be995d55945b871db356933ba10a04021410820d6c3ee22207
3
+ metadata.gz: 0b81862bafa0db522d573c2349e8505c3d66c3aeaae51a0c8daa2e6ba6bd1db8
4
+ data.tar.gz: 4d4fac1aaffa73b888fca2c3b244a85c99d23fb288831947c3c8ffa3f0e7a23b
5
5
  SHA512:
6
- metadata.gz: 9ff9d98293302c8fce70cf5b669d12a8b46d02ec564838813a49514574ebd173a1e1e0ec29c82d22dfd31f5d6c6bbe5e1ddeb56ca189dc01f2137c7b5916af88
7
- data.tar.gz: 7b5322cd88344b5a2b13ca364300901d9796a244e9a798de693366fcde9123440366130404694f5f2337ad9cb2e9f8ac3150b3d59874a0a8486afb6703a96e4f
6
+ metadata.gz: c1cd8afc6b7455b6392c55fd2483eb9ac2b0314e3ecd8757e46c3b7462ec9a7f90ab8058310d2ebdfa966e685b983ce7fd93ae834bb86ff44b2e7bac7022473d
7
+ data.tar.gz: 640fb216fc8e201576b249aab161b1b6e125f1dc7f331f95c394b03f07b891c3e02ae5f75b344d3ecd4a19c0b912512904b48b6796b632b47d9e0cd271489e47
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.28.0](https://github.com/fog/fog-aws/tree/v3.28.0) (2024-10-14)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.27.0...v3.28.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - SES needs to support AWS SigV4 [\#726](https://github.com/fog/fog-aws/issues/726)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Update SES to use AWS SigV4 [\#727](https://github.com/fog/fog-aws/pull/727) ([ohookins](https://github.com/ohookins))
14
+
3
15
  ## [v3.27.0](https://github.com/fog/fog-aws/tree/v3.27.0) (2024-09-16)
4
16
 
5
17
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.26.0...v3.27.0)
@@ -16,23 +28,6 @@
16
28
 
17
29
  - Support AWS\_ENDPOINT\_URL\_STS environment variable [\#724](https://github.com/fog/fog-aws/pull/724) ([stanhu](https://github.com/stanhu))
18
30
 
19
- ## [v3.25.0](https://github.com/fog/fog-aws/tree/v3.25.0) (2024-08-29)
20
-
21
- [Full Changelog](https://github.com/fog/fog-aws/compare/v3.24.0...v3.25.0)
22
-
23
- **Closed issues:**
24
-
25
- - gsub exception from normalize\_headers with carrierwave [\#720](https://github.com/fog/fog-aws/issues/720)
26
- - Add AWS EKS Pod Identity support [\#718](https://github.com/fog/fog-aws/issues/718)
27
-
28
- **Merged pull requests:**
29
-
30
- - 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))
31
- - Added support for EKS Pod Identity. [\#721](https://github.com/fog/fog-aws/pull/721) ([y-sugawara-acs](https://github.com/y-sugawara-acs))
32
- - Disable S3 Signature v4 Streaming by default [\#719](https://github.com/fog/fog-aws/pull/719) ([stanhu](https://github.com/stanhu))
33
- - 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))
34
- - add base64 require and dependency [\#716](https://github.com/fog/fog-aws/pull/716) ([geemus](https://github.com/geemus))
35
-
36
31
 
37
32
 
38
33
  \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
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
- @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
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
- headers['x-amz-security-token'] = @aws_session_token if @aws_session_token
91
- #AWS3-HTTPS AWSAccessKeyId=<Your AWS Access Key ID>, Algorithm=HmacSHA256, Signature=<Signature>
92
- headers['X-Amzn-Authorization'] = 'AWS3-HTTPS '
93
- headers['X-Amzn-Authorization'] << 'AWSAccessKeyId=' << @aws_access_key_id
94
- headers['X-Amzn-Authorization'] << ', Algorithm=HmacSHA256'
95
- headers['X-Amzn-Authorization'] << ', Signature=' << Base64.encode64(@hmac.sign(headers['Date'])).chomp!
96
-
97
- body = ''
98
- for key in params.keys.sort
99
- unless (value = params[key]).nil?
100
- body << "#{key}=#{CGI.escape(value.to_s).gsub(/\+/, '%20')}&"
101
- end
102
- end
103
- body.chop! # remove trailing '&'
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
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.27.0"
3
+ VERSION = '3.28.0'.freeze
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.27.0
4
+ version: 3.28.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-09-16 00:00:00.000000000 Z
12
+ date: 2024-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler