hiera-gosecret 0.2.3 → 0.2.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 +4 -4
- data/bin/{gosecret-decrypt → gosecret} +10 -4
- data/bin/gosecret-win-x64.exe +0 -0
- data/lib/hiera/backend/gosecret_backend.rb +2 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f408551ceb8491eb6719a88361f1462ad4d900d
|
4
|
+
data.tar.gz: 3e878caec88d4b5cb84c1d9053f3081e02e1b5d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69969d36bf6435fee42d0255ac59391650fe61dc8b24ef10b11258ba296e1d2c579b6c2712b6f3139febfd8998ba7e9132b218907bd5fcf6131f8d1a9e1b4a84
|
7
|
+
data.tar.gz: 937a6273acfd67d3592869921db7f984d2b592ef043859b4aaf32daa9505115555a0ee8db03d04d3e5697a08cfe2ed308c6ef825ab6300321aadfed28c3a8a9e
|
@@ -1,14 +1,20 @@
|
|
1
1
|
#!/bin/env ruby
|
2
2
|
require 'rbconfig'
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
#keystore = ARGV[0]
|
6
|
+
#value = ARGV[1]
|
7
|
+
args = ''
|
8
|
+
ARGV.each do |a|
|
9
|
+
str = /\[(gosecret(\|[^\]\|]*){4})\]/.match(a)
|
10
|
+
args = args + ' ' + a.gsub(/\[(gosecret(\|[^\]\|]*){4})\]/, "\"#{str}\"")
|
11
|
+
end
|
6
12
|
|
7
13
|
case RbConfig::CONFIG['arch']
|
8
14
|
when /x86_64-linux/i
|
9
|
-
print `#{File.expand_path File.dirname(__FILE__)}/gosecret-linux-x64
|
15
|
+
print `#{File.expand_path File.dirname(__FILE__)}/gosecret-linux-x64 #{args}`
|
10
16
|
when /cygwin|mswin|mingw|bccwin|wince|emx/i
|
11
|
-
print `#{File.expand_path File.dirname(__FILE__)}/gosecret-win-x64.exe
|
17
|
+
print `#{File.expand_path File.dirname(__FILE__)}/gosecret-win-x64.exe #{args}`
|
12
18
|
else
|
13
19
|
STDERR.puts "OS not supported"
|
14
20
|
end
|
Binary file
|
@@ -56,7 +56,8 @@ class Hiera
|
|
56
56
|
def decrypt(value)
|
57
57
|
if value != nil and value.is_a?(String) and /\[(gosecret(\|[^\]\|]*){4})\]/.match(value)
|
58
58
|
Hiera.debug("Decrypting gosecret encrypted value: #{value}")
|
59
|
-
|
59
|
+
args = "-mode=decrypt -keystore=\"#{Config[:gosecret][:keydir]}\" -value=\"#{value}\""
|
60
|
+
return `gosecret #{args}`
|
60
61
|
end
|
61
62
|
end
|
62
63
|
end
|
metadata
CHANGED
@@ -1,26 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera-gosecret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Calvin Leung Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Hiera backend for decrypting gosecret-encrypted values
|
14
14
|
email:
|
15
15
|
executables:
|
16
|
-
- gosecret
|
16
|
+
- gosecret
|
17
17
|
- gosecret-linux-x64
|
18
|
+
- gosecret-win-x64.exe
|
18
19
|
extensions: []
|
19
20
|
extra_rdoc_files: []
|
20
21
|
files:
|
21
22
|
- LICENSE
|
22
|
-
- bin/gosecret
|
23
|
+
- bin/gosecret
|
23
24
|
- bin/gosecret-linux-x64
|
25
|
+
- bin/gosecret-win-x64.exe
|
24
26
|
- lib/hiera/backend/gosecret_backend.rb
|
25
27
|
homepage: http://github.com/Cimpress-MCP/hiera-gosecret
|
26
28
|
licenses:
|