conjur-cli 6.2.2 → 6.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,49 +1,36 @@
1
1
  require 'spec_helper'
2
2
  require 'highline'
3
3
 
4
- GITHUB_FP = "SHA1 Fingerprint=CA:06:F5:6B:25:8B:7A:0D:4F:2B:05:47:09:39:47:86:51:15:19:84"
4
+ GITHUB_FP = "SHA1 Fingerprint=84:63:B3:A9:29:12:CC:FD:1D:31:47:05:98:9B:EC:13:99:37:D0:D7"
5
5
  GITHUB_CERT = <<EOF
6
6
  -----BEGIN CERTIFICATE-----
7
- MIIHQjCCBiqgAwIBAgIQCgYwQn9bvO1pVzllk7ZFHzANBgkqhkiG9w0BAQsFADB1
8
- MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
9
- d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk
10
- IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE4MDUwODAwMDAwMFoXDTIwMDYwMzEy
11
- MDAwMFowgccxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYB
12
- BAGCNzwCAQMTAlVTMRkwFwYLKwYBBAGCNzwCAQITCERlbGF3YXJlMRAwDgYDVQQF
13
- Ewc1MTU3NTUwMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQG
14
- A1UEBxMNU2FuIEZyYW5jaXNjbzEVMBMGA1UEChMMR2l0SHViLCBJbmMuMRMwEQYD
15
- VQQDEwpnaXRodWIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
16
- xjyq8jyXDDrBTyitcnB90865tWBzpHSbindG/XqYQkzFMBlXmqkzC+FdTRBYyneZ
17
- w5Pz+XWQvL+74JW6LsWNc2EF0xCEqLOJuC9zjPAqbr7uroNLghGxYf13YdqbG5oj
18
- /4x+ogEG3dF/U5YIw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licmlkRUNDU0hB
26
+ MjU2MjAyMENBMS5jcnQwDAYDVR0TAQH/BAIwADCCAQUGCisGAQQB1nkCBAIEgfYE
27
+ gfMA8QB2ACl5vvCeOTkh8FZzn2Old+W+V32cYAr4+U1dJlwlXceEAAABeGq/vRoA
28
+ AAQDAEcwRQIhAJ7miER//DRFnDJNn6uUhgau3WMt4vVfY5dGigulOdjXAiBIVCfR
29
+ xjK1v4F31+sVaKzyyO7JAa0fzDQM7skQckSYWQB3ACJFRQdZVSRWlj+hL/H3bYbg
30
+ IyZjrcBLf13Gg1xu4g8CAAABeGq/vTkAAAQDAEgwRgIhAJgAEkoJQRivBlwo7x67
31
+ 3oVsf1ip096WshZqmRCuL/JpAiEA3cX4rb3waLDLq4C48NSoUmcw56PwO/m2uwnQ
32
+ prb+yh0wCgYIKoZIzj0EAwIDRwAwRAIgK+Kv7G+/KkWkNZg3PcQFp866Z7G6soxo
33
+ a4etSZ+SRlYCIBSiXS20Wc+yjD111nPzvQUCfsP4+DKZ3K+2GKsERD6d
47
34
  EOF
48
35
 
49
36
  describe Conjur::Command::Init do
@@ -12,7 +12,8 @@ describe Conjur::Command::Users, logged_in: true do
12
12
  user: username,
13
13
  password: api_key,
14
14
  headers: { },
15
- payload: "new-password"
15
+ payload: "new-password",
16
+ ssl_cert_store: cert_store
16
17
  })
17
18
  end
18
19
 
@@ -40,7 +41,8 @@ describe Conjur::Command::Users, logged_in: true do
40
41
  user: username,
41
42
  password: api_key,
42
43
  headers: {},
43
- payload: ''
44
+ payload: '',
45
+ ssl_cert_store: cert_store
44
46
  }).and_return double(:response, body: 'new api key')
45
47
  expect(Conjur::Authn).to receive(:save_credentials).with({
46
48
  username: username,
@@ -52,5 +54,19 @@ describe Conjur::Command::Users, logged_in: true do
52
54
  invoke
53
55
  end
54
56
  end
57
+ describe_command 'user rotate_api_key --user non-existing' do
58
+ before do
59
+ expect(RestClient::Request).to receive(:execute).with({
60
+ method: :head,
61
+ url: "https://core.example.com/api/resources/#{account}/user/non-existing",
62
+ headers: {authorization: "fakeauth"},
63
+ username: username,
64
+ ssl_cert_store: cert_store
65
+ }).and_raise RestClient::ResourceNotFound
66
+ end
67
+ it 'rotate_api_key with non-existing --user option' do
68
+ expect { invoke }.to raise_error(GLI::CustomExit, /User 'non-existing' not found/i)
69
+ end
70
+ end
55
71
  end
56
72
  end
data/test.sh CHANGED
@@ -1,11 +1,15 @@
1
1
  #!/bin/bash -ex
2
2
 
3
- : ${RUBY_VERSION=2.2.5}
3
+ : ${RUBY_VERSION=3.0}
4
4
 
5
5
  # My local RUBY_VERSION is set to ruby-#.#.# so this allows running locally.
6
6
  RUBY_VERSION=$(cut -d '-' -f 2 <<< $RUBY_VERSION)
7
7
 
8
8
  main() {
9
+ if ! docker info >/dev/null 2>&1; then
10
+ echo "Docker does not seem to be running, run it first and retry"
11
+ exit 1
12
+ fi
9
13
 
10
14
  # set up the containers to run in their own namespace
11
15
  COMPOSE_PROJECT_NAME="$(basename "$PWD")_$(openssl rand -hex 3)"
metadata CHANGED
@@ -1,36 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.2
4
+ version: 6.2.6
5
5
  platform: ruby
6
6
  authors:
7
- - Rafal Rzepecki
8
- - Kevin Gilpin
7
+ - Conjur Maintainers
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2020-04-02 00:00:00.000000000 Z
11
+ date: 2022-02-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '4.2'
21
- - - "<"
17
+ - - "~>"
22
18
  - !ruby/object:Gem::Version
23
- version: '6'
19
+ version: '6.0'
24
20
  type: :runtime
25
21
  prerelease: false
26
22
  version_requirements: !ruby/object:Gem::Requirement
27
23
  requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: '4.2'
31
- - - "<"
24
+ - - "~>"
32
25
  - !ruby/object:Gem::Version
33
- version: '6'
26
+ version: '6.0'
34
27
  - !ruby/object:Gem::Dependency
35
28
  name: conjur-api
36
29
  requirement: !ruby/object:Gem::Requirement
@@ -79,14 +72,14 @@ dependencies:
79
72
  requirements:
80
73
  - - "~>"
81
74
  - !ruby/object:Gem::Version
82
- version: '1.7'
75
+ version: '2.0'
83
76
  type: :runtime
84
77
  prerelease: false
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
80
  - - "~>"
88
81
  - !ruby/object:Gem::Version
89
- version: '1.7'
82
+ version: '2.0'
90
83
  - !ruby/object:Gem::Dependency
91
84
  name: netrc
92
85
  requirement: !ruby/object:Gem::Requirement
@@ -233,14 +226,14 @@ dependencies:
233
226
  requirements:
234
227
  - - "~>"
235
228
  - !ruby/object:Gem::Version
236
- version: 12.3.3
229
+ version: '13.0'
237
230
  type: :development
238
231
  prerelease: false
239
232
  version_requirements: !ruby/object:Gem::Requirement
240
233
  requirements:
241
234
  - - "~>"
242
235
  - !ruby/object:Gem::Version
243
- version: 12.3.3
236
+ version: '13.0'
244
237
  - !ruby/object:Gem::Dependency
245
238
  name: rspec
246
239
  requirement: !ruby/object:Gem::Requirement
@@ -277,8 +270,7 @@ dependencies:
277
270
  version: '0.18'
278
271
  description:
279
272
  email:
280
- - rafal@conjur.net
281
- - kgilpin@conjur.net
273
+ - conj_maintainers@cyberark.com
282
274
  executables:
283
275
  - _conjur
284
276
  - conjur
@@ -286,8 +278,7 @@ extensions: []
286
278
  extra_rdoc_files: []
287
279
  files:
288
280
  - ".dockerignore"
289
- - ".github/ISSUE_TEMPLATE/bug.md"
290
- - ".github/ISSUE_TEMPLATE/feature_request.md"
281
+ - ".github/CODEOWNERS"
291
282
  - ".gitignore"
292
283
  - ".gitleaks.toml"
293
284
  - ".kateproject"
@@ -301,9 +292,11 @@ files:
301
292
  - Humanfile.md
302
293
  - Jenkinsfile
303
294
  - LICENSE
295
+ - NOTICES.txt
304
296
  - PUBLISH.md
305
297
  - README.md
306
298
  - Rakefile
299
+ - SECURITY.md
307
300
  - VERSION
308
301
  - bin/_conjur
309
302
  - bin/conjur
@@ -410,9 +403,9 @@ files:
410
403
  - spec/spec_helper.rb
411
404
  - standalone.entrypoint
412
405
  - test.sh
413
- homepage: https://github.com/conjurinc/cli-ruby
406
+ homepage: https://github.com/cyberark/conjur-cli
414
407
  licenses:
415
- - MIT
408
+ - Apache 2.0
416
409
  metadata: {}
417
410
  post_install_message:
418
411
  rdoc_options: []
@@ -429,7 +422,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
429
422
  - !ruby/object:Gem::Version
430
423
  version: '0'
431
424
  requirements: []
432
- rubygems_version: 3.0.3
425
+ rubygems_version: 3.1.6
433
426
  signing_key:
434
427
  specification_version: 4
435
428
  summary: Conjur command line interface
@@ -1,27 +0,0 @@
1
- ---
2
- name: Bug
3
- about: Create a bug report to help us improve
4
- title: ''
5
- labels: component/cli, kind/bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- ## Summary
11
- A clear and concise description of what the bug is.
12
-
13
- ## Steps to Reproduce
14
- Steps to reproduce the behavior:
15
- 1. Go to '...'
16
- 2. Click on '....'
17
- 3. Scroll down to '....'
18
- 4. See error
19
-
20
- ## Expected Results
21
- A clear and concise description of what you expected to happen.
22
-
23
- ## Actual Results (including error logs, if applicable)
24
- A clear and concise description of what actually did happen.
25
-
26
- ## Additional Information
27
- Add any other context about the problem here.
@@ -1,27 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: kind/enhancement, component/cli
6
- assignees: ''
7
-
8
- ---
9
-
10
- ## Is your feature request related to a problem? Please describe.
11
-
12
- A clear and concise description of what the problem is. Ex. `I would like to see [...] because [...]`.
13
- Please include the intended use case and what the feature would improve on so that we can prioritize
14
- the feature accordingly.
15
-
16
- ## Describe the solution you would like
17
-
18
- A clear and concise description of what the desired end result(s) would be.
19
-
20
- ## Describe alternatives you have considered
21
-
22
- A clear and concise description of any alternative solutions or features that may be related to this that
23
- you have considered.
24
-
25
- ## Additional context
26
-
27
- Add any other context information about the feature request here.