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