add-vault-tokens 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/add-vault-tokens.gemspec +1 -1
- data/lib/add_vault_tokens.rb +3 -0
- data/lib/add_vault_tokens/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae22e4c9213155c20ef5a4d860c60afcfe83bdf7
|
4
|
+
data.tar.gz: 82299dae5d6adcdcdc2fbf8290b2afbc16f518f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10ffdf3a64560530175b8c537bbd02d184d1c6e2840a3e98061ad8fa9698654b753819c8076c4e659487a7336f87e81f0e67265e0c766c7eb15b97a740cbc686
|
7
|
+
data.tar.gz: a886280e2e997c88de4cea1f816053191c1bfd26da510544965be5379b45e32fd910d2e334c00494f1b5e969771a0ad24a0300cf80270ec9d9fe12ae7a065ddd
|
data/add-vault-tokens.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "vault"
|
22
|
+
spec.add_dependency "vault", "~> 0.2.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.10"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/add_vault_tokens.rb
CHANGED
@@ -27,8 +27,11 @@ module AddVaultTokens
|
|
27
27
|
|
28
28
|
# Create a token for app_name with the appropriate security policy.
|
29
29
|
def create_token_for(app_name)
|
30
|
+
timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S")
|
31
|
+
display = "#{app_name}_#{timestamp}"
|
30
32
|
Vault.auth_token.create(name: app_name,
|
31
33
|
ttl: '720h',
|
34
|
+
display_name: display,
|
32
35
|
policies: [app_name])
|
33
36
|
end
|
34
37
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: add-vault-tokens
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kidd
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vault
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|