conjur-cli 6.1.0 → 6.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +10 -0
  3. data/.github/ISSUE_TEMPLATE/bug.md +42 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +21 -0
  6. data/.gitleaks.toml +216 -0
  7. data/CHANGELOG.md +69 -209
  8. data/CONTRIBUTING.md +81 -0
  9. data/Jenkinsfile +83 -40
  10. data/LICENSE +202 -0
  11. data/NOTICES.txt +421 -0
  12. data/README.md +278 -48
  13. data/Rakefile +0 -1
  14. data/SECURITY.md +42 -0
  15. data/VERSION +1 -1
  16. data/bin/conjur +3 -1
  17. data/bin/parse-changelog.sh +12 -0
  18. data/build-standalone +42 -3
  19. data/ci/cli-test.sh +5 -1
  20. data/ci/submit-coverage +36 -0
  21. data/ci/test.sh +1 -1
  22. data/conjur-cli.gemspec +15 -13
  23. data/dev/docker-compose.yml +1 -0
  24. data/dev/start.sh +3 -3
  25. data/docker-compose.yml +2 -1
  26. data/features/authorization/resource/check.feature +6 -0
  27. data/features/authorization/resource/exists.feature +10 -3
  28. data/features/hostfactory/tokens.feature +1 -1
  29. data/features/pubkeys/show.feature +0 -4
  30. data/features/step_definitions/authn_steps.rb +1 -1
  31. data/features/step_definitions/cli_steps.rb +0 -19
  32. data/features/step_definitions/overrides.rb +3 -5
  33. data/features/support/env.rb +3 -1
  34. data/features/support/hooks.rb +0 -11
  35. data/jenkins.sh +1 -1
  36. data/lib/conjur/cli.rb +4 -3
  37. data/lib/conjur/command/hosts.rb +1 -1
  38. data/lib/conjur/command/ldap_sync.rb +37 -0
  39. data/lib/conjur/command/rspec/describe_command.rb +26 -7
  40. data/lib/conjur/command/rspec/mock_services.rb +7 -1
  41. data/lib/conjur/command/users.rb +5 -1
  42. data/lib/conjur/version.rb +1 -1
  43. data/needs-publishing +28 -0
  44. data/push-image +46 -28
  45. data/spec/authn_spec.rb +4 -4
  46. data/spec/command/authn_spec.rb +2 -2
  47. data/spec/command/hosts_spec.rb +26 -3
  48. data/spec/command/init_spec.rb +28 -28
  49. data/spec/command/ldap_sync_spec.rb +38 -0
  50. data/spec/command/users_spec.rb +18 -2
  51. data/spec/spec_helper.rb +5 -2
  52. data/test.sh +6 -1
  53. metadata +80 -77
  54. data/LICENSE.md +0 -195
data/NOTICES.txt ADDED
@@ -0,0 +1,421 @@
1
+ =============== TABLE OF CONTENTS =============================
2
+
3
+ The following is a listing of the Conjur Service Broker open source components detailed
4
+ in this document. This list is provided for your convenience; please read
5
+ further if you wish to review the copyright notice(s) and the full text
6
+ of the license associated with each component.
7
+
8
+
9
+ SECTION 1: Apache-2.0
10
+
11
+ >>> https://rubygems.org/gems/conjur-api/versions/5.3.4
12
+ >>> https://rubygems.org/gems/gli/versions/2.19.2
13
+
14
+ SECTION 2: BSD-2-Clause
15
+
16
+ >>> https://rubygems.org/gems/highline/versions/1.7.10
17
+ >>> https://rubygems.org/gems/xdg/versions/2.2.3
18
+
19
+ SECTION 3: MIT
20
+
21
+ >>> https://rubygems.org/gems/activesupport/versions/5.2.4.4
22
+ >>> https://rubygems.org/gems/deep_merge/versions/1.0.1
23
+ >>> https://rubygems.org/gems/netrc/versions/0.10.3
24
+ >>> https://rubygems.org/gems/table_print/versions/1.5.7
25
+
26
+ APPENDIX: Standard License Files and Templates
27
+
28
+ >>> Apache-2.0
29
+
30
+ >>> BSD-2-Clause
31
+
32
+ >>> MIT
33
+
34
+ --------------- SECTION 1: Apache-2.0 ----------
35
+
36
+ Apache-2.0 License is applicable to the following component(s).
37
+
38
+ >>> https://rubygems.org/gems/conjur-api/versions/5.3.4
39
+
40
+ Copyright (c) 2020 CyberArk Software Ltd. All rights reserved.'
41
+
42
+ Licensed under the Apache License, Version 2.0 (the "License");
43
+ you may not use this file except in compliance with the License.
44
+ You may obtain a copy of the License at
45
+
46
+ http://www.apache.org/licenses/LICENSE-2.0
47
+
48
+ Unless required by applicable law or agreed to in writing, software
49
+ distributed under the License is distributed on an "AS IS" BASIS,
50
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
+ See the License for the specific language governing permissions and
52
+ limitations under the License.
53
+
54
+ >>> https://rubygems.org/gems/gli/versions/2.19.2
55
+
56
+ Copyright (c) 2010 by Dave Copeland
57
+
58
+ Licensed under the Apache License, Version 2.0 (the "License");
59
+ you may not use this file except in compliance with the License.
60
+ You may obtain a copy of the License at
61
+
62
+ http://www.apache.org/licenses/LICENSE-2.0
63
+
64
+ Unless required by applicable law or agreed to in writing, software
65
+ distributed under the License is distributed on an "AS IS" BASIS,
66
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67
+ See the License for the specific language governing permissions and
68
+ limitations under the License.
69
+
70
+ --------------- SECTION 2: BSD-2-Clause ----------
71
+
72
+ >>> https://rubygems.org/gems/highline/versions/1.7.10
73
+
74
+ Copyright 2005 Gray Productions. All rights reserved.
75
+
76
+ >>> https://rubygems.org/gems/xdg/versions/2.2.3
77
+
78
+ Redistribution and use in source and binary forms, with or without
79
+ modification, are permitted provided that the following conditions are met:
80
+
81
+ 1. Redistributions of source code must retain the above copyright notice,
82
+ this list of conditions and the following disclaimer.
83
+
84
+ 2. Redistributions in binary form must reproduce the above copyright
85
+ notice, this list of conditions and the following disclaimer in the
86
+ documentation and/or other materials provided with the distribution.
87
+
88
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
89
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
90
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
91
+ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
92
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
93
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
94
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
95
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
96
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
97
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
98
+
99
+ --------------- SECTION 3: MIT ----------
100
+
101
+ MIT License is applicable to the following component(s).
102
+
103
+ >>> https://rubygems.org/gems/activesupport/versions/5.2.4.4
104
+
105
+ Copyright (c) 2005-2018 David Heinemeier Hansson'
106
+
107
+ Permission is hereby granted, free of charge, to any person obtaining a copy
108
+ of this software and associated documentation files (the "Software"), to deal
109
+ in the Software without restriction, including without limitation the rights
110
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111
+ copies of the Software, and to permit persons to whom the Software is
112
+ furnished to do so, subject to the following conditions:
113
+
114
+ The above copyright notice and this permission notice shall be included in all
115
+ copies or substantial portions of the Software.
116
+
117
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
123
+ SOFTWARE.
124
+
125
+
126
+ >>> https://rubygems.org/gems/deep_merge/versions/1.0.1
127
+
128
+ Copyright (c) 2008-2104 Steve Midgley, Daniel DeLeo
129
+
130
+ Permission is hereby granted, free of charge, to any person obtaining a copy
131
+ of this software and associated documentation files (the "Software"), to deal
132
+ in the Software without restriction, including without limitation the rights
133
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
134
+ copies of the Software, and to permit persons to whom the Software is
135
+ furnished to do so, subject to the following conditions:
136
+
137
+ The above copyright notice and this permission notice shall be included in
138
+ all copies or substantial portions of the Software.
139
+
140
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
141
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
142
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
143
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
144
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
145
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
146
+ THE SOFTWARE.
147
+
148
+ >>> https://rubygems.org/gems/netrc/versions/0.10.3
149
+
150
+ Copyright (c) 2011-2014 CONTRIBUTORS.md
151
+
152
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
153
+
154
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
155
+
156
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
157
+
158
+ >>> https://rubygems.org/gems/table_print/versions/1.5.7
159
+
160
+ Copyright (c) 2012-2016 Chris Doyle
161
+
162
+ Permission is hereby granted, free of charge, to any person obtaining
163
+ a copy of this software and associated documentation files (the
164
+ "Software"), to deal in the Software without restriction, including
165
+ without limitation the rights to use, copy, modify, merge, publish,
166
+ distribute, sublicense, and/or sell copies of the Software, and to
167
+ permit persons to whom the Software is furnished to do so, subject to
168
+ the following conditions:
169
+
170
+ The above copyright notice and this permission notice shall be
171
+ included in all copies or substantial portions of the Software.
172
+
173
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
174
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
175
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
176
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
177
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
178
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
179
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
180
+
181
+ =============== APPENDIX: License Files and Templates ==============
182
+
183
+
184
+
185
+ --------------- APPENDIX 1: Apache-2.0 License (Template) -----------
186
+
187
+ Apache License
188
+ Version 2.0, January 2004
189
+ http://www.apache.org/licenses/
190
+
191
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
192
+
193
+ 1. Definitions.
194
+
195
+ "License" shall mean the terms and conditions for use, reproduction,
196
+ and distribution as defined by Sections 1 through 9 of this document.
197
+
198
+ "Licensor" shall mean the copyright owner or entity authorized by
199
+ the copyright owner that is granting the License.
200
+
201
+ "Legal Entity" shall mean the union of the acting entity and all
202
+ other entities that control, are controlled by, or are under common
203
+ control with that entity. For the purposes of this definition,
204
+ "control" means (i) the power, direct or indirect, to cause the
205
+ direction or management of such entity, whether by contract or
206
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
207
+ outstanding shares, or (iii) beneficial ownership of such entity.
208
+
209
+ "You" (or "Your") shall mean an individual or Legal Entity
210
+ exercising permissions granted by this License.
211
+
212
+ "Source" form shall mean the preferred form for making modifications,
213
+ including but not limited to software source code, documentation
214
+ source, and configuration files.
215
+
216
+ "Object" form shall mean any form resulting from mechanical
217
+ transformation or translation of a Source form, including but
218
+ not limited to compiled object code, generated documentation,
219
+ and conversions to other media types.
220
+
221
+ "Work" shall mean the work of authorship, whether in Source or
222
+ Object form, made available under the License, as indicated by a
223
+ copyright notice that is included in or attached to the work
224
+ (an example is provided in the Appendix below).
225
+
226
+ "Derivative Works" shall mean any work, whether in Source or Object
227
+ form, that is based on (or derived from) the Work and for which the
228
+ editorial revisions, annotations, elaborations, or other modifications
229
+ represent, as a whole, an original work of authorship. For the purposes
230
+ of this License, Derivative Works shall not include works that remain
231
+ separable from, or merely link (or bind by name) to the interfaces of,
232
+ the Work and Derivative Works thereof.
233
+
234
+ "Contribution" shall mean any work of authorship, including
235
+ the original version of the Work and any modifications or additions
236
+ to that Work or Derivative Works thereof, that is intentionally
237
+ submitted to Licensor for inclusion in the Work by the copyright owner
238
+ or by an individual or Legal Entity authorized to submit on behalf of
239
+ the copyright owner. For the purposes of this definition, "submitted"
240
+ means any form of electronic, verbal, or written communication sent
241
+ to the Licensor or its representatives, including but not limited to
242
+ communication on electronic mailing lists, source code control systems,
243
+ and issue tracking systems that are managed by, or on behalf of, the
244
+ Licensor for the purpose of discussing and improving the Work, but
245
+ excluding communication that is conspicuously marked or otherwise
246
+ designated in writing by the copyright owner as "Not a Contribution."
247
+
248
+ "Contributor" shall mean Licensor and any individual or Legal Entity
249
+ on behalf of whom a Contribution has been received by Licensor and
250
+ subsequently incorporated within the Work.
251
+
252
+ 2. Grant of Copyright License. Subject to the terms and conditions of
253
+ this License, each Contributor hereby grants to You a perpetual,
254
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
255
+ copyright license to reproduce, prepare Derivative Works of,
256
+ publicly display, publicly perform, sublicense, and distribute the
257
+ Work and such Derivative Works in Source or Object form.
258
+
259
+ 3. Grant of Patent License. Subject to the terms and conditions of
260
+ this License, each Contributor hereby grants to You a perpetual,
261
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
262
+ (except as stated in this section) patent license to make, have made,
263
+ use, offer to sell, sell, import, and otherwise transfer the Work,
264
+ where such license applies only to those patent claims licensable
265
+ by such Contributor that are necessarily infringed by their
266
+ Contribution(s) alone or by combination of their Contribution(s)
267
+ with the Work to which such Contribution(s) was submitted. If You
268
+ institute patent litigation against any entity (including a
269
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
270
+ or a Contribution incorporated within the Work constitutes direct
271
+ or contributory patent infringement, then any patent licenses
272
+ granted to You under this License for that Work shall terminate
273
+ as of the date such litigation is filed.
274
+
275
+ 4. Redistribution. You may reproduce and distribute copies of the
276
+ Work or Derivative Works thereof in any medium, with or without
277
+ modifications, and in Source or Object form, provided that You
278
+ meet the following conditions:
279
+
280
+ (a) You must give any other recipients of the Work or
281
+ Derivative Works a copy of this License; and
282
+
283
+ (b) You must cause any modified files to carry prominent notices
284
+ stating that You changed the files; and
285
+
286
+ (c) You must retain, in the Source form of any Derivative Works
287
+ that You distribute, all copyright, patent, trademark, and
288
+ attribution notices from the Source form of the Work,
289
+ excluding those notices that do not pertain to any part of
290
+ the Derivative Works; and
291
+
292
+ (d) If the Work includes a "NOTICE" text file as part of its
293
+ distribution, then any Derivative Works that You distribute must
294
+ include a readable copy of the attribution notices contained
295
+ within such NOTICE file, excluding those notices that do not
296
+ pertain to any part of the Derivative Works, in at least one
297
+ of the following places: within a NOTICE text file distributed
298
+ as part of the Derivative Works; within the Source form or
299
+ documentation, if provided along with the Derivative Works; or,
300
+ within a display generated by the Derivative Works, if and
301
+ wherever such third-party notices normally appear. The contents
302
+ of the NOTICE file are for informational purposes only and
303
+ do not modify the License. You may add Your own attribution
304
+ notices within Derivative Works that You distribute, alongside
305
+ or as an addendum to the NOTICE text from the Work, provided
306
+ that such additional attribution notices cannot be construed
307
+ as modifying the License.
308
+
309
+ You may add Your own copyright statement to Your modifications and
310
+ may provide additional or different license terms and conditions
311
+ for use, reproduction, or distribution of Your modifications, or
312
+ for any such Derivative Works as a whole, provided Your use,
313
+ reproduction, and distribution of the Work otherwise complies with
314
+ the conditions stated in this License.
315
+
316
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
317
+ any Contribution intentionally submitted for inclusion in the Work
318
+ by You to the Licensor shall be under the terms and conditions of
319
+ this License, without any additional terms or conditions.
320
+ Notwithstanding the above, nothing herein shall supersede or modify
321
+ the terms of any separate license agreement you may have executed
322
+ with Licensor regarding such Contributions.
323
+
324
+ 6. Trademarks. This License does not grant permission to use the trade
325
+ names, trademarks, service marks, or product names of the Licensor,
326
+ except as required for reasonable and customary use in describing the
327
+ origin of the Work and reproducing the content of the NOTICE file.
328
+
329
+ 7. Disclaimer of Warranty. Unless required by applicable law or
330
+ agreed to in writing, Licensor provides the Work (and each
331
+ Contributor provides its Contributions) on an "AS IS" BASIS,
332
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
333
+ implied, including, without limitation, any warranties or conditions
334
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
335
+ PARTICULAR PURPOSE. You are solely responsible for determining the
336
+ appropriateness of using or redistributing the Work and assume any
337
+ risks associated with Your exercise of permissions under this License.
338
+
339
+ 8. Limitation of Liability. In no event and under no legal theory,
340
+ whether in tort (including negligence), contract, or otherwise,
341
+ unless required by applicable law (such as deliberate and grossly
342
+ negligent acts) or agreed to in writing, shall any Contributor be
343
+ liable to You for damages, including any direct, indirect, special,
344
+ incidental, or consequential damages of any character arising as a
345
+ result of this License or out of the use or inability to use the
346
+ Work (including but not limited to damages for loss of goodwill,
347
+ work stoppage, computer failure or malfunction, or any and all
348
+ other commercial damages or losses), even if such Contributor
349
+ has been advised of the possibility of such damages.
350
+
351
+ 9. Accepting Warranty or Additional Liability. While redistributing
352
+ the Work or Derivative Works thereof, You may choose to offer,
353
+ and charge a fee for, acceptance of support, warranty, indemnity,
354
+ or other liability obligations and/or rights consistent with this
355
+ License. However, in accepting such obligations, You may act only
356
+ on Your own behalf and on Your sole responsibility, not on behalf
357
+ of any other Contributor, and only if You agree to indemnify,
358
+ defend, and hold each Contributor harmless for any liability
359
+ incurred by, or claims asserted against, such Contributor by reason
360
+ of your accepting any such warranty or additional liability.
361
+
362
+ END OF TERMS AND CONDITIONS
363
+
364
+ APPENDIX: How to apply the Apache License to your work.
365
+
366
+ To apply the Apache License to your work, attach the following
367
+ boilerplate notice, with the fields enclosed by brackets "[]"
368
+ replaced with your own identifying information. (Don't include
369
+ the brackets!) The text should be enclosed in the appropriate
370
+ comment syntax for the file format. We also recommend that a
371
+ file or class name and description of purpose be included on the
372
+ same "printed page" as the copyright notice for easier
373
+ identification within third-party archives.
374
+
375
+ Copyright <YEAR> <COPYRIGHT HOLDER>
376
+
377
+ Licensed under the Apache License, Version 2.0 (the "License");
378
+ you may not use this file except in compliance with the License.
379
+ You may obtain a copy of the License at
380
+
381
+ http://www.apache.org/licenses/LICENSE-2.0
382
+
383
+ Unless required by applicable law or agreed to in writing, software
384
+ distributed under the License is distributed on an "AS IS" BASIS,
385
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
386
+ See the License for the specific language governing permissions and
387
+ limitations under the License.
388
+
389
+ --------------- APPENDIX 2: BSD-2-Clause License (Template) -----------
390
+
391
+ Copyright <YEAR> <COPYRIGHT HOLDER>
392
+
393
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
394
+
395
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
396
+
397
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
398
+
399
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
400
+
401
+ --------------- APPENDIX 3: MIT License (Template) -----------
402
+
403
+ Copyright <YEAR> <COPYRIGHT HOLDER>
404
+
405
+ Permission is hereby granted, free of charge, to any person obtaining a copy
406
+ of this software and associated documentation files (the "Software"), to deal
407
+ in the Software without restriction, including without limitation the rights
408
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
409
+ copies of the Software, and to permit persons to whom the Software is
410
+ furnished to do so, subject to the following conditions:
411
+
412
+ The above copyright notice and this permission notice shall be included in all
413
+ copies or substantial portions of the Software.
414
+
415
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
416
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
417
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
418
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
419
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
420
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
421
+ SOFTWARE.
data/README.md CHANGED
@@ -6,7 +6,18 @@ Command-line interface for Conjur.
6
6
 
7
7
  A complete reference guide is available at [conjur.org](https://www.conjur.org).
8
8
 
9
- ## Quick start
9
+ ## Table of Contents
10
+ - [Getting Started](#getting-started)
11
+ - [Quick Start](#quick-start)
12
+ - [Using This Project With Conjur Open Source](#Using-conjur-cli-with-Conjur-Open-Source)
13
+ - [Using Docker](#using-docker)
14
+ - [Usage](#usage)
15
+ - [Contributing](#contributing)
16
+ - [License](#license)
17
+
18
+ ## Getting Started
19
+
20
+ ### Quick start
10
21
 
11
22
  ```sh-session
12
23
  $ gem install conjur-cli
@@ -15,7 +26,19 @@ $ conjur -v
15
26
  conjur version 6.0.0
16
27
  ```
17
28
 
29
+ ### Using conjur-cli with Conjur Open Source
30
+
31
+ Are you using this project with [Conjur Open Source](https://github.com/cyberark/conjur)? Then we
32
+ **strongly** recommend choosing the version of this project to use from the latest [Conjur OSS
33
+ suite release](https://docs.conjur.org/Latest/en/Content/Overview/Conjur-OSS-Suite-Overview.html).
34
+ Conjur maintainers perform additional testing on the suite release versions to ensure
35
+ compatibility. When possible, upgrade your Conjur version to match the
36
+ [latest suite release](https://docs.conjur.org/Latest/en/Content/ReleaseNotes/ConjurOSS-suite-RN.htm);
37
+ when using integrations, choose the latest suite release that matches your Conjur version. For any
38
+ questions, please contact us on [Discourse](https://discuss.cyberarkcommons.org/c/conjur/5).
39
+
18
40
  ## Using Docker
41
+
19
42
  [![Docker Build Status](https://img.shields.io/docker/build/conjurinc/cli5.svg)](https://hub.docker.com/r/conjurinc/cli5/)
20
43
  This software is included in the standalone cyberark/conjur-cli:5 Docker image. Docker containers are designed to be ephemeral, which means they don't store state after the container exits.
21
44
 
@@ -59,80 +82,287 @@ drwxr-xr-x 2 you staff 68 Mar 29 14:16 .cache
59
82
  ```
60
83
  *Security notice:* the file `.netrc`, created or updated by `conjur authn login`, contains a user identity credential that can be used to access the Conjur API. You should remove it after use or otherwise secure it like you would another netrc file.
61
84
 
62
- ## Development
85
+ ## Usage
63
86
 
64
- Create a sandbox environment in Docker using the `./dev` folder:
87
+ ```
88
+ NAME
89
+ conjur - Command-line toolkit for managing roles, resources and privileges
90
+
91
+ SYNOPSIS
92
+ conjur [global options] command [command options] [arguments...]
93
+
94
+ GLOBAL OPTIONS
95
+ --help - Show this message
96
+ --version - Display the program version
97
+ ```
98
+
99
+ ### Commands
100
+
101
+ | Command | Description |
102
+ | ---------------------------------- | ------------------------------------------------- |
103
+ | [authn](#conjur-authn) | - Login and logout |
104
+ | [check](#conjur-check) | - Check for a privilege on a resource |
105
+ | [env](#conjur-env) | - Use values of Conjur variables in local context |
106
+ | [host](#conjur-host) | - Manage hosts |
107
+ | [hostfactory](#conjur-hostfactory) | - Manage host factories |
108
+ | [init](#conjur-init) | - Initialize the Conjur configuration |
109
+ | [ldap-sync](#conjur-ldap-sync) | - LDAP sync management commands |
110
+ | [list](#conjur-list) | - List objects |
111
+ | [plugin](#conjur-plugin) | - Manage plugins |
112
+ | [policy](#conjur-policy) | - Manage policies |
113
+ | [pubkeys](#conjur-pubkeys) | - Public keys service operations |
114
+ | [resource](#conjur-resource) | - Manage resources |
115
+ | [role](#conjur-role) | - Manage roles |
116
+ | [show](#conjur-show) | - Show an object |
117
+ | [user](#conjur-user) | - Manage users |
118
+ | [variable](#conjur-variable) | - Manage variables |
119
+
120
+ #### `conjur authn`
121
+
122
+ ```
123
+ NAME
124
+ authn - Login and logout
125
+ SYNOPSIS
126
+ conjur [global options] authn authenticate [-H|--header] [-f filename|--filename filename]
127
+ conjur [global options] authn login [-p password|--password password] [-u username|--username username] login-name
128
+ conjur [global options] authn logout
129
+ conjur [global options] authn whoami
130
+ COMMANDS
131
+ authenticate - Obtains an authentication token using the current logged-in
132
+ user
133
+ login - Logs in and caches credentials to netrc.
134
+ logout - Logs out
135
+ whoami - Prints out the current logged in username
136
+ ```
137
+
138
+ #### `conjur check`
65
139
 
66
- ```sh-session
67
- $ cd dev
68
- dev $ ./start.sh
140
+ ```
141
+ NAME
142
+ check - Check for a user’s privilege on a resource
143
+ SYNOPSIS
144
+ conjur check [object] [privilege] [user]
145
+ PRIVILEGES
146
+ read, write, execute
69
147
  ```
70
148
 
71
- This will drop you into a bash shell in a container called `cli`.
149
+ #### `conjur env`
72
150
 
73
- The sandbox also includes a Postgres container and Conjur server container. The
74
- environment is already setup to connect the CLI to the server:
151
+ ```
152
+ NAME
153
+ env - Use values of Conjur variables in local context
154
+ SYNOPSIS
155
+ conjur [global options] env check [--policy arg] [--yaml arg] [-c FILE]
156
+ conjur [global options] env help
157
+ conjur [global options] env run [--policy arg] [--yaml arg] [-c FILE] -- command [arg1, arg2 ...]
158
+ conjur [global options] env template [--policy arg] [--yaml arg] [-c FILE] template.erb
75
159
 
76
- * **CONJUR_APPLIANCE_URL** `http://conjur`
77
- * **CONJUR_ACCOUNT** `cucumber`
160
+ COMMANDS
161
+ check - Check availability of Conjur variables
162
+ help - Print description of environment configuration format
163
+ run - Execute external command with environment variables populated
164
+ from Conjur
165
+ template - Render ERB template with variables obtained from Conjur
78
166
 
79
- To login to conjur, type the following and you'll be prompted for a password:
167
+ root@e1bfc649b68d:/# conjur env help
80
168
 
81
- ```sh-session
82
- root@2b5f618dfdcb:/# conjur authn login admin
83
- Please enter admin's password (it will not be echoed):
169
+ Environment configuration (either stored in file referred by -c option or provided inline with --yaml option) should be a YAML document describing one-level Hash.
170
+ Keys of the hash are 'local names', used to refer to variable values in convenient manner. (See help for env:run and env:template for more details about how they are interpreted).
171
+
172
+ Values of the hash may take one of the following forms: a) string b) string preceeded with !var tag c) string preceeded with !tmp tag.
173
+
174
+ a) Plain string is just associated with local name without any calls to Conjur.
175
+
176
+ b) String preceeded by !var tag is interpreted as an ID of the Conjur variable, which value should be obtained and associated with appropriate local name.
177
+
178
+ c) String preceeded by !tmp tag is interpreted as an ID of the Conjur variable, which value should be stored in temporary file, which location should in turn be associated with appropriate local name.
179
+
180
+ Example of environment configuration:
181
+
182
+ { local_variable_1: 'literal value', local_variable_2: !var id/of/Conjur/Variable , local_variable_3: !tmp id/of/another/Conjur/variable }
84
183
  ```
85
184
 
86
- The required password is the API key at the end of the output from the
87
- `start.sh` script. It looks like this:
185
+ #### `conjur host`
88
186
 
89
187
  ```
90
- =============== LOGIN WITH THESE CREDENTIALS ===============
188
+ NAME
189
+ host - Manage hosts
91
190
 
92
- username: admin
93
- api key : 9j113d35wag023rq7tnv201rsym1jg4pev1t1nb4419767ms1cnq00n
191
+ SYNOPSIS
192
+ conjur [global options] host layers HOST
193
+ conjur [global options] host rotate_api_key [--host arg|-h arg]
94
194
 
95
- ============================================================
195
+ COMMANDS
196
+ layers - List the layers to which the host belongs
197
+ rotate_api_key - Rotate a host's API key
96
198
  ```
97
199
 
98
- At this point, you can use any CLI command you like.
200
+ #### `conjur hostfactory`
99
201
 
100
- ### Running Cucumber
202
+ ```
203
+ NAME
204
+ hostfactory - Manage host factories
101
205
 
102
- To install dev packages, run `bundle` from within the container:
206
+ SYNOPSIS
207
+ conjur [global options] hostfactory hosts
208
+ conjur [global options] hostfactory tokens
103
209
 
104
- ```sh-session
105
- root@2b5f618dfdcb:/# cd /usr/src/cli-ruby/
106
- root@2b5f618dfdcb:/usr/src/cli-ruby# bundle
210
+ COMMANDS
211
+ hosts - Operations on hosts
212
+ tokens - Operations on tokens
107
213
  ```
108
214
 
109
- Then you can run the cucumber tests:
215
+ #### `conjur init`
110
216
 
111
- ```sh-session
112
- root@2b5f618dfdcb:/usr/src/cli-ruby# cucumber
113
- ...
217
+ ```
218
+ NAME
219
+ init – Initialize the Conjur configuration
220
+ SYNOPSIS
221
+ conjur [global options] init [-u URL of Conjur service] [-a account name]
114
222
  ```
115
223
 
116
- ## Contributing
224
+ #### `conjur ldap-sync`
225
+
226
+ ```
227
+ NAME
228
+ ldap-sync - LDAP sync management commands
117
229
 
118
- 1. Fork it
119
- 2. Create your feature branch (`git checkout -b my-new-feature`)
120
- 3. Commit your changes (`git commit -am 'Added some feature'`)
121
- 4. Push to the branch (`git push origin my-new-feature`)
122
- 5. Create new Pull Request
230
+ SYNOPSIS
231
+ conjur [global options] ldap-sync policy
123
232
 
124
- ## License
233
+ COMMANDS
234
+ policy - Manage the policy used to sync Conjur and the LDAP server
235
+ ```
236
+
237
+ #### `conjur list`
238
+
239
+ ```
240
+ Lists conjur objects
241
+ ```
242
+
243
+ #### `conjur plugin`
244
+
245
+ ```
246
+ NAME
247
+ plugin - Manage plugins
248
+
249
+ SYNOPSIS
250
+ conjur [global options] plugin install [-v version|--version version] PLUGIN
251
+ conjur [global options] plugin list
252
+ conjur [global options] plugin show PLUGIN
253
+ conjur [global options] plugin uninstall PLUGIN
254
+
255
+ COMMANDS
256
+ install - Install a plugin
257
+ list - List installed plugins
258
+ show - Show a plugin's details
259
+ uninstall - Uninstall a plugin
260
+ ```
261
+
262
+ #### `conjur policy`
263
+
264
+ ```
265
+ NAME
266
+ policy - Manage policies
267
+
268
+ SYNOPSIS
269
+ conjur [global options] policy load [--delete] [--replace] POLICY FILENAME
270
+
271
+ COMMANDS
272
+ load - Load a policy
273
+ --delete – deletes a policy
274
+ --replace – replaces a policy
275
+ ```
276
+
277
+ #### `conjur pubkeys`
278
+
279
+ ```
280
+ NAME
281
+ pubkeys - Public keys service operations
282
+ SYNOPSIS
283
+ conjur [global options] pubkeys [USER]
284
+ ```
285
+
286
+ #### `conjur resource`
287
+
288
+ ```
289
+ NAME
290
+ resource - Manage resources
291
+
292
+ SYNOPSIS
293
+ conjur [global options] resource exists RESOURCE
294
+ conjur [global options] resource permitted_roles RESOURCE PRIVILEGE
295
+
296
+ COMMANDS
297
+ exists - Determines whether a resource exists
298
+ permitted_roles - List roles with a specified privilege on the resource
299
+ ```
300
+
301
+ #### `conjur role`
302
+
303
+ ```
304
+ NAME
305
+ role - Manage roles
306
+
307
+ SYNOPSIS
308
+ conjur [global options] role exists [--json] ROLE
309
+ conjur [global options] role members [-V|--verbose] ROLE
310
+ conjur [global options] role memberships [-s|--system] ROLE
311
+
312
+ COMMANDS
313
+ exists - Determines whether a role exists
314
+ members - Lists all direct members of the role. The membership list is
315
+ not recursively expanded.
316
+ memberships - Lists role memberships. The role membership list is
317
+ recursively expanded.
318
+ ```
319
+
320
+ #### `conjur show`
321
+
322
+ ```
323
+ NAME
324
+ show - Show an object
325
+ SYNOPSIS
326
+ conjur show [object]
327
+ ```
328
+
329
+ #### `conjur user`
330
+
331
+ ```
332
+ NAME
333
+ user - Manage users
334
+
335
+ SYNOPSIS
336
+ conjur [global options] user rotate_api_key [--user arg|-u arg]
337
+ conjur [global options] user update_password [-p arg|--password arg]
338
+
339
+ COMMANDS
340
+ rotate_api_key - Rotate a user's API key
341
+ update_password - Update the password of the logged-in user
342
+ ```
343
+
344
+ #### `conjur variable`
345
+
346
+ ```
347
+ NAME
348
+ variable - Manage variables
349
+
350
+ SYNOPSIS
351
+ conjur [global options] variable value [-v arg|--version arg] VARIABLE
352
+ conjur [global options] variable values
125
353
 
126
- Copyright 2016-2017 CyberArk
354
+ COMMANDS
355
+ value - Get a value
356
+ values - Access variable values
357
+ ```
358
+
359
+ ## Contributing
127
360
 
128
- Licensed under the Apache License, Version 2.0 (the "License");
129
- you may not use this software except in compliance with the License.
130
- You may obtain a copy of the License at
361
+ We welcome contributions of all kinds to this repository. For instructions on how to get started and descriptions of our development workflows, please see our [contributing
362
+ guide][contrib].
131
363
 
132
- http://www.apache.org/licenses/LICENSE-2.0
364
+ [contrib]: https://github.com/cyberark/conjur-cli/blob/main/CONTRIBUTING.md
365
+
366
+ ## License
133
367
 
134
- Unless required by applicable law or agreed to in writing, software
135
- distributed under the License is distributed on an "AS IS" BASIS,
136
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137
- See the License for the specific language governing permissions and
138
- limitations under the License.
368
+ This repository is licensed under Apache License 2.0 - see [`LICENSE`](LICENSE) for more details.