conjur-api 6.0.1 → 6.1.0.pre.615
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/CHANGELOG.md +6 -0
- data/README.md +0 -1
- data/VERSION +1 -1
- data/lib/conjur/command/rspec/output_matchers.rb +54 -0
- data/lib/conjur/config.rb +141 -0
- data/spec/.conjurrc +2 -0
- data/spec/config_spec.rb +176 -0
- data/spec/conjur-ci.pem +87 -0
- data/spec/conjurrc +2 -0
- data/spec/spec_helper.rb +20 -1
- metadata +14 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27ea89a490a2c34556cc1475d543ef842284f0be87fe9002e84d6d8ab0e7aa55
|
|
4
|
+
data.tar.gz: 574674480a23741f9ee63fc4f80d98d1de88fdd19a4c8f18d552315db03e8385
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 218342458bfb9da3c710c01756a798ee6f06e82b80cfb5ff33ee473cc59a2fecff569078fbb57f9ff69ada430a371d1eacd40928a59e413e669299ec10a9dd3d
|
|
7
|
+
data.tar.gz: e8edc24451100131f2e2335d6fbd0a11e5a4df638b866e0393fc40125dc898c1c7e6a9a2ad1e2a7012320effaa956dd39ee12402d527c31b882f739669b95d11
|
data/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
9
9
|
- Nothing should go in this section, please add to the latest unreleased version
|
|
10
10
|
(and update the corresponding date), or add a new version.
|
|
11
11
|
|
|
12
|
+
## [6.1.0] - 2025-09-05
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Added Config code and tests to repository (CNJR-10552).
|
|
16
|
+
[cyberark/conjur-api-ruby#186](https://github.com/cyberark/conjur-api-ruby/issues/186)
|
|
17
|
+
|
|
12
18
|
## [6.0.1] - 2025-09-05
|
|
13
19
|
|
|
14
20
|
### Fixed
|
data/README.md
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.0
|
|
1
|
+
6.1.0-615
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'io/grab'
|
|
2
|
+
|
|
3
|
+
# Custom matcher to test text written to standard output and standard error
|
|
4
|
+
#
|
|
5
|
+
# @example
|
|
6
|
+
# expect { $stderr.puts "Some random error" }.to write(/Some.* error/).to(:stderr)
|
|
7
|
+
#
|
|
8
|
+
# @example
|
|
9
|
+
# expect { $stderr.puts "Some specific error" }.to write('Some specific error').to(:stderr)
|
|
10
|
+
#
|
|
11
|
+
# @note http://greyblake.com/blog/2012/12/14/custom-expectations-with-rspec/
|
|
12
|
+
RSpec::Matchers.define :write do |message|
|
|
13
|
+
supports_block_expectations
|
|
14
|
+
|
|
15
|
+
chain(:to) do |io|
|
|
16
|
+
@io = io
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
match do |block|
|
|
20
|
+
stream = case io
|
|
21
|
+
when :stdout
|
|
22
|
+
$stdout
|
|
23
|
+
when :stderr
|
|
24
|
+
$stderr
|
|
25
|
+
else
|
|
26
|
+
io
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
@actual = output = stream.grab &block
|
|
30
|
+
|
|
31
|
+
case message
|
|
32
|
+
when Hash then output.include?(JSON.pretty_generate message)
|
|
33
|
+
when String then output.include? message
|
|
34
|
+
when Regexp then output.match message
|
|
35
|
+
when nil then output
|
|
36
|
+
else fail("Allowed types for write `message` are String or Regexp, got `#{message.class}`")
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
description do
|
|
41
|
+
%Q[write #{message.inspect} to #{@io}]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
diffable
|
|
45
|
+
|
|
46
|
+
failure_message do
|
|
47
|
+
%Q[expected to #{description} but got #{@actual.inspect}]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# default IO is standard output
|
|
51
|
+
def io
|
|
52
|
+
@io ||= :stdout
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (C) 2013 Conjur Inc
|
|
3
|
+
#
|
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
# subject to the following conditions:
|
|
10
|
+
#
|
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
# copies or substantial portions of the Software.
|
|
13
|
+
#
|
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
#
|
|
21
|
+
require 'active_support/core_ext/hash/deep_merge'
|
|
22
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
|
23
|
+
|
|
24
|
+
module Conjur
|
|
25
|
+
class Config
|
|
26
|
+
@@attributes = {}
|
|
27
|
+
|
|
28
|
+
class << self
|
|
29
|
+
def clear
|
|
30
|
+
@@attributes = {}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def plugin_config_files
|
|
34
|
+
[ '/opt/conjur/etc/plugins.yml' ]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def user_config_files
|
|
38
|
+
$stderr.puts "variable return %s\n", ENV['CONJURRC']
|
|
39
|
+
#raise ENV.inspect
|
|
40
|
+
if ENV['CONJURRC']
|
|
41
|
+
$stderr.puts "variable return %s\n", ENV['CONJURRC']
|
|
42
|
+
return ENV['CONJURRC']
|
|
43
|
+
else
|
|
44
|
+
homefile = File.expand_path "~/.conjurrc"
|
|
45
|
+
pwdfile = File.expand_path ".conjurrc"
|
|
46
|
+
if homefile != pwdfile && File.file?(pwdfile)
|
|
47
|
+
$stderr.puts """NOTE:\t.conjurrc file detected in the current directory.\n"\
|
|
48
|
+
"\tIt's no longer consulted in this version. Please explicitly\n"\
|
|
49
|
+
"\tset CONJURRC=./.conjurrc if you're sure you want to use it."
|
|
50
|
+
end
|
|
51
|
+
[ homefile ]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def default_config_files
|
|
56
|
+
['/etc/conjur.conf', user_config_files, plugin_config_files].flatten.uniq
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def load(config_files = default_config_files)
|
|
60
|
+
require 'yaml'
|
|
61
|
+
require 'conjur/log'
|
|
62
|
+
|
|
63
|
+
config_files.each do |f|
|
|
64
|
+
if File.file?(f)
|
|
65
|
+
if Conjur.log
|
|
66
|
+
Conjur.log << "Loading #{f}\n"
|
|
67
|
+
end
|
|
68
|
+
config = YAML.load(IO.read(f)).stringify_keys rescue {}
|
|
69
|
+
if config['cert_file']
|
|
70
|
+
config['cert_file'] = File.expand_path(config['cert_file'], File.dirname(f))
|
|
71
|
+
end
|
|
72
|
+
Conjur::Config.merge config
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def apply
|
|
79
|
+
require 'conjur/configuration'
|
|
80
|
+
|
|
81
|
+
keys = Config.keys.dup
|
|
82
|
+
keys.delete(:plugins)
|
|
83
|
+
|
|
84
|
+
cfg = Conjur.configuration
|
|
85
|
+
keys.each do |k|
|
|
86
|
+
if Conjur.configuration.respond_to?("#{k}_env_var") && (env_var = Conjur.configuration.send("#{k}_env_var")) && (v = ENV[env_var])
|
|
87
|
+
if Conjur.log
|
|
88
|
+
Conjur.log << "Not overriding environment setting #{k}=#{v}\n"
|
|
89
|
+
end
|
|
90
|
+
next
|
|
91
|
+
end
|
|
92
|
+
value = Config[k]
|
|
93
|
+
cfg.set k, value if value
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
Conjur.log << "Using authn url #{Conjur.configuration.authn_url}\n" if Conjur.log
|
|
97
|
+
|
|
98
|
+
Conjur.config.apply_cert_config!
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def inspect
|
|
103
|
+
@@attributes.inspect
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def plugins
|
|
107
|
+
plugins = @@attributes['plugins']
|
|
108
|
+
if plugins
|
|
109
|
+
plugins.is_a?(Array) ? plugins : plugins.split(',')
|
|
110
|
+
else
|
|
111
|
+
[]
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def merge(a)
|
|
116
|
+
a = {} unless a
|
|
117
|
+
@@attributes.deep_merge!(a.stringify_keys)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def keys
|
|
121
|
+
@@attributes.keys.map(&:to_sym)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def [](key)
|
|
125
|
+
@@attributes[key.to_s]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def member? key
|
|
129
|
+
@@attributes.member?(key) || @@attributes.member?(alternate_key(key))
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def alternate_key key
|
|
133
|
+
case key
|
|
134
|
+
when String then key.to_sym
|
|
135
|
+
when Symbol then key.to_s
|
|
136
|
+
else key
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
data/spec/.conjurrc
ADDED
data/spec/config_spec.rb
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'conjur/config'
|
|
3
|
+
require 'conjur/command/rspec/output_matchers'
|
|
4
|
+
|
|
5
|
+
describe Conjur::Config do
|
|
6
|
+
include_context "fresh config"
|
|
7
|
+
|
|
8
|
+
describe ".default_config_files" do
|
|
9
|
+
subject { Conjur::Config.default_config_files }
|
|
10
|
+
let(:homedir) { '/src/conjur-api' }
|
|
11
|
+
around do |example|
|
|
12
|
+
realhome = ENV.delete 'HOME'
|
|
13
|
+
ENV['HOME'] = homedir
|
|
14
|
+
example.run
|
|
15
|
+
ENV['HOME'] = realhome
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
let(:deprecation_warning) { /\.conjurrc/ }
|
|
19
|
+
|
|
20
|
+
shared_examples "no deprecation warning" do
|
|
21
|
+
it "does not issue a deprecation warning" do
|
|
22
|
+
expect { subject }.to_not write(deprecation_warning).to(:stderr)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
context "when CONJURRC is not set" do
|
|
27
|
+
around do |example|
|
|
28
|
+
oldrc = ENV.delete 'CONJURRC'
|
|
29
|
+
|
|
30
|
+
example.run
|
|
31
|
+
|
|
32
|
+
ENV['CONJURRC'] = oldrc
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it { is_expected.to include('/etc/conjur.conf') }
|
|
36
|
+
it { is_expected.to include("#{homedir}/.conjurrc") }
|
|
37
|
+
|
|
38
|
+
before do
|
|
39
|
+
allow(File).to receive(:expand_path).and_call_original
|
|
40
|
+
allow(File).to receive(:expand_path).with('.conjurrc').and_return '.conjurrc'
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
context "When .conjurrc is present" do
|
|
44
|
+
before { allow(File).to receive(:file?).with('.conjurrc').and_return true }
|
|
45
|
+
it "Issues a deprecation warning" do
|
|
46
|
+
expect { subject }.to write(deprecation_warning).to(:stderr)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it "doesn't use the file" do
|
|
50
|
+
expect(subject).to_not include '.conjurrc'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
context "but the current directory is home" do
|
|
54
|
+
before do
|
|
55
|
+
allow(File).to receive(:expand_path).and_call_original
|
|
56
|
+
allow(File).to receive(:expand_path).and_call_original
|
|
57
|
+
allow(File).to receive(:expand_path).with('.conjurrc').and_return("#{homedir}/.conjurrc")
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
include_examples "no deprecation warning"
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
context "When .conjurrc is missing" do
|
|
65
|
+
before { allow(File).to receive(:file?).with('.conjurrc').and_return false }
|
|
66
|
+
include_examples "no deprecation warning"
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
context "when CONJURRC is set but not available" do
|
|
71
|
+
oldrc = ENV['CONJURRC']
|
|
72
|
+
|
|
73
|
+
before { ENV['CONJURRC']='stub_conjurrc' }
|
|
74
|
+
|
|
75
|
+
it { is_expected.to include('/etc/conjur.conf') }
|
|
76
|
+
it { is_expected.not_to include("#{homedir}/.conjurrc") }
|
|
77
|
+
it { is_expected.to include('stub_conjurrc') }
|
|
78
|
+
|
|
79
|
+
include_examples "no deprecation warning"
|
|
80
|
+
ENV['CONJURRC'] = oldrc
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
context "when CONJURRC is set to conjurrc" do
|
|
84
|
+
oldrc = ENV['CONJURRC']
|
|
85
|
+
|
|
86
|
+
before { ENV['CONJURRC']='conjurrc' }
|
|
87
|
+
|
|
88
|
+
before { allow(File).to receive(:file?).with('conjurrc').and_return true }
|
|
89
|
+
it { is_expected.to include('/etc/conjur.conf') }
|
|
90
|
+
it { is_expected.to include('conjurrc') }
|
|
91
|
+
it { is_expected.not_to include("#{homedir}/conjurrc") }
|
|
92
|
+
|
|
93
|
+
include_examples "no deprecation warning"
|
|
94
|
+
ENV['CONJURRC'] = oldrc
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
let(:load!) { Conjur::Config.load([ File.expand_path('conjurrc', File.dirname(__FILE__)) ]) }
|
|
99
|
+
let(:cert_path) { File.expand_path('conjur-ci.pem', File.dirname(__FILE__)) }
|
|
100
|
+
|
|
101
|
+
describe "#load" do
|
|
102
|
+
it "resolves the cert_file" do
|
|
103
|
+
load!
|
|
104
|
+
|
|
105
|
+
expect(Conjur::Config[:cert_file]).to eq(cert_path)
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
describe "#apply" do
|
|
110
|
+
before {
|
|
111
|
+
allow(OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE).to receive(:add_file)
|
|
112
|
+
allow(File).to receive(:open)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
context "ssl_certificate string" do
|
|
116
|
+
let(:ssl_certificate) do
|
|
117
|
+
"""-----BEGIN CERTIFICATE-----
|
|
118
|
+
MIIDPjCCAiagAwIBAgIVAKW1gdmOFrXt6xB0iQmYQ4z8Pf+kMA0GCSqGSIb3DQEB
|
|
119
|
+
CwUAMD0xETAPBgNVBAoTCGN1Y3VtYmVyMRIwEAYDVQQLEwlDb25qdXIgQ0ExFDAS
|
|
120
|
+
BgNVBAMTC2N1a2UtbWFzdGVyMB4XDTE1MTAwNzE2MzAwNloXDTI1MTAwNDE2MzAw
|
|
121
|
+
NlowFjEUMBIGA1UEAwwLY3VrZS1tYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IB
|
|
122
|
+
DwAwggEKAoIBAQC9e8bGIHOLOypKA4lsLcAOcDLAq+ICuVxn9Vg0No0m32Ok/K7G
|
|
123
|
+
uEGtlC8RidObntblUwqdX2uP7mqAQm19j78UTl1KT97vMmmFrpVZ7oQvEm1FUq3t
|
|
124
|
+
FBmJglthJrSbpdZjLf7a7eL1NnunkfBdI1DK9QL9ndMjNwZNFbXhld4fC5zuSr/L
|
|
125
|
+
PxawSzTEsoTaB0Nw0DdRowaZgrPxc0hQsrj9OF20gTIJIYO7ctZzE/JJchmBzgI4
|
|
126
|
+
CdfAYg7zNS+0oc0ylV0CWMerQtLICI6BtiQ482bCuGYJ00NlDcdjd3w+A2cj7PrH
|
|
127
|
+
wH5UhtORL5Q6i9EfGGUCDbmfpiVD9Bd3ukbXAgMBAAGjXDBaMA4GA1UdDwEB/wQE
|
|
128
|
+
AwIFoDAdBgNVHQ4EFgQU2jmj7l5rSw0yVb/vlWAYkK/YBwkwKQYDVR0RBCIwIIIL
|
|
129
|
+
Y3VrZS1tYXN0ZXKCCWxvY2FsaG9zdIIGY29uanVyMA0GCSqGSIb3DQEBCwUAA4IB
|
|
130
|
+
AQBCepy6If67+sjuVnT9NGBmjnVaLa11kgGNEB1BZQnvCy0IN7gpLpshoZevxYDR
|
|
131
|
+
3DnPAetQiZ70CSmCwjL4x6AVxQy59rRj0Awl9E1dgFTYI3JxxgLsI9ePdIRVEPnH
|
|
132
|
+
dhXqPY5ZIZhvdHlLStjsXX7laaclEtMeWfSzxe4AmP/Sm/er4ks0gvLQU6/XJNIu
|
|
133
|
+
RnRH59ZB1mZMsIv9Ii790nnioYFR54JmQu1JsIib77ZdSXIJmxAtraJSTLcZbU1E
|
|
134
|
+
+SM3XCE423Xols7onyluMYDy3MCUTFwoVMRBcRWCAk5gcv6XvZDfLi6Zwdne6x3Y
|
|
135
|
+
bGenr4vsPuSFsycM03/EcQDT
|
|
136
|
+
-----END CERTIFICATE-----
|
|
137
|
+
"""
|
|
138
|
+
end
|
|
139
|
+
let(:certificate){ double('Certificate') }
|
|
140
|
+
before{
|
|
141
|
+
Conjur::Config.class_variable_set('@@attributes', {'ssl_certificate' => ssl_certificate})
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
it 'trusts the certificate string' do
|
|
145
|
+
expect(OpenSSL::X509::Certificate).to receive(:new).with(ssl_certificate).once.and_return certificate
|
|
146
|
+
expect(OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE).to receive(:add_cert).with(certificate).once
|
|
147
|
+
Conjur::Config.apply
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
context "cert_file" do
|
|
152
|
+
let(:cert_file) { "/path/to/cert.pem" }
|
|
153
|
+
before {
|
|
154
|
+
Conjur::Config.class_variable_set("@@attributes", { 'cert_file' => cert_file })
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
it "trusts the cert_file" do
|
|
158
|
+
expect(OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE).to receive(:add_file).with cert_file
|
|
159
|
+
Conjur::Config.apply
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
it "propagates the cert_file to Configuration.cert_file" do
|
|
163
|
+
Conjur::Config.apply
|
|
164
|
+
expect(Conjur.configuration.cert_file).to eq(cert_file)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
it "shadows rc with envars" do
|
|
169
|
+
url = 'https://other-conjur.example.com'
|
|
170
|
+
ENV['CONJUR_APPLIANCE_URL'] = url
|
|
171
|
+
load!
|
|
172
|
+
Conjur::Config.apply
|
|
173
|
+
expect(Conjur.configuration.appliance_url).to eq(url)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
data/spec/conjur-ci.pem
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIF+zCCBOOgAwIBAgIQCbznZyohZO2yFeFNe+bssjANBgkqhkiG9w0BAQsFADA8
|
|
3
|
+
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRwwGgYDVQ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h0dHA6Ly9jcnQucm9vdGcyLmFtYXpvbnRydXN0LmNvbS9yb290ZzIuY2Vy
|
|
79
|
+
MD0GA1UdHwQ2MDQwMqAwoC6GLGh0dHA6Ly9jcmwucm9vdGcyLmFtYXpvbnRydXN0
|
|
80
|
+
LmNvbS9yb290ZzIuY3JsMBEGA1UdIAQKMAgwBgYEVR0gADANBgkqhkiG9w0BAQsF
|
|
81
|
+
AAOCAQEAYjdCXLwQtT6LLOkMm2xF4gcAevnFWAu5CIw+7bMlPLVvUOTNNWqnkzSW
|
|
82
|
+
MiGpSESrnO09tKpzbeR/FoCJbM8oAxiDR3mjEH4wW6w7sGDgd9QIpuEdfF7Au/ma
|
|
83
|
+
eyKdpwAJfqxGF4PcnCZXmTA5YpaP7dreqsXMGz7KQ2hsVxa81Q4gLv7/wmpdLqBK
|
|
84
|
+
bRRYh5TmOTFffHPLkIhqhBGWJ6bt2YFGpn6jcgAKUj6DiAdjd4lpFw85hdKrCEVN
|
|
85
|
+
0FE6/V1dN2RMfjCyVSRCnTawXZwXgWHxyvkQAiSr6w10kY17RSlQOYiypok1JR4U
|
|
86
|
+
akcjMS9cmvqtmg5iUaQqqcT5NJ0hGA==
|
|
87
|
+
-----END CERTIFICATE-----
|
data/spec/conjurrc
ADDED
data/spec/spec_helper.rb
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
require 'conjur/api'
|
|
3
|
+
|
|
4
|
+
shared_context "fresh config" do
|
|
5
|
+
before {
|
|
6
|
+
ENV.delete_if do |k,v|
|
|
7
|
+
next if k == 'CONJUR_ACCOUNT'
|
|
8
|
+
|
|
9
|
+
k =~ /^CONJUR_/
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
@configuration = Conjur.configuration
|
|
13
|
+
Conjur.configuration = Conjur::Configuration.new
|
|
14
|
+
}
|
|
15
|
+
after {
|
|
16
|
+
Conjur::Config.clear
|
|
17
|
+
Conjur.configuration = @configuration
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
1
21
|
require 'simplecov'
|
|
2
22
|
require 'simplecov-cobertura'
|
|
3
23
|
|
|
4
24
|
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
|
5
25
|
|
|
6
|
-
|
|
7
26
|
SimpleCov.start do
|
|
8
27
|
command_name "#{ENV['RUBY_VERSION']}"
|
|
9
28
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: conjur-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.1.0.pre.615
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- CyberArk Maintainers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|
|
@@ -358,6 +358,8 @@ files:
|
|
|
358
358
|
- lib/conjur/cache.rb
|
|
359
359
|
- lib/conjur/cert_utils.rb
|
|
360
360
|
- lib/conjur/cidr.rb
|
|
361
|
+
- lib/conjur/command/rspec/output_matchers.rb
|
|
362
|
+
- lib/conjur/config.rb
|
|
361
363
|
- lib/conjur/configuration.rb
|
|
362
364
|
- lib/conjur/escape.rb
|
|
363
365
|
- lib/conjur/exceptions.rb
|
|
@@ -381,12 +383,16 @@ files:
|
|
|
381
383
|
- lib/conjur/variable.rb
|
|
382
384
|
- lib/conjur/webservice.rb
|
|
383
385
|
- publish.sh
|
|
386
|
+
- spec/.conjurrc
|
|
384
387
|
- spec/api/host_factories_spec.rb
|
|
385
388
|
- spec/api_spec.rb
|
|
386
389
|
- spec/base_object_spec.rb
|
|
387
390
|
- spec/cert_utils_spec.rb
|
|
388
391
|
- spec/cidr_spec.rb
|
|
392
|
+
- spec/config_spec.rb
|
|
389
393
|
- spec/configuration_spec.rb
|
|
394
|
+
- spec/conjur-ci.pem
|
|
395
|
+
- spec/conjurrc
|
|
390
396
|
- spec/has_attributes_spec.rb
|
|
391
397
|
- spec/helpers/errors_matcher.rb
|
|
392
398
|
- spec/helpers/request_helpers.rb
|
|
@@ -416,9 +422,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
416
422
|
version: '1.9'
|
|
417
423
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
418
424
|
requirements:
|
|
419
|
-
- - "
|
|
425
|
+
- - ">"
|
|
420
426
|
- !ruby/object:Gem::Version
|
|
421
|
-
version:
|
|
427
|
+
version: 1.3.1
|
|
422
428
|
requirements: []
|
|
423
429
|
rubygems_version: 3.4.19
|
|
424
430
|
signing_key:
|
|
@@ -453,12 +459,16 @@ test_files:
|
|
|
453
459
|
- features/user.feature
|
|
454
460
|
- features/variable_fields.feature
|
|
455
461
|
- features/variable_value.feature
|
|
462
|
+
- spec/.conjurrc
|
|
456
463
|
- spec/api/host_factories_spec.rb
|
|
457
464
|
- spec/api_spec.rb
|
|
458
465
|
- spec/base_object_spec.rb
|
|
459
466
|
- spec/cert_utils_spec.rb
|
|
460
467
|
- spec/cidr_spec.rb
|
|
468
|
+
- spec/config_spec.rb
|
|
461
469
|
- spec/configuration_spec.rb
|
|
470
|
+
- spec/conjur-ci.pem
|
|
471
|
+
- spec/conjurrc
|
|
462
472
|
- spec/has_attributes_spec.rb
|
|
463
473
|
- spec/helpers/errors_matcher.rb
|
|
464
474
|
- spec/helpers/request_helpers.rb
|