conjur-cli 5.4.0 → 5.5.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
  SHA1:
3
- metadata.gz: b2bb2f6423b56a36f979bdd3d26be85172e986a9
4
- data.tar.gz: 8a35bfcafee51a86fe6fd28112049bace77ebf98
3
+ metadata.gz: ac5dff61d36b91557e546edb4f9f0c42d1d47ae7
4
+ data.tar.gz: 4b217db2dcbab92a5ac3d321043e05f67aaaab6d
5
5
  SHA512:
6
- metadata.gz: 8253351f69a787a362e355d45e13a8249a9500c0a3693ae1e902ee3c6413d0667ff202c21165ed574fb6448fbb9381367c3ad1103f37d6fbe0cb73bf299a7729
7
- data.tar.gz: 3b6a5f2ddc3c965ed51302132f6bf9fe365c2e139643ce47a72031c324a0f250c6d72bbdfb58939fa5b6ae79b11945f630fd10c1e62caf40f40f2a165470cc6c
6
+ metadata.gz: 8ad164a85360446876629b60e811f881246238502149794de61efa3a7495de85e4bd6bc35bdd85e83958f5d7f8d6005bd788003fb6b07c39e8e76e25e9fa51fd
7
+ data.tar.gz: df5671793e1adaad9e527bc1a8352de32f941fe99d914cfa9c503f05c12b55afc52a05cfc347508f8c3d443fe163b0e1f3507e72e5f03b9a2604c495845e948e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 5.5.0
2
+
3
+ * Use `CONJUR_AUTHN_TOKEN_FILE` as the Conjur access token file, if it's available in the environment.
4
+
1
5
  # 5.4.0
2
6
 
3
7
  * Deprecated several commands in favor of using policy.
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- #ruby=ruby-2.2.4
3
+ #ruby=ruby-2.2.5
4
4
  #ruby-gemset=conjur-cli
5
5
 
6
6
  # Specify your gem's dependencies in conjur.gemspec
@@ -8,7 +8,7 @@ gemspec
8
8
 
9
9
  gem 'activesupport', '~> 4.2'
10
10
 
11
- gem 'conjur-api', '>= 4.28.1', git: 'https://github.com/conjurinc/api-ruby.git', branch: 'master'
11
+ gem 'conjur-api', '>= 4.29.0', git: 'https://github.com/conjurinc/api-ruby.git', branch: 'master'
12
12
  gem 'semantic', '>= 1.4.1', git: 'https://github.com/jlindsey/semantic.git'
13
13
 
14
14
  group :test, :development do
data/lib/conjur/authn.rb CHANGED
@@ -128,6 +128,8 @@ module Conjur::Authn
128
128
  end
129
129
  if token = token_from_environment
130
130
  cls.new_from_token token
131
+ elsif token_file = token_from_file
132
+ cls.new_from_token_file token_file
131
133
  else
132
134
  cls.new_from_key(*get_credentials(options))
133
135
  end
@@ -153,5 +155,13 @@ module Conjur::Authn
153
155
  require 'base64'
154
156
  JSON.parse(Base64.decode64(token))
155
157
  end
158
+
159
+ def token_from_file
160
+ token_file = ENV['CONJUR_AUTHN_TOKEN_FILE']
161
+ if token_file && !File.exists?(token_file)
162
+ $stderr.puts "Warning: CONJUR_AUTHN_TOKEN_FILE #{token_file.inspect} does not exist"
163
+ end
164
+ token_file
165
+ end
156
166
  end
157
167
  end
@@ -19,6 +19,6 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
  module Conjur
22
- VERSION = '5.4.0'
22
+ VERSION = '5.5.0'
23
23
  ::Version=VERSION
24
24
  end
data/spec/config_spec.rb CHANGED
@@ -113,6 +113,7 @@ describe Conjur::Config do
113
113
 
114
114
  describe "#apply" do
115
115
  before {
116
+ allow_any_instance_of(Conjur::Configuration).to receive(:ensure_cert_readable!)
116
117
  allow(OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE).to receive(:add_file)
117
118
  }
118
119
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Rzepecki
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-01 00:00:00.000000000 Z
12
+ date: 2017-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport