aws_assume_role 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b96abdbd68bb0fe6f1b3788626af2ee45a860084fe1ffbc5a879e9e8281f4ddd
4
- data.tar.gz: ebcb6d85ae85f878d8847bbbaefbcce04cdff8cbd2715fef45ddc27a356a0774
3
+ metadata.gz: 45395edecc7de74806f31e15c043864ba06a56639aed1e5a97e87b3281d5d93a
4
+ data.tar.gz: 62529589b7c650466430f65af9dea8c46bd73816404017613523be6d84f813d1
5
5
  SHA512:
6
- metadata.gz: 532dba7afba0cb8e4c8212d3b4bfc72d515f06a179ebaa1f545743000b8aba39be16e74dd541f6d93c69f374ffff23c00167aae1a466c7876964e150a9542381
7
- data.tar.gz: 9c6b2aa1cdb66b3c42f619e32a076e50880a9c7a76cbb5ea4f535d0bc600329a08db16d311a3bc3db5b8ca81603f98d4360527cc0362189df18821f56392d264
6
+ metadata.gz: 9e6b222522697af130f1e791c3118b5b158ceaf4c592a893b640785367a174fb6eac4a4712ebede3796dff293a4404d43bc2fdd6f60fd2ba0490f3bb2656ba74
7
+ data.tar.gz: 39c9195e410c8b9c37845572b60bce7820859e42a0563bc318c4221f141be39be34886eeaa8bc7b8770893230b1311a4e3776f9ede20a7f8dac440f0dbd4d272
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
+ ## 1.0.4
2
+ * Ensure ~/.aws exists before saving configuration
3
+
4
+ ## 1.0.3
5
+ * Fix setting environment variable throwing string frozen error (@timbirk)
6
+
1
7
  ## 1.0.2
2
8
  * Display credential prompts on stderr to allow shell eval to work (@timbirk)
9
+
3
10
  ## 1.0.1
4
11
  * Fix setting environment variable throwing string frozen error (@mrprimate)
5
12
  * Fix incompatibility with version 0.4 of dry-struct (@tomhaynes)
@@ -225,9 +225,17 @@ class AwsAssumeRole::Store::SharedConfigWithKeyring < AwsAssumeRole::Vendored::A
225
225
 
226
226
  # Please run in a mutex
227
227
  def save_configuration
228
- bytes_required = File.size(determine_config_path)
229
- random_bytes = SecureRandom.random_bytes(bytes_required)
230
- File.write(determine_config_path, random_bytes)
228
+ if File.exist? determine_config_path
229
+ bytes_required = File.size(determine_config_path)
230
+ # Overwrite the current .config file with random bytes to eliminate
231
+ # unencrypted credentials.
232
+ # This won't account for COW filesystems or SSD wear-levelling but
233
+ # is a best effort protection.
234
+ random_bytes = SecureRandom.random_bytes(bytes_required)
235
+ File.write(determine_config_path, random_bytes)
236
+ else
237
+ FileUtils.mkdir_p(Pathname.new(determine_config_path).dirname)
238
+ end
231
239
  configuration.save
232
240
  end
233
241
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AwsAssumeRole
4
- VERSION = "1.0.3".freeze
4
+ VERSION = "1.0.4".freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_assume_role
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Topper