fog-aws 3.6.3 → 3.6.4

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: 9dea4e752400d125510799d22baef7ef0070ec79ca82ca0a69b486c9c70ad101
4
- data.tar.gz: a114a750ceae8289eca40561c0f9ff287b22da510d1aad328e9691f5245b7a9d
3
+ metadata.gz: f289bf7f4001b92e347106bdfda3d867b870bec5669ac28b5cb9cec528807ab7
4
+ data.tar.gz: 5fd55a3abe362e701f30eac3b6b0c590f070635442a74ee00309d954369e4e81
5
5
  SHA512:
6
- metadata.gz: 83ea3407d7642e2dec7ac3263be136bb573f6e5b9d7f41a57ea3f223a8037eebd7a8f41aaf310d4523ae814af4c20ec1069a40629df92870a245033730cb98c2
7
- data.tar.gz: 48580b9cb5e5668ef9e7b8356b6efa58aa3391936222148a4cabbc5f45b08bf77334669877d57435b765cbf8a84218a79a01eac657cda73beda06b3382cafb33
6
+ metadata.gz: 9e2b3950738fdeeacdeb9ec7ebe7edb561a4906b8b0d909a80ee743a4d9604a77e1d00732e44c0786b180b82352accfc907e15aba7ac9b001d68c5e782667dba
7
+ data.tar.gz: 7cb59578e078f5210866b6db6b2a81f2148df51bb5e42533adbefff6050f7edcfa414ea05b448c677e5638044184fe4c01ff43cb7079be6ed72fe47727f0ca29
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## [v3.6.3](https://github.com/fog/fog-aws/tree/v3.6.3) (2020-04-22)
4
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.6.2...v3.6.3)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Add South Africa \(Cape Town\) Region [\#556](https://github.com/fog/fog-aws/pull/556) ([lvangool](https://github.com/lvangool))
9
+ - Adds Instance Type r5.16xlarge and r5.8xlarge [\#555](https://github.com/fog/fog-aws/pull/555) ([rupikakapoor](https://github.com/rupikakapoor))
10
+ - Update kinesis.rb [\#553](https://github.com/fog/fog-aws/pull/553) ([ioquatix](https://github.com/ioquatix))
11
+
3
12
  ## [v3.6.2](https://github.com/fog/fog-aws/tree/v3.6.2) (2020-03-24)
4
13
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.5.2...v3.6.2)
5
14
 
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0")
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
@@ -3,6 +3,7 @@ module Fog
3
3
  module CredentialFetcher
4
4
 
5
5
  INSTANCE_METADATA_HOST = "http://169.254.169.254"
6
+ INSTANCE_METADATA_TOKEN = "/latest/api/token"
6
7
  INSTANCE_METADATA_PATH = "/latest/meta-data/iam/security-credentials/"
7
8
  INSTANCE_METADATA_AZ = "/latest/meta-data/placement/availability-zone/"
8
9
 
@@ -25,13 +26,17 @@ module Fog
25
26
 
26
27
  if region.nil?
27
28
  connection = options[:metadata_connection] || Excon.new(INSTANCE_METADATA_HOST)
28
- region = connection.get(:path => INSTANCE_METADATA_AZ, :idempotent => true, :expects => 200).body[0..-2]
29
+ token = connection.put(:path => INSTANCE_METADATA_TOKEN, :idempotent => true, :expects => 200, :headers => { "X-aws-ec2-metadata-token-ttl-seconds" => "300" }).body
30
+ token_header = { "X-aws-ec2-metadata-token" => token }
31
+ region = connection.get(:path => INSTANCE_METADATA_AZ, :idempotent => true, :expects => 200, :headers => token_header).body[0..-2]
29
32
  end
30
33
  else
31
34
  connection = options[:connection] || Excon.new(INSTANCE_METADATA_HOST)
32
- role_name = connection.get(:path => INSTANCE_METADATA_PATH, :idempotent => true, :expects => 200).body
33
- role_data = connection.get(:path => INSTANCE_METADATA_PATH+role_name, :idempotent => true, :expects => 200).body
34
- region ||= connection.get(:path => INSTANCE_METADATA_AZ, :idempotent => true, :expects => 200).body[0..-2]
35
+ token = connection.put(:path => INSTANCE_METADATA_TOKEN, :idempotent => true, :expects => 200, :headers => { "X-aws-ec2-metadata-token-ttl-seconds" => "300" }).body
36
+ token_header = { "X-aws-ec2-metadata-token" => token }
37
+ role_name = connection.get(:path => INSTANCE_METADATA_PATH, :idempotent => true, :expects => 200, :headers => token_header).body
38
+ role_data = connection.get(:path => INSTANCE_METADATA_PATH+role_name, :idempotent => true, :expects => 200, :headers => token_header).body
39
+ region ||= connection.get(:path => INSTANCE_METADATA_AZ, :idempotent => true, :expects => 200, :headers => token_header).body[0..-2]
35
40
  end
36
41
 
37
42
  session = Fog::JSON.decode(role_data)
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.6.3"
3
+ VERSION = "3.6.4"
4
4
  end
5
5
  end
@@ -7,6 +7,8 @@ Shindo.tests('AWS | credentials', ['aws']) do
7
7
  Fog.unmock!
8
8
  begin
9
9
  Excon.defaults[:mock] = true
10
+ Excon.stub({ method: :put, path: '/latest/api/token' }, { status: 200, body: 'token1234' })
11
+
10
12
  Excon.stub({ method: :get, path: '/latest/meta-data/iam/security-credentials/' }, { status: 200, body: 'arole' })
11
13
  Excon.stub({ method: :get, path: '/latest/meta-data/placement/availability-zone/' }, { status: 200, body: 'us-west-1a' })
12
14
 
@@ -62,6 +64,7 @@ Shindo.tests('AWS | credentials', ['aws']) do
62
64
 
63
65
  default_credentials = Fog::AWS::Compute.fetch_credentials({})
64
66
  tests('#fetch_credentials when the url 404s') do
67
+ Excon.stub({ method: :put, path: '/latest/api/token' }, { status: 404, body: 'not found' })
65
68
  Excon.stub({ method: :get, path: '/latest/meta-data/iam/security-credentials/' }, { status: 404, body: 'not bound' })
66
69
  Excon.stub({ method: :get, path: '/latest/meta-data/placement/availability-zone/' }, { status: 400, body: 'not found' })
67
70
  returns(default_credentials) { Fog::AWS::Compute.fetch_credentials(use_iam_profile: true) }
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.6.3
4
+ version: 3.6.4
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: 2020-04-22 00:00:00.000000000 Z
12
+ date: 2020-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -143,9 +143,7 @@ description: |-
143
143
  email:
144
144
  - me@joshualane.com
145
145
  - geemus@gmail.com
146
- executables:
147
- - console
148
- - setup
146
+ executables: []
149
147
  extensions: []
150
148
  extra_rdoc_files: []
151
149
  files: