conjur-api 5.3.8.pre.8 → 5.3.8.pre.194

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +10 -0
  3. data/.dockerignore +1 -0
  4. data/.github/CODEOWNERS +10 -0
  5. data/.gitignore +32 -0
  6. data/.gitleaks.toml +219 -0
  7. data/.overcommit.yml +16 -0
  8. data/.project +18 -0
  9. data/.rubocop.yml +3 -0
  10. data/.rubocop_settings.yml +86 -0
  11. data/.rubocop_todo.yml +709 -0
  12. data/.yardopts +1 -0
  13. data/CHANGELOG.md +435 -0
  14. data/CONTRIBUTING.md +141 -0
  15. data/Dockerfile +16 -0
  16. data/Gemfile +7 -0
  17. data/Jenkinsfile +168 -0
  18. data/LICENSE +202 -0
  19. data/README.md +162 -0
  20. data/Rakefile +47 -0
  21. data/SECURITY.md +42 -0
  22. data/VERSION +1 -1
  23. data/bin/parse-changelog.sh +12 -0
  24. data/ci/configure_v4.sh +12 -0
  25. data/ci/configure_v5.sh +14 -0
  26. data/ci/submit-coverage +36 -0
  27. data/conjur-api.gemspec +40 -0
  28. data/dev/Dockerfile.dev +12 -0
  29. data/dev/docker-compose.yml +56 -0
  30. data/dev/start +22 -0
  31. data/dev/stop +5 -0
  32. data/docker-compose.yml +76 -0
  33. data/example/demo_v4.rb +49 -0
  34. data/example/demo_v5.rb +57 -0
  35. data/features/authenticators.feature +33 -0
  36. data/features/authn_local.feature +32 -0
  37. data/features/exists.feature +37 -0
  38. data/features/group.feature +11 -0
  39. data/features/host.feature +50 -0
  40. data/features/host_factory_create_host.feature +28 -0
  41. data/features/host_factory_token.feature +63 -0
  42. data/features/load_policy.feature +61 -0
  43. data/features/members.feature +51 -0
  44. data/features/new_api.feature +36 -0
  45. data/features/permitted.feature +70 -0
  46. data/features/permitted_roles.feature +30 -0
  47. data/features/public_keys.feature +11 -0
  48. data/features/resource_fields.feature +53 -0
  49. data/features/role_fields.feature +15 -0
  50. data/features/rotate_api_key.feature +13 -0
  51. data/features/step_definitions/api_steps.rb +18 -0
  52. data/features/step_definitions/policy_steps.rb +75 -0
  53. data/features/step_definitions/result_steps.rb +7 -0
  54. data/features/support/env.rb +18 -0
  55. data/features/support/hooks.rb +3 -0
  56. data/features/support/world.rb +12 -0
  57. data/features/update_password.feature +14 -0
  58. data/features/user.feature +58 -0
  59. data/features/variable_fields.feature +20 -0
  60. data/features/variable_value.feature +60 -0
  61. data/features_v4/authn_local.feature +27 -0
  62. data/features_v4/exists.feature +29 -0
  63. data/features_v4/host.feature +18 -0
  64. data/features_v4/host_factory_token.feature +49 -0
  65. data/features_v4/members.feature +39 -0
  66. data/features_v4/permitted.feature +15 -0
  67. data/features_v4/permitted_roles.feature +8 -0
  68. data/features_v4/resource_fields.feature +47 -0
  69. data/features_v4/rotate_api_key.feature +13 -0
  70. data/features_v4/step_definitions/api_steps.rb +17 -0
  71. data/features_v4/step_definitions/result_steps.rb +3 -0
  72. data/features_v4/support/env.rb +23 -0
  73. data/features_v4/support/policy.yml +34 -0
  74. data/features_v4/support/world.rb +12 -0
  75. data/features_v4/variable_fields.feature +11 -0
  76. data/features_v4/variable_value.feature +54 -0
  77. data/lib/conjur/acts_as_resource.rb +123 -0
  78. data/lib/conjur/acts_as_role.rb +142 -0
  79. data/lib/conjur/acts_as_rolsource.rb +32 -0
  80. data/lib/conjur/acts_as_user.rb +68 -0
  81. data/lib/conjur/api/authenticators.rb +35 -0
  82. data/lib/conjur/api/authn.rb +125 -0
  83. data/lib/conjur/api/host_factories.rb +71 -0
  84. data/lib/conjur/api/ldap_sync.rb +38 -0
  85. data/lib/conjur/api/policies.rb +56 -0
  86. data/lib/conjur/api/pubkeys.rb +53 -0
  87. data/lib/conjur/api/resources.rb +109 -0
  88. data/lib/conjur/api/roles.rb +98 -0
  89. data/lib/conjur/api/router/v4.rb +206 -0
  90. data/lib/conjur/api/router/v5.rb +248 -0
  91. data/lib/conjur/api/variables.rb +59 -0
  92. data/lib/conjur/api.rb +105 -0
  93. data/lib/conjur/base.rb +355 -0
  94. data/lib/conjur/base_object.rb +57 -0
  95. data/lib/conjur/build_object.rb +47 -0
  96. data/lib/conjur/cache.rb +26 -0
  97. data/lib/conjur/cert_utils.rb +63 -0
  98. data/lib/conjur/cidr.rb +71 -0
  99. data/lib/conjur/configuration.rb +460 -0
  100. data/lib/conjur/escape.rb +129 -0
  101. data/lib/conjur/exceptions.rb +4 -0
  102. data/lib/conjur/group.rb +41 -0
  103. data/lib/conjur/has_attributes.rb +98 -0
  104. data/lib/conjur/host.rb +27 -0
  105. data/lib/conjur/host_factory.rb +75 -0
  106. data/lib/conjur/host_factory_token.rb +78 -0
  107. data/lib/conjur/id.rb +71 -0
  108. data/lib/conjur/layer.rb +9 -0
  109. data/lib/conjur/log.rb +72 -0
  110. data/lib/conjur/log_source.rb +60 -0
  111. data/lib/conjur/policy.rb +34 -0
  112. data/lib/conjur/policy_load_result.rb +61 -0
  113. data/lib/conjur/query_string.rb +12 -0
  114. data/lib/conjur/resource.rb +29 -0
  115. data/lib/conjur/role.rb +29 -0
  116. data/lib/conjur/role_grant.rb +85 -0
  117. data/lib/conjur/routing.rb +29 -0
  118. data/lib/conjur/user.rb +40 -0
  119. data/lib/conjur/variable.rb +208 -0
  120. data/lib/conjur/webservice.rb +30 -0
  121. data/lib/conjur-api/version.rb +24 -0
  122. data/lib/conjur-api.rb +2 -0
  123. data/publish.sh +5 -0
  124. data/spec/api/host_factories_spec.rb +34 -0
  125. data/spec/api_spec.rb +254 -0
  126. data/spec/base_object_spec.rb +13 -0
  127. data/spec/cert_utils_spec.rb +173 -0
  128. data/spec/cidr_spec.rb +34 -0
  129. data/spec/configuration_spec.rb +330 -0
  130. data/spec/has_attributes_spec.rb +63 -0
  131. data/spec/helpers/errors_matcher.rb +34 -0
  132. data/spec/helpers/request_helpers.rb +10 -0
  133. data/spec/id_spec.rb +29 -0
  134. data/spec/ldap_sync_spec.rb +21 -0
  135. data/spec/log_source_spec.rb +13 -0
  136. data/spec/log_spec.rb +42 -0
  137. data/spec/roles_spec.rb +24 -0
  138. data/spec/spec_helper.rb +113 -0
  139. data/spec/ssl_spec.rb +109 -0
  140. data/spec/uri_escape_spec.rb +21 -0
  141. data/test.sh +73 -0
  142. data/tmp/.keep +0 -0
  143. metadata +191 -21
data/CHANGELOG.md ADDED
@@ -0,0 +1,435 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## Unreleased
8
+ ### Changed
9
+ - Nothing should go in this section, please add to the latest unreleased version
10
+ (and update the corresponding date), or add a new version.
11
+
12
+ ## [5.3.8] - 2022-01-31
13
+
14
+ ## [5.3.7] - 2021-12-28
15
+
16
+ ### Changed
17
+ - Change addressable gem dependency.
18
+ [cyberark/conjur-api-ruby#199](https://github.com/cyberark/conjur-api-ruby/pull/199)
19
+ - Update to use automated release process
20
+
21
+ ## [5.3.6] - 2021-12-09
22
+
23
+ ### Changed
24
+ - Support ruby-3.0.2.
25
+ [cyberark/conjur-api-ruby#197](https://github.com/cyberark/conjur-api-ruby/pull/197)
26
+
27
+ ## [5.3.5] - 2021-05-04
28
+
29
+ ### Added
30
+ - Add `rest_client_options` option to `Conjur.configuration`. This allows users to
31
+ configure the RestClient instance used by Conjur API to communicate with the Conjur
32
+ server.
33
+ [cyberark/conjur-api-ruby#188](https://github.com/cyberark/conjur-api-ruby/issues/188)
34
+
35
+ ### Changed
36
+ - Replace monkey patching `RestClient::Request` with defaults on `Conjur.configuration.rest_client_options`
37
+ in order to limit the scope of the default `:ssl_cert_store` option only to inside
38
+ Conjur API.
39
+ [cyberark/conjur-api-ruby#188](https://github.com/cyberark/conjur-api-ruby/issues/188)
40
+
41
+ ## [5.3.4] - 2020-10-29
42
+
43
+ ### Changed
44
+ - When rotating the currently logged in user's/host's API key, we now explictily
45
+ prevent use of `resource({own_id}).rotate_api_key` for that action as the
46
+ `Conjur::API.rotate_api_key` should be used instead for that. This change is a
47
+ downstream enforcement of the stricter key rotation requirements on the server
48
+ covered by [this](https://github.com/cyberark/conjur/security/advisories/GHSA-qhjf-g9gm-64jq)
49
+ security bulletin.
50
+ [cyberark/conjur-api-ruby#181](https://github.com/cyberark/conjur-api-ruby/issues/181)
51
+
52
+ ## [5.3.3] - 2020-08-18
53
+ ### Changed
54
+ - Release process is updated to ensure that the published Ruby Gem matches a tag in this repository,
55
+ so that consumers of this gem can always reference the correct source code included in any given version.
56
+ [cyberark/conjur-api-ruby#173](https://github.com/cyberark/conjur-api-ruby/issues/173)
57
+
58
+ ## 5.3.2 - 2018-09-24
59
+ ### Added
60
+ - Add `Conjur::API.authenticator_list`, `Conjur::API.authenticator_enable`, and
61
+ ``Conjur::API.authenticator_disable` to inspect and manage authenticator status.
62
+
63
+ ## [5.3.1] - 2018-09-24
64
+ ### Added
65
+ - Updates URI path parameter escaping to consistently encode resource ids
66
+
67
+ ## [5.3.0] - 2018-06-19
68
+ ### Added
69
+ - Add `Conjur::API.ldap_sync_policy` for fetching the LDAP sync policy.
70
+
71
+ ## 5.2.1 - 0000-00-00
72
+ ### Fixed
73
+ - Fix `Conjur::BuildObject#build_object` so it only tries to create
74
+ instances of objects for classes that inherit from BaseObject.
75
+
76
+ ### Added
77
+ - require `openssl` before using it.
78
+
79
+ ## 5.2.0 - 0000-00-00
80
+ ### Added
81
+ - Adds support for the Role endpoint for searching and paging Role Members
82
+ - Adds additional escaping to URL parameters on requests to handle special characters (e.g. spaces)
83
+
84
+ ## [5.1.0] - 2017-12-19
85
+ ### Added
86
+ - Introduces backwards compatibility with Conjur 4.x for most API methods.
87
+ - Adds the configuration setting `version`, which is auto-populated from the environment variable `CONJUR_VERSION`.
88
+ - Adds support for the `authn-local` service, which can be used when the API client runs on the server.
89
+
90
+ ## [5.0.0] - 2017-09-19
91
+ ### Added
92
+ - Provides compatibility with [cyberark/conjur](https://github.com/cyberark/conjur), Conjur 5 CE.
93
+
94
+ ### Changed
95
+ - Changed license to Apache 2.0
96
+ - *5.0.0-beta.4*
97
+ - - Support for batch secret retrieval.
98
+ - *v5.0.0-beta.3*
99
+ - - Removed hard dependency on older version of `rest-client` gem.
100
+ - *v5.0.0-beta.1*
101
+ - - Migrated to be compatible with Conjur 5 API.
102
+
103
+ ## [4.31.0] - 2017-03-27
104
+ ### Added
105
+ - Internal refactor to improve performance and facilitate caching.
106
+
107
+ ## [4.30.0] - 2017-03-07
108
+ ### Added
109
+ - The following enhancements require Conjur server 4.9.1.0 or later:
110
+ - Supports filter and pagination of role-listing methods.
111
+ - Supports non-recursive retrieval of role memberships.
112
+ - Supports the +role+ field on `Conjur::RoleGrant`.
113
+ - On older server versions, the new options will be ignored by the server.
114
+
115
+ ## [4.29.2] - 2017-02-22
116
+ ### Added
117
+ - `Conjur::API#resources` now supports `:owner` to retrieve all resources owned (directly or indirectly) by the indicated role. This capability has always been provided by the service, but was not exposed by the Ruby API.
118
+
119
+ ## 4.29.1 - 0000-00-00
120
+ ### Added
121
+ - `Conjur::API#audit` now supports `:has_annotation` to retrieve audit events for resources annotated with the given name.
122
+
123
+ ## [4.29.0] - 2017-02-01
124
+ ### Added
125
+ - Add `Conjur::API#new_from_token_file` to create an API instance from a file which contains an access token, which should be periodically updated by another process.
126
+
127
+ ## 4.28.2 - 0000-00-00
128
+ ### Added
129
+ - Make sure certificate file is readable before trying to use it.
130
+
131
+ ## [4.28.1] - 2016-11-30
132
+ ### Added
133
+ - `Conjur::API#ldap_sync_policy` now returns log events generated when
134
+ showing a policy.
135
+
136
+ ## [4.28.0] - 2016-11-16
137
+ ### Added
138
+ - Add `Conjur::API#ldap_sync_policy` to fetch the policy to use to
139
+ bring Conjur and the LDAP server into sync.
140
+
141
+ ### Removed
142
+ - Remove `Conjur::API#ldap_sync_now` and `Conjur::API#ldap_sync_jobs`
143
+
144
+ ## 4.27.0 - 0000-00-00
145
+ ### Added
146
+ - Add `Conjur::API#resources_permitted?"
147
+ - `Conjur::API#ldap_sync_now` now accepts an options Hash which will
148
+ be passed on to the `/sync` entrypoint. The old argument list is
149
+ maintained for backwards compatibility.
150
+ - `Conjur::Api#resources` now supports `:has_annotation` for
151
+ retrieving Conjur resources that have an annotation with the given
152
+ name.
153
+
154
+ ## [4.26.0] - 2016-07-01
155
+ ### Added
156
+ - expose admin_option in the role graph (only populated by Conjur 4.8 and later)
157
+
158
+ ## [4.25.1] - 2016-06-22
159
+ ### Fixed
160
+ - Fix token refresh when using `with_privilege`, `with_audit_roles`,
161
+ and `with_audit_resources`.
162
+
163
+ ## [4.25.0] - 2016-06-17
164
+ ### Added
165
+ - Add a workaround for a bug in Conjur <4.7 where long-running operations
166
+ (such as policy load) would sometimes fail with 404 after five minutes.
167
+
168
+ ## [4.24.1] - 2016-06-10
169
+ ### Changed
170
+ - Clarify the handling of the dry-run argument to `Conjur::API#ldap_sync_now`.
171
+
172
+ ## [4.24.0] - 2016-05-24
173
+ ### Added
174
+ - Add `Conjur::API#ldap_sync_now` (requires Conjur 4.7 or later).
175
+ - Don't trust the system clock and don't check token validity. Rely on the server to verify the token instead, and only try to refresh if enough time has passed locally (using monotonic clock for reference where available).
176
+ - Don't try refreshing the token if the required credentials are not available.
177
+
178
+ ## [4.23.0] - 2016-04-22
179
+ ### Added
180
+ - Add `with_audit_roles` and `with_audit_resources` to `Conjur::API`
181
+ to add additional roles and resources to audit records generated by
182
+ requests
183
+
184
+ ### Fixed
185
+ - Fix encoding of spaces in some urls.
186
+
187
+ ## [4.22.1] - 2016-04-13
188
+ ### Added
189
+ - `bootstrap` creates host and webservice `conjur/expiration`.
190
+
191
+ ## [4.22.0] - 2016-03-08
192
+ ### Added
193
+ - Add `show_expired` argument to `Conjur::Variable#value` to allow
194
+ retrieval of values of expired variables.
195
+ - Properly assign ownership of bootstrap-created webservice resources to the `security_admin` group.
196
+
197
+ ## [4.21.0] - 2016-03-02
198
+ ### Added
199
+ - Add extensible Bootstrap commands as API methods.
200
+ - `bootstrap` grants `reveal` and `elevate` to the `security_admin` group.
201
+ - `bootstrap` creates `webservice:authn-tv`.
202
+ - `bootstrap` creates an `auditors` group and gives `reveal` privilege to it.
203
+
204
+ ## [4.20.1] - 2016-02-18
205
+ ### Fixed
206
+ - BUGFIX: Better handling for unicode and special characters in user ids.
207
+
208
+ ## [4.20.0] - 2016-02-05
209
+ ### Added
210
+ - Add support for Host Factory functionality (replaces conjur-asset-host-factory plugin).
211
+ - Add support for sending audit events (replaces conjur-asset-audit-send plugin).
212
+ - Add support for variable expiration. Variable expiration is available in version 4.6 of the Conjur server.
213
+ - Add `Conjur::API` methods to querying service versions : `service_version`, `service_names`, `appliance_info`.
214
+ - Add `Conjur::API` method for querying server health: `appliance_health(remote_host=nil)`
215
+ - Support ISO8601 duration strings as arguments in variable expiration methods.
216
+ - Add support for CIDR restrictions
217
+
218
+ ## 4.19.1 - 0000-00-00
219
+ ### Fixed
220
+ - BUGFIX: Allow Configuration to parse several certs in a string
221
+
222
+ ## [4.19.0] - 2015-08-28
223
+ ### Changed
224
+ - Rename `sudo` to `elevate` throughout the spec and docstrings. This is an incompatible change, but it occurs before the Conjur 4.5 server that implements `elevate` is released.
225
+
226
+ ## 4.18.0 - 0000-00-00
227
+ ### Added
228
+ - Add method `global_privilege_permitted?` to facilitate working with Conjur 4.5 global privileges.
229
+
230
+ ## 4.17.0 - 0000-00-00
231
+ ### Added
232
+ - Add handling for `X-Forwarded-For` and `X-Conjur-Privilege` ("conjur sudo")
233
+ - Transform embedded whitespace in certificate string into newlines
234
+
235
+ ## [4.16.0] - 2015-04-28
236
+ ### Added
237
+ - Add ssl_certificate option to allow certs to be provided as strings (helpful in heroku)
238
+ - Add `Conjur::Configuration#apply_cert_config!` method to add certs from `#cert_file` and `#ssl_certificate` to the default cert store.
239
+
240
+ ## [4.15.0] - 2015-04-23
241
+ ### Added
242
+ - Extensive documentation improvements
243
+ - A few additional methoods, for example `Conjur::API#public_key_names`.
244
+
245
+ ## [4.14.0] - 2015-03-26
246
+ ### Added
247
+ - Bump rest-client version, remove the troublesome mime-types patch
248
+ - Make sure SSL certificate verification is enabled
249
+ - Bugfix: Don't escape ids twice when listing records
250
+ - Add a stub so that require 'conjur-api' works
251
+ - Lots of doc updates
252
+
253
+ ## [4.13.0] - 2015-02-11
254
+ ### Added
255
+ - Add GID handling utilities
256
+
257
+ ## [4.12.0] - 2015-01-27
258
+ ### Added
259
+ - Add the API method `role_graph` for retrieving role relationships in bulk
260
+
261
+ ## 4.11.2 - 0000-00-00
262
+ ### Added
263
+ - Patch rest-client's patch of mime-types to support lazy loading
264
+
265
+ ### Removed
266
+ - Remove 'wrong' dependency for faster loading
267
+
268
+ ## 4.11.0 - 0000-00-00
269
+ ### Fixed
270
+ - Fixed bug retrieving `Variable#version_count`
271
+ - Include CONJUR_ENV in `Conjur.configuration`
272
+
273
+ ### Added
274
+ - Add `cert_file` option to `Conjur.configuration`
275
+
276
+ ## [4.10.2] - 2014-09-22
277
+ ### Added
278
+ - Authn token is refetched before the expiration
279
+ - Support for configuration `sticky` option is discarded
280
+ - Resource#exists? refactored -- no overloading, code from exists.rb used
281
+ - Tests use Rspec v3 and reset configuration between test cases
282
+
283
+ ## [4.10.1] - 2014-09-04
284
+ ### Added
285
+ - Resource#exists? returns true if access to resource is forbidden
286
+ - Thread-local configuration for working with different endpoints
287
+
288
+ ## [4.10.0] - 2014-08-15
289
+ ### Added
290
+ - User#update
291
+ - Added Users#find_users
292
+
293
+ ## [4.9.2] - 2014-08-05
294
+ ### Changed
295
+ - Always construct Heroku service names that are valid Heroku names
296
+ - authz resource#exists? anticipates a result of 403 Forbidden, and interprets this as true
297
+ - Provide a method to detect whether each configuration setting has been explicitly set via the environment
298
+
299
+ ## [4.9.1] - 2014-07-17
300
+ ### Changed
301
+ - Require rest-client gem version 1.6.7, as version 1.7 has bugs in SSL certificate trust options
302
+
303
+ ## [4.9.0] - 2014-06-06
304
+ ### Changed
305
+ - Layer and Pubkeys are now part of the core API
306
+
307
+ ## [4.8.0] - 2014-05-23
308
+ ### Added
309
+ - Variable#variable_values, batch fetching of variables to support the new conjur env command
310
+
311
+ ## [4.7.2] - 2014-03-18
312
+
313
+ ## [4.7.1] - 2014-03-13
314
+
315
+ ## [4.6.1] - 2014-02-28
316
+
317
+ ## [4.6.0] - 2014-01-11
318
+
319
+ ## [4.4.1] - 2013-12-23
320
+
321
+ ## [4.4.0] - 2013-12-23
322
+
323
+ ## [4.3.0] - 2013-11-19
324
+
325
+ ## [4.1.1] - 2013-10-24
326
+
327
+ ## [2.7.1] - 2013-10-24
328
+
329
+ ## [4.0.0] - 2013-10-17
330
+
331
+ ## [2.5.1] - 2013-07-26
332
+
333
+ ## [2.4.0] - 2013-06-05
334
+
335
+ ## [2.3.1] - 2013-06-03
336
+
337
+ ## [2.2.3] - 2013-05-31
338
+
339
+ ## [2.2.2] - 2013-05-23
340
+
341
+ ## [2.2.1] - 2013-05-20
342
+
343
+ ## [2.2.0] - 2013-05-16
344
+
345
+ ## [2.1.8] - 2013-05-15
346
+
347
+ ## [2.1.7] - 2013-05-10
348
+
349
+ ## [2.1.6] - 2013-04-30
350
+
351
+ ## [2.1.5] - 2013-04-24
352
+
353
+ ## [2.1.4] - 2013-04-24
354
+
355
+ ## [2.1.3] - 2013-04-12
356
+
357
+ ## [2.1.2] - 2013-04-12
358
+
359
+ ## [2.1.1] - 2013-03-29
360
+
361
+ ## [2.1.0] - 2013-03-25
362
+
363
+ ## [2.0.1] - 2013-03-14
364
+
365
+ ## [2.0.0] - 2013-13-12
366
+
367
+ [Unreleased]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.6...HEAD
368
+ [5.3.7]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.6...v5.3.7
369
+ [5.3.6]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.5...v5.3.6
370
+ [5.3.5]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.4...v5.3.5
371
+ [5.3.4]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.3...v5.3.4
372
+ [5.3.3]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.1...v5.3.3
373
+ [5.3.1]: https://github.com/cyberark/conjur-api-ruby/compare/v5.3.0...v5.3.1
374
+ [5.3.0]: https://github.com/cyberark/conjur-api-ruby/compare/v5.1.0...v5.3.0
375
+ [5.1.0]: https://github.com/cyberark/conjur-api-ruby/compare/v5.0.0...v5.1.0
376
+ [5.0.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.31.0...v5.0.0
377
+ [4.31.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.30.0...v4.31.0
378
+ [4.30.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.29.2...v4.30.0
379
+ [4.29.2]: https://github.com/cyberark/conjur-api-ruby/compare/v4.29.0...v4.29.2
380
+ [4.29.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.28.1...v4.29.0
381
+ [4.28.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.28.0...v4.28.1
382
+ [4.28.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.26.0...v4.28.0
383
+ [4.26.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.25.1...v4.26.0
384
+ [4.25.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.25.0...v4.25.1
385
+ [4.25.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.24.1...v4.25.0
386
+ [4.24.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.24.0...v4.24.1
387
+ [4.24.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.23.0...v4.24.0
388
+ [4.23.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.22.1...v4.23.0
389
+ [4.22.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.22.0...v4.22.1
390
+ [4.22.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.21.0...v4.22.0
391
+ [4.21.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.20.1...v4.21.0
392
+ [4.20.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.20.0...v4.20.1
393
+ [4.20.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.19.1...v4.20.0
394
+ [4.19.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.19.0...v4.19.1
395
+ [4.19.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.16.0...v4.19.0
396
+ [4.16.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.15.0...v4.16.0
397
+ [4.15.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.14.0...v4.15.0
398
+ [4.14.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.13.0...v4.14.0
399
+ [4.13.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.12.0...v4.13.0
400
+ [4.12.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.10.2...v4.12.0
401
+ [4.10.2]: https://github.com/cyberark/conjur-api-ruby/compare/v4.10.1...v4.10.2
402
+ [4.10.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.10.0...v4.10.1
403
+ [4.10.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.9.2...v4.10.0
404
+ [4.9.2]: https://github.com/cyberark/conjur-api-ruby/compare/v4.9.1...v4.9.2
405
+ [4.9.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.9.0...v4.9.1
406
+ [4.9.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.8.0...v4.9.0
407
+ [4.8.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.7.2...v4.8.0
408
+ [4.7.2]: https://github.com/cyberark/conjur-api-ruby/compare/v4.7.1...v4.7.2
409
+ [4.7.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.6.1...v4.7.1
410
+ [4.6.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.6.0...v4.6.1
411
+ [4.6.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.4.1...v4.6.0
412
+ [4.4.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.4.0...v4.4.1
413
+ [4.4.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.3.0...v4.4.0
414
+ [4.3.0]: https://github.com/cyberark/conjur-api-ruby/compare/v4.1.1...v4.3.0
415
+ [4.1.1]: https://github.com/cyberark/conjur-api-ruby/compare/v2.7.1...v4.1.1
416
+ [2.7.1]: https://github.com/cyberark/conjur-api-ruby/compare/v4.0.0...v2.7.1
417
+ [4.0.0]: https://github.com/cyberark/conjur-api-ruby/compare/v2.5.1...v4.0.0
418
+ [2.5.1]: https://github.com/cyberark/conjur-api-ruby/compare/v2.4.0...v2.5.1
419
+ [2.4.0]: https://github.com/cyberark/conjur-api-ruby/compare/v2.3.1...v2.4.0
420
+ [2.3.1]: https://github.com/cyberark/conjur-api-ruby/compare/v2.2.3...v2.3.1
421
+ [2.2.3]: https://github.com/cyberark/conjur-api-ruby/compare/v2.2.2...v2.2.3
422
+ [2.2.2]: https://github.com/cyberark/conjur-api-ruby/compare/v2.2.1...v2.2.2
423
+ [2.2.1]: https://github.com/cyberark/conjur-api-ruby/compare/v2.2.0...v2.2.1
424
+ [2.2.0]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.8...v2.2.0
425
+ [2.1.8]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.7...v2.1.8
426
+ [2.1.7]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.6...v2.1.7
427
+ [2.1.6]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.5...v2.1.6
428
+ [2.1.5]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.4...v2.1.5
429
+ [2.1.4]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.3...v2.1.4
430
+ [2.1.3]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.2...v2.1.3
431
+ [2.1.2]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.1...v2.1.2
432
+ [2.1.1]: https://github.com/cyberark/conjur-api-ruby/compare/v2.1.0...v2.1.1
433
+ [2.1.0]: https://github.com/cyberark/conjur-api-ruby/compare/v2.0.1...v2.1.0
434
+ [2.0.1]: https://github.com/cyberark/conjur-api-ruby/compare/v2.0.0...v2.0.1
435
+ [2.0.0]: https://github.com/cyberark/conjur-api-ruby/releases/tag/v2.0.0
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,141 @@
1
+ # Contributing
2
+
3
+ For general contribution and community guidelines, please see the [community repo](https://github.com/cyberark/community).
4
+
5
+ ## Contributing
6
+
7
+ 1. [Fork the project](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
8
+ 2. [Clone your fork](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
9
+ 3. Make local changes to your fork by editing files
10
+ 3. [Commit your changes](https://help.github.com/en/github/managing-files-in-a-repository/adding-a-file-to-a-repository-using-the-command-line)
11
+ 4. [Push your local changes to the remote server](https://help.github.com/en/github/using-git/pushing-commits-to-a-remote-repository)
12
+ 5. [Create new Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
13
+
14
+ From here your pull request will be reviewed and once you've responded to all
15
+ feedback it will be merged into the project. Congratulations, you're a
16
+ contributor!
17
+
18
+
19
+ ## Development (V5)
20
+ To develop and run tests against Conjur V5, use the `start` and `stop` scripts in the `dev` folder. The start script brings up an open source Conjur (and Postgres database), CLI container, and a "work" container, with the gem code mounted into the working directory.
21
+
22
+ ### Starting a Shell
23
+ To begin:
24
+ ```sh
25
+ $ cd dev
26
+ $ ./start
27
+ ...
28
+ root@9df0ac10ada2:/src/conjur-api#
29
+ ```
30
+ You'll be dropped into development container upon completion. From there, install the development gems:
31
+
32
+ ```sh
33
+ root@9df0ac10ada2:/src/conjur-api# bundle
34
+ ```
35
+
36
+ #### Running Tests
37
+ *NOTE*: There are some existing challenges around running tests from the development console. For now, run tests
38
+ by using the `./test.sh` script utilized for Jenkins Pipelines.
39
+
40
+ <!--
41
+ Commented out until I can get tests running locally
42
+
43
+ Tests can be run with:
44
+ ```sh
45
+ root@9df0ac10ada2:/src/conjur-api# bundle exec cucumber features
46
+ root@9df0ac10ada2:/src/conjur-api# bundle exec rspec
47
+ ```
48
+ -->
49
+
50
+ #### Stopping & Environment Cleanup
51
+ Once you're done, exit the shell, and stop the containers:
52
+
53
+ ```sh
54
+ root@9df0ac10ada2:/src/conjur-api# exit
55
+ $ ./stop
56
+ ```
57
+
58
+ ## Development (V4)
59
+
60
+ The file `docker-compose.yml` is a self-contained development environment for the project.
61
+
62
+ ### Starting
63
+
64
+ To bring it up, run:
65
+
66
+ ```sh-session
67
+ $ docker-compose build
68
+ $ docker-compose up -d pg conjur_4 conjur_5
69
+ ```
70
+
71
+ Then configure the v4 and v5 servers:
72
+
73
+ ```sh-session
74
+ $ ./ci/configure_v4.sh
75
+ ...
76
+ $ ./ci/configure_v5.sh
77
+ ...
78
+ ```
79
+
80
+ ### Using
81
+
82
+ Obtain the API key for the v5 admin user:
83
+
84
+ ```
85
+ $ docker-compose exec conjur_5 rake 'role:retrieve-key[cucumber:user:admin]'
86
+ 3aezp05q3wkem3hmegymwzz8wh3bs3dr6xx3y3m2q41k5ymebkc
87
+ ```
88
+
89
+ The password of the v4 admin user is "secret".
90
+
91
+ Now you can run the client `dev` container:
92
+
93
+ ```sh-session
94
+ $ docker-compose run --rm dev
95
+ ```
96
+
97
+ This gives you a shell session with `conjur_4` and `conjur_5` available as linked containers.
98
+
99
+ ### Demos
100
+
101
+ For a v5 demo, run:
102
+
103
+ ```sh-session
104
+ $ bundle exec ./example/demo_v5.rb <admin-api-key>
105
+ ```
106
+
107
+ For a v4 demo, run:
108
+
109
+ ```sh-session
110
+ $ bundle exec ./example/demo_v4.rb
111
+ ```
112
+
113
+ ### Stopping
114
+
115
+ To bring it down, run:
116
+
117
+ ```sh-session
118
+ $ docker-compose down
119
+ ```
120
+
121
+ ## Releasing
122
+
123
+ ### Update the version and changelog
124
+
125
+ 1. Create a new branch for the version bump.
126
+ 1. Based on the unreleased content, determine the new version number and update
127
+ the [version.rb](lib/conjur-api/version.rb) file.
128
+ 1. Commit these changes - `Bump version to x.y.z` is an acceptable commit message - and open a PR
129
+ for review. Your PR should include updates to `lib/conjur-api/version.rb`, and
130
+ `CHANGELOG.md`.
131
+
132
+ ### Add a git tag
133
+
134
+ 1. Once your changes have been **reviewed and merged into main**, tag the version
135
+ using `git tag -a "vx.y.z" -m "vx.y.z release"`. Note this requires you to be able to sign releases.
136
+ Consult the [github documentation on signing commits](https://help.github.com/articles/signing-commits-with-gpg/)
137
+ on how to set this up. `vx.y.z release` is an acceptable tag message.
138
+ 1. Push the tag: `git push vx.y.z` (or `git push origin vx.y.z` if you are working
139
+ from your local machine).
140
+
141
+ After pushing the tag, a matching version will be published to [RubyGems](https://rubygems.org/gems/conjur-api/versions)!
data/Dockerfile ADDED
@@ -0,0 +1,16 @@
1
+ ARG RUBY_VERSION
2
+ FROM ruby:$RUBY_VERSION
3
+
4
+ RUN apt-get update && apt-get install -y vim curl
5
+
6
+ WORKDIR /src/conjur-api
7
+
8
+ COPY Gemfile conjur-api.gemspec VERSION ./
9
+ COPY lib/conjur-api/version.rb ./lib/conjur-api/
10
+
11
+ RUN bundle
12
+
13
+ COPY . ./
14
+
15
+ ENTRYPOINT ["/usr/local/bin/bundle", "exec"]
16
+ CMD ["rake", "jenkins"]
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ #ruby=ruby-3.0
4
+ #ruby-gemset=conjur-api
5
+
6
+ # Specify your gem's dependencies in conjur-api.gemspec
7
+ gemspec