constancy 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65a3785bc8276043c12dd3a82fc0da2f23db508f8ccb9de6e074ef3fb34a0c01
4
- data.tar.gz: 6f83ec7f19dfe57f28ae56b9179c3c34b9b5419c1bfc8c3f7f4338d08564675b
3
+ metadata.gz: d3e4e575fc5f80a0782fe1b893049209d976179f6d372f32511211d29f04c0fa
4
+ data.tar.gz: d516a0d7c2311358205415a811eea26212fba7e7ebc1f6c0e3f2f0ff9df8b193
5
5
  SHA512:
6
- metadata.gz: 6b4a9af5164674a87cc132d026fd7b7a1205f30ed94d255e37fa43d0ac46922235ab665836c7158f862441106947e3792bcd5d2338ca76f8ceb3cf4c22738c7b
7
- data.tar.gz: 3b589b72c830dd07283e5fc5a19c5feb9f7404e4d3f949fa20915a44e9bf91a7fb03b9409e9d66805bb7343dbcdf9d33542bdb69373bc55020f5c82ee26900de
6
+ metadata.gz: ba9ee9f9c89fcfe995ce3383d273fa08788284e1d064b4a00f994fdf6f8bfdbdefcbb1589f0af7be278e243d9c1e1457a8b03089b139040b9e3a1725da5cf28a
7
+ data.tar.gz: 32ba1fd6a825ba89989ca6128ad1a4fbbaa18f7a5603524de59f2c424bc1aac4d09ed6684a06af306bef8bb493727e4b6d7880de29e66d0f611b511124cde64d
data/README.md CHANGED
@@ -123,17 +123,17 @@ required. An example `constancy.yml` is below including explanatory comments:
123
123
  # The REST API endpoint of your Vault server
124
124
  url: https://your.vault.example
125
125
 
126
- # path - the path to the endpoint from which to read the Consul token
126
+ # consul_token_path - the path to the endpoint from which to read the Consul token
127
127
  # The Vault URI path to the Consul token - can be either the Consul
128
128
  # dynamic backend or a KV endpoint with a static value. If the dynamic
129
129
  # backend is used, the lease will be automatically revoked when
130
130
  # constancy exits.
131
- path: consul/creds/my-role
131
+ consul_token_path: consul/creds/my-role
132
132
 
133
- # field - name of the field in which the Consul token is stored
133
+ # consul_token_field - name of the field in which the Consul token is stored
134
134
  # Defaults to 'token' which is the field used by the dynamic backend
135
135
  # but can be set to something else for static values.
136
- field: token
136
+ consul_token_field: token
137
137
 
138
138
  sync:
139
139
  # sync is an array of hashes of sync target configurations
@@ -10,11 +10,11 @@ class Constancy
10
10
  CONFIG_FILENAMES = %w( constancy.yml )
11
11
  VALID_CONFIG_KEYS = %w( sync consul vault constancy )
12
12
  VALID_CONSUL_CONFIG_KEYS = %w( url datacenter token_source )
13
- VALID_VAULT_CONFIG_KEYS = %w( url path field )
13
+ VALID_VAULT_CONFIG_KEYS = %w( url consul_token_path consul_token_field )
14
14
  VALID_CONSTANCY_CONFIG_KEYS = %w( verbose chomp delete color )
15
15
  DEFAULT_CONSUL_URL = "http://localhost:8500"
16
16
  DEFAULT_CONSUL_TOKEN_SOURCE = "none"
17
- DEFAULT_VAULT_FIELD = "token"
17
+ DEFAULT_VAULT_CONSUL_TOKEN_FIELD = "token"
18
18
 
19
19
  attr_accessor :config_file, :base_dir, :consul, :sync_targets, :target_whitelist
20
20
 
@@ -127,9 +127,9 @@ class Constancy
127
127
  raise Constancy::ConfigFileInvalid.new("Only the following keys are valid in the vault config: #{Constancy::Config::VALID_VAULT_CONFIG_KEYS.join(", ")}")
128
128
  end
129
129
 
130
- vault_path = raw['vault']['path']
130
+ vault_path = raw['vault']['consul_token_path']
131
131
  if vault_path.nil? or vault_path == ""
132
- raise Constancy::ConfigFileInvalid.new("vault.path must be specified to use vault as a token source")
132
+ raise Constancy::ConfigFileInvalid.new("vault.consul_token_path must be specified to use vault as a token source")
133
133
  end
134
134
 
135
135
  # prioritize the config file over environment variables for vault address
@@ -148,7 +148,7 @@ class Constancy
148
148
  end
149
149
  end
150
150
 
151
- vault_field = raw['vault']['field'] || Constancy::Config::DEFAULT_VAULT_FIELD
151
+ vault_field = raw['vault']['consul_token_field'] || Constancy::Config::DEFAULT_VAULT_CONSUL_TOKEN_FIELD
152
152
 
153
153
  ENV['VAULT_ADDR'] = vault_addr
154
154
  ENV['VAULT_TOKEN'] = vault_token
@@ -1,5 +1,5 @@
1
1
  # This software is public domain. No rights are reserved. See LICENSE for more information.
2
2
 
3
3
  class Constancy
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constancy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Adams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-24 00:00:00.000000000 Z
11
+ date: 2018-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imperium