vagrant-gsauth 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 53c5257aa38fa117c1ceefa223db18ba419dece1
4
- data.tar.gz: dfffba687e143e9326e2c5349101ce9e7dfdeddc
3
+ metadata.gz: fa08ccdfe0825b1c88e01ba8cfefd747b8f85d4a
4
+ data.tar.gz: 860077c3ed31bf46484536175ef45cbe0b271e81
5
5
  SHA512:
6
- metadata.gz: 0c918eafc59052be0732051acfa8d3387f06249ce4fddd8914b58e0bb673fc094016ca3403e9eff87f57afcb25e911c94f2e6155b97edf643f65e60aa543ff79
7
- data.tar.gz: accff56a518fb2db6a68fde1ea27c3a978ce7381aeeab5198e7a93db6c9144319b2afaf8ee531f32fd54cad7b1b7058167fe5bf118f7de4bd8130cb6e2a09ed8
6
+ metadata.gz: 3ba803c2ac2006365c38da434e3990d592389bc2a670b2bc57468d90f8d2e391c7b8465efd8cc378a3d1056e9f3f1083024c0221a81b8f6c8017b68c1cf54f3a
7
+ data.tar.gz: 7daf4182c6218efca310dcbb57e8c0787d079e0eea89853b9c87052cfe56e8568a6b28de390e6affd14ee1ef0622114a612974bdb30044f2865605fbf54c688a
data/.gitignore CHANGED
@@ -4,3 +4,6 @@ pkg
4
4
  *.gem
5
5
  .env
6
6
  Gemfile.lock
7
+
8
+ *.iml
9
+ .idea/
@@ -1,135 +1,5 @@
1
- ## 1.3.0
2
-
3
- **18 January 2016**
4
-
5
- Enhancements:
6
-
7
- * upgrade to AWS SDK v2.2.10
8
-
9
- Fixes:
10
-
11
- * allow box update checks when offline ([#26])
12
- * support the Vagrant 1.8.x series ([#27])
13
-
14
- ## 1.2.0
15
-
16
- **20 August 2015**
17
-
18
- Enhancements:
19
-
20
- * output the discovered AWS access key and its source (environment variable or
21
- profile) when downloading an authenticated S3 box ([#21])
22
-
23
- Thanks, [@Daemoen][Daemoen]!
24
-
25
- ## 1.1.1
26
-
27
- **6 August 2015**
28
-
29
- Enhancements:
30
-
31
- * bump dependencies to latest patch versions and dev dependencies to latest
32
- versions
33
-
34
- ## 1.1.0
35
-
36
- **1 June 2015**
37
-
38
- Enhancements:
39
-
40
- * upgrade to AWS SDK v2 ([#15])
41
- * recommend the use of the AWS SDK's centralized credential file ([#14])
42
-
43
- Fixes:
44
-
45
- * allow up to ten minutes of time skew ([#16])
46
- * try an unauthenticated download before demanding AWS credentials ([#10])
47
-
48
- Thanks, [@kimpepper][kimpepper] and [@companykitchen-dev][companykitchen-dev]!
49
-
50
- ## 1.0.3
51
-
52
- **10 March 2015**
53
-
54
- Fixes:
55
-
56
- * fix namespace collisions with [vagrant-aws][vagrant-aws] ([#11])
57
-
58
- Thanks, [@andres-rojas][andres-rojas]!
59
-
60
-
61
- ## 1.0.2
62
-
63
- **25 December 2014**
64
-
65
- Enhancements:
66
-
67
- * provide better error messages when S3 API requests are denied ([#9])
68
- * include IAM policy recommendations in README
69
-
70
- ## 1.0.1
71
-
72
- **21 December 2014**
73
-
74
- Enhancements:
75
-
76
- * support bucket-in-host style S3 URLs to simplify usage instructions
77
-
78
- Fixes:
79
-
80
- * internal cleanup
81
- * improved detection of incompatible Vagrant versions
82
-
83
1
  ## 1.0.0
84
2
 
85
- **16 December 2014**
86
-
87
- Enhancements:
88
-
89
- * passes a complete acceptance test suite
90
- * detects full and shorthand S3 URLs at all download stages
91
-
92
- Fixes:
93
-
94
- * automatically determines region for shorthand S3 URLs ([#1], [#7])
95
-
96
- ## 0.1.0
97
-
98
- **13 June 2014**
99
-
100
- Enhancements:
101
-
102
- * support buckets hosted in any S3 region ([#1])
103
-
104
- Fixes:
105
-
106
- * properly authenticate requests for simple (non-metadata) S3 boxes ([#1])
107
-
108
- ## 0.0.2
109
-
110
- **6 June 2014**
111
-
112
- Enhancements:
113
-
114
- * formally license under MIT
115
-
116
- ## 0.0.1
117
-
118
- * initial release
119
-
120
- [#1]: https://github.com/WhoopInc/vagrant-s3auth/issues/1
121
- [#7]: https://github.com/WhoopInc/vagrant-s3auth/issues/7
122
- [#9]: https://github.com/WhoopInc/vagrant-s3auth/issues/9
123
- [#10]: https://github.com/WhoopInc/vagrant-s3auth/issues/10
124
- [#11]: https://github.com/WhoopInc/vagrant-s3auth/pull/11
125
- [#14]: https://github.com/WhoopInc/vagrant-s3auth/issues/14
126
- [#15]: https://github.com/WhoopInc/vagrant-s3auth/issues/15
127
- [#16]: https://github.com/WhoopInc/vagrant-s3auth/issues/16
128
- [#21]: https://github.com/WhoopInc/vagrant-s3auth/issues/21
129
-
130
- [Daemoen]: https://github.com/Daemoen
131
- [andres-rojas]: https://github.com/andres-rojas
132
- [companykitchen-dev]: https://github.com/companykitchen-dev
133
- [kimpepper]: https://github.com/kimpepper
3
+ **December 1 2016**
134
4
 
135
- [vagrant-aws]: https://github.com/mitchellh/vagrant-aws
5
+ * initial fork and release
data/Gemfile CHANGED
@@ -9,5 +9,4 @@ end
9
9
  group :plugins do
10
10
  gemspec
11
11
  gem 'google-api-client', require: 'google/apis/storage_v1'
12
- gem 'vagrant-aws', git: 'git://github.com/mitchellh/vagrant-aws.git', ref: 'master'
13
12
  end
@@ -4,7 +4,7 @@ module VagrantPlugins
4
4
  module GSAuth
5
5
  module Errors
6
6
  class VagrantGSAuthError < Vagrant::Errors::VagrantError
7
- error_namespace('vagrant_s3auth.errors')
7
+ error_namespace('vagrant_gsauth.errors')
8
8
  end
9
9
 
10
10
  class UnknownBucketError < VagrantGSAuthError
@@ -27,8 +27,9 @@ module Vagrant
27
27
  auth_headers = GSAuth::Util.authorization_header
28
28
 
29
29
  options.insert(0, *auth_headers.map { |k, v| ['-H', "#{k}: #{v}"] }.flatten)
30
+ @logger.debug("gsauth: curl options: #{options}")
30
31
 
31
- execute_curl_without_gsauth(options, subprocess_options, &data_proc)
32
+ _execute_curl(options, subprocess_options, &data_proc)
32
33
  rescue Errors::DownloaderError => e
33
34
  if e.message =~ /403 Forbidden/
34
35
  e.message << "\n\n"
@@ -38,22 +39,24 @@ module Vagrant
38
39
  raise
39
40
  rescue Google::Apis::Error => e
40
41
  raise Errors::DownloaderError, message: e
41
- rescue ::Seahorse::Client::NetworkingError => e
42
- # Vagrant ignores download errors during e.g. box update checks
43
- # because an internet connection isn't necessary if the box is
44
- # already downloaded. Vagrant isn't expecting AWS's
45
- # Seahorse::Client::NetworkingError, so we cast it to the
46
- # DownloaderError Vagrant expects.
47
- raise Errors::DownloaderError, message: e
48
42
  end
49
43
 
50
44
  def execute_curl_with_gsauth(options, subprocess_options, &data_proc)
45
+ url = options.last
46
+ if url.include?('storage.cloud.google')
47
+ # If the URL was expanded attempt a gsauth download first.
48
+ # Needed for grabbing metadata
49
+ gsauth_download(options, subprocess_options, &data_proc)
50
+ end
51
+
52
+ _execute_curl(options, subprocess_options, &data_proc)
53
+ rescue Errors::DownloaderError => e
51
54
  @ui.clear_line if @ui
52
55
 
53
56
  gsauth_download(options, subprocess_options, &data_proc) || (raise e)
54
57
  end
55
58
 
56
- alias execute_curl_without_gsauth execute_curl
59
+ alias _execute_curl execute_curl
57
60
  alias execute_curl execute_curl_with_gsauth
58
61
  end
59
62
  end
@@ -27,7 +27,7 @@ module VagrantPlugins
27
27
 
28
28
  if url.scheme == 'gs'
29
29
  bucket = url.host
30
- key = url.path.split('/').last
30
+ key = url.path
31
31
  elsif match = MEDIA_URL_MATCHER.match(url.path)
32
32
  bucket = match['bucket']
33
33
  key = match['key']
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GSAuth
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
@@ -1,28 +1,6 @@
1
1
  en:
2
- vagrant_s3auth:
3
- downloader:
4
- env_credential_provider: |-
5
- Signing S3 request with key '%{access_key}' loaded from $%{env_var}
6
-
7
- profile_credential_provider: |-
8
- Signing S3 request with key '%{access_key}' loaded from profile '%{profile}'
9
-
2
+ vagrant_gsauth:
10
3
  errors:
11
- missing_credentials: |-
12
- Unable to find AWS credentials.
13
-
14
- Ensure the following variables are set in your environment, or set
15
- them at the top of your Vagrantfile:
16
-
17
- AWS_ACCESS_KEY_ID
18
- AWS_SECRET_ACCESS_KEY
19
-
20
- Alternatively, you can create a credential profile and set the
21
-
22
- AWS_PROFILE
23
-
24
- environment variable. Consult the documentation for details.
25
-
26
4
  malformed_shorthand_url: |-
27
5
  Malformed shorthand GS box URL:
28
6
 
@@ -30,27 +8,5 @@ en:
30
8
 
31
9
  Check your `box_url` setting.
32
10
 
33
- s3_api_error: |-
34
- Unable to communicate with Amazon S3 to download box. The S3 API reports:
35
-
36
- %{error}
37
-
38
- bucket_location_access_denied_error: |-
39
- Request for box's Amazon S3 region was denied.
40
-
41
- This usually indicates that your user account is misconfigured. Ensure
42
- your IAM policy allows the "s3:GetBucketLocation" action for your bucket:
43
-
44
- arn:aws:s3:::%{bucket}
45
-
46
- box_download_forbidden: |-
47
- This box is hosted on Amazon S3. A 403 Forbidden error usually indicates
48
- that your user account is misconfigured. Ensure your IAM policy allows
49
- the "s3:GetObject" action for your bucket:
50
-
51
- arn:aws:s3:::%{bucket}/*
52
-
53
- It may also indicate the box does not exist, so check your spelling.
54
-
55
11
  unknown_bucket: |-
56
12
  Unable to determine the bucket
@@ -33,3 +33,7 @@ teardown() {
33
33
  [[ "$status" -eq 1 ]]
34
34
  [[ "$output" == *"Malformed shorthand GS box URL"* ]]
35
35
  }
36
+
37
+ @test "standard boxes still work" {
38
+ bundle exec vagrant box add unbuntu/trusty64
39
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-gsauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikhil Benesch
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-01 00:00:00.000000000 Z
12
+ date: 2017-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-api-client
@@ -107,13 +107,6 @@ files:
107
107
  - ".rubocop.yml"
108
108
  - ".ruby-version"
109
109
  - ".travis.yml"
110
- - ".vagrant/machines/default/virtualbox/action_provision"
111
- - ".vagrant/machines/default/virtualbox/action_set_name"
112
- - ".vagrant/machines/default/virtualbox/creator_uid"
113
- - ".vagrant/machines/default/virtualbox/id"
114
- - ".vagrant/machines/default/virtualbox/index_uuid"
115
- - ".vagrant/machines/default/virtualbox/private_key"
116
- - ".vagrant/machines/default/virtualbox/synced_folders"
117
110
  - CHANGELOG.md
118
111
  - CONTRIBUTING.md
119
112
  - Gemfile
@@ -1 +0,0 @@
1
- 1.5:e21ed4ad-df79-4ce2-92e7-737f03004c9a
@@ -1 +0,0 @@
1
- e21ed4ad-df79-4ce2-92e7-737f03004c9a
@@ -1 +0,0 @@
1
- b8501bb300114a7fb421a3e4ddc35121
@@ -1,27 +0,0 @@
1
- -----BEGIN RSA PRIVATE KEY-----
2
- MIIEowIBAAKCAQEA1ZRGw9t6XM5AAMPcRFHYyJkhSLSXhD0Y3VThjVCiazc23xvO
3
- FQL/wd7Cz7UkjwplHOP2CN2FPFHJqLHVhn5PtCYIZLOHAHL4WzhYqm2sIVyLBbWI
4
- lsHHgH25wRXrR50za437QtqPIb/brs5auNKOi4Q0elIeCah9G8tKBf/jbDB1ibXY
5
- L3XVALvBIb6U0dtf0mURgdaT+Ql35UzH5hqQDuT+uB0sfKgKozl9LnxGN0MG45L/
6
- jqmOBfffLAnHGe7EOTQFIli9hgIbliwgZfTpCY4wQrOyceCvzU/R11QH/+zbsUQe
7
- hAoRjWob0uENeI7qOYs4ea2t/A/BfWjgJJtk1wIDAQABAoIBAA4dRWvuFjEJ5Ero
8
- pqbRLd1b2Uo/vP+dNgZydJFtMb6aIIMwCDd1QkeinAcz9l2Jl1MIcZr2YLayxPvj
9
- /LNtp4DFPqrA/nv2HRmSKLHim4x83Cc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aITcpf6M0XeaXX63M3tM8Vdw2vftdkR6wLMiemImNkOk7gahBieqMv
26
- 7AU6AtLW1PdwQU6cXyRY0t4fjC5FWhdNWnLJ8Os7Qs0BajWP6PK3
27
- -----END RSA PRIVATE KEY-----
@@ -1 +0,0 @@
1
- {"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/Users/jdipierro/Source/vagrant-s3auth","disabled":false,"__vagrantfile":true}}}