conjur-api 4.13.0 → 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +0 -1
- data/README.md +59 -18
- data/conjur-api.gemspec +2 -1
- data/lib/conjur/acts_as_asset.rb +6 -9
- data/lib/conjur/acts_as_role.rb +54 -7
- data/lib/conjur/annotations.rb +52 -14
- data/lib/conjur/api/audit.rb +54 -8
- data/lib/conjur/api/authn.rb +54 -9
- data/lib/conjur/api/groups.rb +67 -4
- data/lib/conjur/api/hosts.rb +62 -3
- data/lib/conjur/api/layers.rb +48 -3
- data/lib/conjur/api/pubkeys.rb +140 -9
- data/lib/conjur/api.rb +13 -1
- data/lib/conjur/base.rb +93 -6
- data/lib/conjur/configuration.rb +247 -20
- data/lib/conjur/exists.rb +26 -0
- data/lib/conjur/group.rb +50 -4
- data/lib/conjur/has_attributes.rb +66 -5
- data/lib/conjur/resource.rb +155 -13
- data/lib/conjur/role.rb +1 -1
- data/lib/conjur/standard_methods.rb +7 -2
- data/lib/conjur/variable.rb +168 -6
- data/lib/conjur-api/version.rb +1 -1
- data/lib/conjur-api.rb +2 -0
- data/spec/api/authn_spec.rb +6 -3
- data/spec/api/groups_spec.rb +1 -1
- data/spec/api/pubkeys_spec.rb +4 -4
- data/spec/api/roles_spec.rb +4 -2
- data/spec/api/users_spec.rb +2 -2
- data/spec/api/variables_spec.rb +1 -1
- data/spec/helpers/errors_matcher.rb +34 -0
- data/spec/helpers/request_helpers.rb +10 -0
- data/spec/lib/annotations_spec.rb +5 -2
- data/spec/lib/audit_spec.rb +5 -5
- data/spec/lib/group_spec.rb +1 -1
- data/spec/lib/resource_spec.rb +11 -11
- data/spec/lib/role_spec.rb +8 -7
- data/spec/lib/user_spec.rb +7 -3
- data/spec/ssl_spec.rb +85 -0
- data/spec/standard_methods_helper.rb +2 -0
- data/spec/variable_spec.rb +5 -3
- metadata +34 -7
- data/lib/conjur/patches/rest-client.rb +0 -32
@@ -1,6 +1,9 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'helpers/request_helpers'
|
2
3
|
|
3
4
|
describe Conjur::Annotations do
|
5
|
+
include RequestHelpers
|
6
|
+
|
4
7
|
let(:identifier){ 'the-resource-id' }
|
5
8
|
let(:kind){ 'some-kind' }
|
6
9
|
let(:account){ 'the-account' }
|
@@ -23,7 +26,7 @@ describe Conjur::Annotations do
|
|
23
26
|
let(:url){ "#{Conjur::Authz::API.host}/#{account}/annotations/#{kind}/#{identifier}" }
|
24
27
|
|
25
28
|
def expect_put_request url, payload
|
26
|
-
|
29
|
+
expect_request(
|
27
30
|
method: :put,
|
28
31
|
headers: {},
|
29
32
|
url: url,
|
@@ -102,4 +105,4 @@ describe Conjur::Annotations do
|
|
102
105
|
end
|
103
106
|
end
|
104
107
|
|
105
|
-
end
|
108
|
+
end
|
data/spec/lib/audit_spec.rb
CHANGED
@@ -11,8 +11,8 @@ describe Conjur::API, api: :dummy do
|
|
11
11
|
let(:expected_path){ nil }
|
12
12
|
let(:expected_url){ "#{Conjur::Audit::API.host}/#{expected_path}#{query}" }
|
13
13
|
|
14
|
-
def
|
15
|
-
|
14
|
+
def expect_json_request
|
15
|
+
expect_request(
|
16
16
|
headers: credentials[:headers],
|
17
17
|
url: expected_url,
|
18
18
|
method: :get
|
@@ -27,7 +27,7 @@ describe Conjur::API, api: :dummy do
|
|
27
27
|
|
28
28
|
shared_examples_for "gets all visible events" do
|
29
29
|
it "GETs /" do
|
30
|
-
|
30
|
+
expect_json_request
|
31
31
|
expect(api.audit(*full_args)).to eq(response)
|
32
32
|
end
|
33
33
|
end
|
@@ -51,7 +51,7 @@ describe Conjur::API, api: :dummy do
|
|
51
51
|
let(:full_args){ include_options ? args + [options] : args }
|
52
52
|
shared_examples_for "gets roles feed" do
|
53
53
|
it "GETs roles/:role_id" do
|
54
|
-
|
54
|
+
expect_json_request
|
55
55
|
expect(api.audit_role(*full_args)).to eq(response)
|
56
56
|
end
|
57
57
|
end
|
@@ -82,7 +82,7 @@ describe Conjur::API, api: :dummy do
|
|
82
82
|
let(:full_args){ include_options ? args + [options] : args }
|
83
83
|
shared_examples_for "gets the resource feed" do
|
84
84
|
it "GETS resources/:resource_id" do
|
85
|
-
|
85
|
+
expect_json_request
|
86
86
|
expect(api.audit_resource(*full_args)).to eq(response)
|
87
87
|
end
|
88
88
|
end
|
data/spec/lib/group_spec.rb
CHANGED
@@ -6,7 +6,7 @@ describe Conjur::Group, api: :dummy do
|
|
6
6
|
|
7
7
|
describe '#update' do
|
8
8
|
it "PUTs to /groups/:id" do
|
9
|
-
|
9
|
+
expect_request(
|
10
10
|
method: :put,
|
11
11
|
url: "#{core_host}/groups/#{api.fully_escape(id)}",
|
12
12
|
headers: credentials[:headers],
|
data/spec/lib/resource_spec.rb
CHANGED
@@ -39,7 +39,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
39
39
|
|
40
40
|
describe '#create' do
|
41
41
|
it "simply puts" do
|
42
|
-
|
42
|
+
expect_request(
|
43
43
|
method: :put,
|
44
44
|
url: uri,
|
45
45
|
payload: {},
|
@@ -51,7 +51,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
51
51
|
|
52
52
|
describe '#permitted_roles' do
|
53
53
|
it 'gets the list from /roles/allowed_to' do
|
54
|
-
|
54
|
+
expect_request(
|
55
55
|
method: :get,
|
56
56
|
url: "http://authz.example.com/some-account/roles/allowed_to/nuke/the-kind/resource-id",
|
57
57
|
headers: {}
|
@@ -63,7 +63,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
63
63
|
|
64
64
|
describe '#give_to' do
|
65
65
|
it "puts the owner field" do
|
66
|
-
|
66
|
+
expect_request(
|
67
67
|
method: :put,
|
68
68
|
url: uri,
|
69
69
|
payload: {owner: 'new-owner' },
|
@@ -76,7 +76,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
76
76
|
|
77
77
|
describe '#delete' do
|
78
78
|
it 'simply deletes' do
|
79
|
-
|
79
|
+
expect_request(
|
80
80
|
method: :delete,
|
81
81
|
url: uri,
|
82
82
|
headers: {}
|
@@ -90,7 +90,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
90
90
|
it 'posts permit for every privilege' do
|
91
91
|
privileges = [:nuke, :fry]
|
92
92
|
privileges.each do |p|
|
93
|
-
|
93
|
+
expect_request(
|
94
94
|
method: :post,
|
95
95
|
url: uri + "/?permit&privilege=#{p}&role=dr-strangelove",
|
96
96
|
headers: {},
|
@@ -105,7 +105,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
105
105
|
it 'posts deny for every privilege' do
|
106
106
|
privileges = [:nuke, :fry]
|
107
107
|
privileges.each do |p|
|
108
|
-
|
108
|
+
expect_request(
|
109
109
|
method: :post,
|
110
110
|
url: uri + "/?deny&privilege=#{p}&role=james-bond",
|
111
111
|
headers: {},
|
@@ -118,7 +118,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
118
118
|
|
119
119
|
describe '#permitted?' do
|
120
120
|
it 'gets the ?permitted? action' do
|
121
|
-
|
121
|
+
expect_request(
|
122
122
|
method: :get,
|
123
123
|
url: uri + "/?check=true&privilege=fry",
|
124
124
|
headers: {}
|
@@ -153,7 +153,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
153
153
|
|
154
154
|
describe '.all' do
|
155
155
|
it "calls /account/resources" do
|
156
|
-
|
156
|
+
expect_request(
|
157
157
|
method: :get,
|
158
158
|
url: "http://authz.example.com/the-account/resources",
|
159
159
|
headers: {}
|
@@ -163,7 +163,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
163
163
|
end
|
164
164
|
|
165
165
|
it "can filter by kind" do
|
166
|
-
|
166
|
+
expect_request(
|
167
167
|
method: :get,
|
168
168
|
url: "http://authz.example.com/the-account/resources/chunky",
|
169
169
|
headers: {}
|
@@ -174,7 +174,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
174
174
|
end
|
175
175
|
|
176
176
|
it "passes search, limit, and offset params" do
|
177
|
-
|
177
|
+
expect_request(
|
178
178
|
method: :get,
|
179
179
|
# Note that to_query sorts the keys
|
180
180
|
url: "http://authz.example.com/the-account/resources?limit=5&offset=6&search=something",
|
@@ -184,7 +184,7 @@ describe Conjur::Resource, api: :dummy, logging: :temp do
|
|
184
184
|
end
|
185
185
|
|
186
186
|
it "uses the given authz url" do
|
187
|
-
|
187
|
+
expect_request(
|
188
188
|
method: :get,
|
189
189
|
url: "http://otherhost.example.com/the-account/resources",
|
190
190
|
headers: {}
|
data/spec/lib/role_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'standard_methods_helper'
|
2
3
|
|
3
4
|
describe Conjur::Role, api: :dummy do
|
4
5
|
let(:account) { "the-account" }
|
@@ -77,7 +78,7 @@ describe Conjur::Role, api: :dummy do
|
|
77
78
|
|
78
79
|
describe '#create' do
|
79
80
|
it 'simply puts' do
|
80
|
-
|
81
|
+
expect_request(
|
81
82
|
method: :put,
|
82
83
|
url: url,
|
83
84
|
payload: {},
|
@@ -90,7 +91,7 @@ describe Conjur::Role, api: :dummy do
|
|
90
91
|
describe '#all' do
|
91
92
|
it 'returns roles for ids got from ?all' do
|
92
93
|
roles = ['foo:k:bar', 'baz:k:xyzzy']
|
93
|
-
|
94
|
+
expect_request(
|
94
95
|
method: :get,
|
95
96
|
url: role.url + "/?all",
|
96
97
|
headers: {}
|
@@ -112,7 +113,7 @@ describe Conjur::Role, api: :dummy do
|
|
112
113
|
|
113
114
|
def self.it_passes_the_filter_as(query_string)
|
114
115
|
it "calls ?all&#{query_string}" do
|
115
|
-
|
116
|
+
expect_request(
|
116
117
|
method: :get,
|
117
118
|
url: role.url + "/?all&#{query_string}",
|
118
119
|
headers:{}
|
@@ -151,7 +152,7 @@ describe Conjur::Role, api: :dummy do
|
|
151
152
|
|
152
153
|
describe '#revoke_from' do
|
153
154
|
it 'deletes member' do
|
154
|
-
|
155
|
+
expect_request(
|
155
156
|
method: :delete,
|
156
157
|
url: role.url + "/?members&member=the-member",
|
157
158
|
headers: {}
|
@@ -162,7 +163,7 @@ describe Conjur::Role, api: :dummy do
|
|
162
163
|
|
163
164
|
describe '#permitted?' do
|
164
165
|
before do
|
165
|
-
|
166
|
+
allow_request(
|
166
167
|
method: :get,
|
167
168
|
url: role.url + "/?check&resource_id=chunky:bacon&privilege=fry",
|
168
169
|
headers: {}
|
@@ -187,13 +188,13 @@ describe Conjur::Role, api: :dummy do
|
|
187
188
|
describe '#members' do
|
188
189
|
it "gets ?members and turns each into RoleGrant" do
|
189
190
|
grants = %w(foo bar)
|
190
|
-
|
191
|
+
expect_request(
|
191
192
|
method: :get,
|
192
193
|
url: role.url + "/?members",
|
193
194
|
headers: {}
|
194
195
|
).and_return grants.to_json
|
195
196
|
grants.each do |g|
|
196
|
-
expect(Conjur::RoleGrant).to receive(:parse_from_json).with(g,
|
197
|
+
expect(Conjur::RoleGrant).to receive(:parse_from_json).with(g, anything).and_return g
|
197
198
|
end
|
198
199
|
|
199
200
|
expect(subject.members).to eq(grants)
|
data/spec/lib/user_spec.rb
CHANGED
@@ -32,7 +32,7 @@ describe Conjur::User do
|
|
32
32
|
|
33
33
|
describe '#options' do
|
34
34
|
subject { super().options }
|
35
|
-
it { is_expected.to
|
35
|
+
it { is_expected.to match(hash_including credentials) }
|
36
36
|
end
|
37
37
|
specify {
|
38
38
|
expect { user.roleid }.to raise_error
|
@@ -41,7 +41,9 @@ describe Conjur::User do
|
|
41
41
|
it "connects to a Resource" do
|
42
42
|
require 'conjur/resource'
|
43
43
|
expect(Conjur::Core::API).to receive(:conjur_account).and_return 'ci'
|
44
|
-
expect(Conjur::Resource).to receive(:new).with(
|
44
|
+
expect(Conjur::Resource).to receive(:new).with(
|
45
|
+
Conjur::Authz::API.host, hash_including(credentials)
|
46
|
+
).and_return resource = double(:resource)
|
45
47
|
expect(resource).to receive(:[]).with("ci/resources/user/the-login")
|
46
48
|
|
47
49
|
user.resource
|
@@ -49,7 +51,9 @@ describe Conjur::User do
|
|
49
51
|
it "connects to a Role" do
|
50
52
|
require 'conjur/role'
|
51
53
|
expect(Conjur::Core::API).to receive(:conjur_account).and_return 'ci'
|
52
|
-
expect(Conjur::Role).to receive(:new).with(
|
54
|
+
expect(Conjur::Role).to receive(:new).with(
|
55
|
+
Conjur::Authz::API.host, hash_including(credentials)
|
56
|
+
).and_return role = double(:role)
|
53
57
|
expect(role).to receive(:[]).with("ci/roles/user/the-login")
|
54
58
|
|
55
59
|
user.role
|
data/spec/ssl_spec.rb
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
require 'helpers/errors_matcher'
|
5
|
+
|
6
|
+
require 'webrick'
|
7
|
+
require 'webrick/https'
|
8
|
+
|
9
|
+
describe 'SSL connection' do
|
10
|
+
context 'with an untrusted certificate' do
|
11
|
+
it 'fails' do
|
12
|
+
expect { Conjur::API.login 'foo', 'bar' }.to \
|
13
|
+
raise_one_of(RestClient::SSLCertificateNotVerified, OpenSSL::SSL::SSLError)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
context 'with certificate added to the default OpenSSL cert store' do
|
18
|
+
before do
|
19
|
+
store = OpenSSL::X509::Store.new
|
20
|
+
store.add_cert cert
|
21
|
+
stub_const 'OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE', store
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'works' do
|
25
|
+
expect { Conjur::API.login 'foo', 'bar' }.to raise_error RestClient::ResourceNotFound
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
let(:port) { 54_128 }
|
30
|
+
|
31
|
+
before do
|
32
|
+
allow(Conjur::Authn::API).to receive(:host).and_return "https://localhost:#{port}"
|
33
|
+
end
|
34
|
+
|
35
|
+
around do |example|
|
36
|
+
server = WEBrick::HTTPServer.new \
|
37
|
+
Port: port, SSLEnable: true,
|
38
|
+
AccessLog: [], Logger: Logger.new('/dev/null'), # shut up, WEBrick
|
39
|
+
SSLCertificate: cert, SSLPrivateKey: key
|
40
|
+
server_thread = Thread.new do
|
41
|
+
server.start
|
42
|
+
end
|
43
|
+
WebMock.disable!
|
44
|
+
example.run
|
45
|
+
WebMock.enable!
|
46
|
+
server.shutdown
|
47
|
+
server_thread.join
|
48
|
+
end
|
49
|
+
|
50
|
+
let(:cert) do
|
51
|
+
OpenSSL::X509::Certificate.new """
|
52
|
+
-----BEGIN CERTIFICATE-----
|
53
|
+
MIIBpDCCAQ2gAwIBAgIJALVPXQuF0w39MA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
|
54
|
+
BAMMCWxvY2FsaG9zdDAeFw0xNTAyMTQxNTE0MDFaFw0yNTAyMTExNTE0MDFaMBQx
|
55
|
+
EjAQBgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
|
56
|
+
n+IqEsmbuZk7E2GdPZpBxETjXC+dGze5XlZHPyKviekQ9sachAsBWApVrjM2QDtf
|
57
|
+
KOwa6GuBqGQ0bdl4Ui7I0CIGB4a0UJHU/EvuDhI1cTzAVVWemW1QaqKxI/2xDgs9
|
58
|
+
bqY471iVirRiSYD+6lm2pFYqOnnR/d+QKIMXhPOi0DMCAwEAATANBgkqhkiG9w0B
|
59
|
+
AQsFAAOBgQCSPchDKAiVPNJlRkaY9KPIXfPbFX6h/+ilJRl1xtHqY+y4SxURbnU0
|
60
|
+
fbYVnapKiuMnrnxTWXwl1z1iMbuuzjUC0RDz8F9pZkQ9IJpBSOaSfyUmk1JrrBRU
|
61
|
+
INyaxnJjtc7YIzW1Yz7+aKtzZAQuFXNhiQa+CIIGeWrpzbExo2ce3Q==
|
62
|
+
-----END CERTIFICATE-----
|
63
|
+
""".lines.map(&:strip).join("\n")
|
64
|
+
end
|
65
|
+
|
66
|
+
let(:key) do
|
67
|
+
OpenSSL::PKey.read """
|
68
|
+
-----BEGIN RSA PRIVATE KEY-----
|
69
|
+
MIICXAIBAAKBgQCf4ioSyZu5mTsTYZ09mkHERONcL50bN7leVkc/Iq+J6RD2xpyE
|
70
|
+
CwFYClWuMzZAO18o7Broa4GoZDRt2XhSLsjQIgYHhrRQkdT8S+4OEjVxPMBVVZ6Z
|
71
|
+
bVBqorEj/bEOCz1upjjvWJWKtGJJgP7qWbakVio6edH935AogxeE86LQMwIDAQAB
|
72
|
+
AoGAUCDb7zCFUB4gglUgpfgCT+gqflAKj9J8n2/kIxsyGI7rBpKBbJfLY6FCUZyu
|
73
|
+
6sAWr/6seaEviQI3WHpuF9oEn6gzb1XWpKH7h9ZAu5O2sscdrc5MrpFmBvGjMBnd
|
74
|
+
80u/TcsDHX453QbPgqOJTi+Qt15Y+Ot/iE8ccQjW6pMPiCECQQDLQvNekVF7YJ9e
|
75
|
+
iJNZSJMcx2c9hjAuywm/jPX+57k0xRlxGKCQxyujmxDfztDYU9kHMRHknbxz0sFr
|
76
|
+
0Vkaxo1DAkEAyV3z6vvTtUx7R5IYOUkZqIfeQ6k6ZItQoZdZPKoBW0s7QhqvJyZN
|
77
|
+
qeYJMaFR87A6273LwhpXZTvQwSYUUw6KUQJAQAIfXaJphG7TARQFQtKF8UQiEM/X
|
78
|
+
EIVD1pxvQwx52FJRRro4ph7ycRz93Vzli5or+AXN2q6Jj/fIjUlpw/LOvQJAfyPO
|
79
|
+
FUjpM+hVUiwhFVJdW/ZlVK0tzDvWLiDkXBQvBRhsEuHMQ1jA4ov2tBpaJxXXI9Uj
|
80
|
+
KKv/EFEDDmDfpk1g8QJBAIJhDsxKWgUy1lk+lGYdWRQi/D/BnkNbySklCypmZghu
|
81
|
+
Q6oXJNYB9NWLRWDJaGHlHrAn40Wq6MUx95Aomvj+uHA=
|
82
|
+
-----END RSA PRIVATE KEY-----
|
83
|
+
""".lines.map(&:strip).join("\n")
|
84
|
+
end
|
85
|
+
end
|
data/spec/variable_spec.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'helpers/request_helpers'
|
2
3
|
|
3
4
|
describe Conjur::Variable do
|
5
|
+
include RequestHelpers
|
4
6
|
let(:url) { "http://example.com/variable" }
|
5
7
|
subject(:variable) { Conjur::Variable.new url }
|
6
8
|
|
@@ -14,7 +16,7 @@ describe Conjur::Variable do
|
|
14
16
|
|
15
17
|
describe '#add_value' do
|
16
18
|
it "posts the new value" do
|
17
|
-
|
19
|
+
expect_request(
|
18
20
|
method: :post,
|
19
21
|
url: "#{url}/values",
|
20
22
|
payload: { value: 'new-value' },
|
@@ -26,7 +28,7 @@ describe Conjur::Variable do
|
|
26
28
|
|
27
29
|
describe '#value' do
|
28
30
|
it "gets the value" do
|
29
|
-
|
31
|
+
allow_request(
|
30
32
|
method: :get,
|
31
33
|
url: "#{url}/value",
|
32
34
|
headers: {}
|
@@ -35,7 +37,7 @@ describe Conjur::Variable do
|
|
35
37
|
end
|
36
38
|
|
37
39
|
it "parametrizes the request with a version" do
|
38
|
-
|
40
|
+
allow_request(
|
39
41
|
method: :get,
|
40
42
|
url: "#{url}/value?version=42",
|
41
43
|
headers: {}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjur-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafal Rzepecki
|
@@ -9,22 +9,28 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.7'
|
21
|
+
- - '>='
|
19
22
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.
|
23
|
+
version: 1.7.3
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- -
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '1.7'
|
31
|
+
- - '>='
|
26
32
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.
|
33
|
+
version: 1.7.3
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: activesupport
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,6 +199,20 @@ dependencies:
|
|
193
199
|
- - '>='
|
194
200
|
- !ruby/object:Gem::Version
|
195
201
|
version: '0'
|
202
|
+
- !ruby/object:Gem::Dependency
|
203
|
+
name: inch
|
204
|
+
requirement: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
type: :development
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - '>='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
196
216
|
description: Conjur API
|
197
217
|
email:
|
198
218
|
- rafal@conjur.net
|
@@ -204,6 +224,7 @@ files:
|
|
204
224
|
- .gitignore
|
205
225
|
- .kateproject
|
206
226
|
- .project
|
227
|
+
- .yardopts
|
207
228
|
- CHANGELOG.md
|
208
229
|
- Gemfile
|
209
230
|
- LICENSE
|
@@ -214,6 +235,7 @@ files:
|
|
214
235
|
- features/login.feature
|
215
236
|
- features/ping_as_server.feature
|
216
237
|
- features/ping_as_user.feature
|
238
|
+
- lib/conjur-api.rb
|
217
239
|
- lib/conjur-api/version.rb
|
218
240
|
- lib/conjur/acts_as_asset.rb
|
219
241
|
- lib/conjur/acts_as_resource.rb
|
@@ -257,7 +279,6 @@ files:
|
|
257
279
|
- lib/conjur/layer.rb
|
258
280
|
- lib/conjur/log.rb
|
259
281
|
- lib/conjur/log_source.rb
|
260
|
-
- lib/conjur/patches/rest-client.rb
|
261
282
|
- lib/conjur/path_based.rb
|
262
283
|
- lib/conjur/pubkeys-api.rb
|
263
284
|
- lib/conjur/resource.rb
|
@@ -280,6 +301,8 @@ files:
|
|
280
301
|
- spec/api/users_spec.rb
|
281
302
|
- spec/api/variables_spec.rb
|
282
303
|
- spec/cas_rest_client.rb
|
304
|
+
- spec/helpers/errors_matcher.rb
|
305
|
+
- spec/helpers/request_helpers.rb
|
283
306
|
- spec/lib/annotations_spec.rb
|
284
307
|
- spec/lib/api_spec.rb
|
285
308
|
- spec/lib/asset_spec.rb
|
@@ -298,6 +321,7 @@ files:
|
|
298
321
|
- spec/lib/standard_methods_spec.rb
|
299
322
|
- spec/lib/user_spec.rb
|
300
323
|
- spec/spec_helper.rb
|
324
|
+
- spec/ssl_spec.rb
|
301
325
|
- spec/standard_methods_helper.rb
|
302
326
|
- spec/variable_spec.rb
|
303
327
|
- spec/vcr_cassettes/Conjur_Resource/_create/with_path-like_identifier.yml
|
@@ -345,6 +369,8 @@ test_files:
|
|
345
369
|
- spec/api/users_spec.rb
|
346
370
|
- spec/api/variables_spec.rb
|
347
371
|
- spec/cas_rest_client.rb
|
372
|
+
- spec/helpers/errors_matcher.rb
|
373
|
+
- spec/helpers/request_helpers.rb
|
348
374
|
- spec/lib/annotations_spec.rb
|
349
375
|
- spec/lib/api_spec.rb
|
350
376
|
- spec/lib/asset_spec.rb
|
@@ -363,6 +389,7 @@ test_files:
|
|
363
389
|
- spec/lib/standard_methods_spec.rb
|
364
390
|
- spec/lib/user_spec.rb
|
365
391
|
- spec/spec_helper.rb
|
392
|
+
- spec/ssl_spec.rb
|
366
393
|
- spec/standard_methods_helper.rb
|
367
394
|
- spec/variable_spec.rb
|
368
395
|
- spec/vcr_cassettes/Conjur_Resource/_create/with_path-like_identifier.yml
|
@@ -1,32 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (C) 2014 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
|
-
# RestClient monkey patches MIME::Types, breaking it in certain situations.
|
22
|
-
# Let's make check if it did and fix it if so.
|
23
|
-
# Cf. https://github.com/rest-client/rest-client/pull/346
|
24
|
-
|
25
|
-
if MIME::Types.respond_to? :type_for_extension
|
26
|
-
class MIME::Types
|
27
|
-
def self.type_for_extension ext
|
28
|
-
candidates = of ext
|
29
|
-
candidates.empty? ? ext : candidates[0].content_type
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|