confidante 0.28.0.pre.13 → 0.28.0.pre.14

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: f6a9c4e82dcf2195dba2d6bd9d93af2f0e6b84222b9536bda2f888a097076851
4
- data.tar.gz: b18f17998406440b3a075a4393399148cbda3fea00e56e36ab5d4ef30f192d7c
3
+ metadata.gz: 79c9839bc842ebec023e9ed5b5dfb855a0d71065197b823f61fd672ccde8ae0a
4
+ data.tar.gz: 3fb77acf16a3aefb99ac313a02b834ac091b1ada64af3dd669d190c72e5d66b5
5
5
  SHA512:
6
- metadata.gz: 366c98cff98776df6b7a9577da69a97f36b7b96106c4345073521e26c24289a93207152e9e35ba7aa1043520b52579639e5bcf019a916ed6d266a0427c3a1686
7
- data.tar.gz: 173105f8ee23c22b82665947fd02cc0cc7ccc282b788c4d68a175aa8125494aea943fcc9c156b3a76a483ffba028c1c7740e7b1c9ae9d2a082cc9dd87ae9b5c7
6
+ metadata.gz: ced6ac392c151b4a5e70ea61cbb5a17c3e4f41c99c54d70f780e0079697b09a2b63099eb367a4eaf1c791a51aff82ed1082bf6d6cf5dcb1346cfb8f0e60aad9e
7
+ data.tar.gz: e94e7f53374f7e2b5b3570111cc959874b546ecbea03738eff28c0f890637d43260f2884a8d93b3b45c146b38cdfb88ac5c58f8476174a8f48b1bfe6ed5d5e91
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confidante (0.28.0.pre.13)
4
+ confidante (0.28.0.pre.14)
5
5
  activesupport (>= 4)
6
6
  hiera (~> 3.3)
7
7
  shikashi (~> 0.6)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Confidante
4
- VERSION = '0.28.0.pre.13'
4
+ VERSION = '0.28.0.pre.14'
5
5
  end
@@ -9,15 +9,17 @@ class Hiera
9
9
  class Vault_backend
10
10
  def initialize
11
11
  Hiera.debug('Hiera vault backend starting')
12
-
13
- @client = Vault::Client.new
14
12
  end
15
13
 
16
14
  def lookup(key, scope, _order_override, resolution_type, _context)
17
15
  Hiera.debug("Looking up #{key} in vault backend " \
18
16
  "with #{resolution_type}")
19
17
 
20
- secret = @client.kv('kv').read(key)
18
+ vault_config = Backend.parse_answer(Config[:vault], scope)
19
+ vault_address = vault_config[:address]
20
+ vault_client = Vault::Client.new(address: vault_address)
21
+
22
+ secret = vault_client.kv('kv').read(key)
21
23
  throw(:no_such_key) unless secret
22
24
 
23
25
  value = secret.data[:value]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confidante
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0.pre.13
4
+ version: 0.28.0.pre.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers