heroku-config 0.1.0 → 0.2.0

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: 8d09f67aa9118f360968ebac3deda4367589a820fff3f58c1cbb55dc8f12da0f
4
- data.tar.gz: 7fbda965589b2a43c44d928e893a579f340db81b7fbde46791fb27c65377ce0c
3
+ metadata.gz: 9f2111e59e572f3463941128576134d04698f17a13fd133c1213a420b8aa59dd
4
+ data.tar.gz: 77deca42ebf969b897016d61895c61c9c401a0d1833e5f0a2bbbb2a65a021e51
5
5
  SHA512:
6
- metadata.gz: eed2ef3cffa39a324c910771da3ccd45ab8d98856a36d3d45b380a93572fbf20cf0212eba620b7058caf9745e59f53059b4eea0b15585e35da9c44174722d1b3
7
- data.tar.gz: 54399e1010245b85cdc57164d634b529ff6aaa79b93d326127db45588f699bbf86b5074c273e01261c47ef635ac082b303842ad767228f5aee7da771b7ef12fa
6
+ metadata.gz: 077a3d0563fb87a77786a1e714a0c1674f6efbcf0deb97df964d02cb32018ceb9d77dcb9b6234a95db9ac2f5e9c8e61f5698e8542ad0746d7025325740e8db71
7
+ data.tar.gz: b2f1d704ee3de001475569491e09368c41ba22258d64d15b88e0e1a4ff92f44f8553d1007d6f1b1472e816963837320bf40f3b5e357fb280b3f0568c193f3648
data/CHANGELOG.md CHANGED
@@ -3,5 +3,8 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.2.0]
7
+ - check if new key is useable before completing rotation
8
+
6
9
  ## [0.1.0]
7
10
  - Initial release.
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
- # HerokuConfig
1
+ # heroku-config
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/heroku-config.png)](http://badge.fury.io/rb/heroku-config)
4
4
 
5
- Easily rotate AWS keys and heroku configs.
5
+ Quickly rotate [AWS credential keys](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) and [heroku configs](https://devcenter.heroku.com/articles/config-vars).
6
+
7
+ Do you have long-term AWS credentials like `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` deployed to your Heroku applications? When was the last time they were rotated?
8
+
9
+ Rotating AWS keys is one of the simplest security measures to take. Usually though, we're too busy with developing features and rotating keys take a back seat. This tool automates the boring and manual process of rotating keys. Run this on your CodeBuild, jenkins server, a lambda function, or just manually when you have to.
6
10
 
7
11
  ## Usage
8
12
 
@@ -20,22 +24,18 @@ Easily rotate AWS keys and heroku configs.
20
24
 
21
25
  AWS_ACCESS_KEY_ID: AKIAXZ6ODJLQQEXAMPLE
22
26
  AWS_SECRET_ACCESS_KEY: sp4gmsuif0XgYG2cPiZbkvl93kTGaeDDhEXAMPLE
23
- Old access key deleted: AKIAXZ6ODJLQSGGE27KK
27
+ Old access key deleted: AKIAXZ6ODJLQSGEXAMPLE
24
28
  $
25
29
 
26
30
  ## Installation
27
31
 
28
- Add this line to your application's Gemfile:
29
-
30
- gem "heroku-config"
32
+ Or install with RubyGems.
31
33
 
32
- And then execute:
33
-
34
- bundle
34
+ gem install heroku-config
35
35
 
36
- Or install it yourself as:
36
+ Prerequisite:
37
37
 
38
- gem install heroku-config
38
+ [The heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) must be installed. This tool calls out to it.
39
39
 
40
40
  ## Contributing
41
41
 
@@ -36,7 +36,12 @@ module HerokuConfig
36
36
  end
37
37
 
38
38
  def wait_until_usable(key, secret)
39
+ puts "Checking if new AWS key is usable yet."
39
40
  delay, retries = 5, 0
41
+ sts = Aws::STS::Client.new(
42
+ access_key_id: key,
43
+ secret_access_key: secret,
44
+ )
40
45
  begin
41
46
  sts.get_caller_identity
42
47
  true
@@ -1,3 +1,3 @@
1
1
  module HerokuConfig
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen