conjur-api 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +6 -0
  4. data/Dockerfile +2 -0
  5. data/Jenkinsfile +2 -8
  6. data/README.md +85 -2
  7. data/Rakefile +9 -3
  8. data/ci/configure_v4.sh +12 -0
  9. data/ci/configure_v5.sh +14 -0
  10. data/conjur-api.gemspec +1 -1
  11. data/docker-compose.yml +47 -12
  12. data/example/demo_v4.rb +49 -0
  13. data/example/demo_v5.rb +57 -0
  14. data/features/authn_local.feature +32 -0
  15. data/features/support/env.rb +1 -0
  16. data/features/variable_value.feature +6 -13
  17. data/features_v4/authn_local.feature +27 -0
  18. data/features_v4/exists.feature +29 -0
  19. data/features_v4/host.feature +18 -0
  20. data/features_v4/host_factory_token.feature +49 -0
  21. data/features_v4/members.feature +39 -0
  22. data/features_v4/permitted.feature +15 -0
  23. data/features_v4/permitted_roles.feature +8 -0
  24. data/features_v4/resource_fields.feature +47 -0
  25. data/features_v4/rotate_api_key.feature +13 -0
  26. data/features_v4/step_definitions/api_steps.rb +17 -0
  27. data/features_v4/step_definitions/result_steps.rb +3 -0
  28. data/features_v4/support/env.rb +23 -0
  29. data/features_v4/support/policy.yml +34 -0
  30. data/features_v4/support/world.rb +12 -0
  31. data/features_v4/variable_fields.feature +11 -0
  32. data/features_v4/variable_value.feature +54 -0
  33. data/lib/conjur-api/version.rb +1 -1
  34. data/lib/conjur/acts_as_resource.rb +3 -17
  35. data/lib/conjur/acts_as_role.rb +2 -4
  36. data/lib/conjur/acts_as_user.rb +1 -2
  37. data/lib/conjur/api.rb +1 -0
  38. data/lib/conjur/api/authn.rb +22 -8
  39. data/lib/conjur/api/host_factories.rb +2 -5
  40. data/lib/conjur/api/policies.rb +1 -1
  41. data/lib/conjur/api/pubkeys.rb +1 -9
  42. data/lib/conjur/api/resources.rb +1 -6
  43. data/lib/conjur/api/router/v4.rb +149 -0
  44. data/lib/conjur/api/router/v5.rb +150 -0
  45. data/lib/conjur/api/variables.rb +2 -8
  46. data/lib/conjur/base.rb +61 -18
  47. data/lib/conjur/base_object.rb +1 -6
  48. data/lib/conjur/configuration.rb +26 -0
  49. data/lib/conjur/group.rb +7 -1
  50. data/lib/conjur/has_attributes.rb +11 -3
  51. data/lib/conjur/host_factory.rb +1 -1
  52. data/lib/conjur/routing.rb +29 -0
  53. data/lib/conjur/user.rb +7 -1
  54. data/lib/conjur/variable.rb +26 -11
  55. data/spec/has_attributes_spec.rb +4 -2
  56. data/test.sh +25 -11
  57. metadata +33 -12
  58. data/ci/wait_for_server.sh +0 -10
  59. data/dev/docker-compose.yml +0 -23
  60. data/dev/empty.yml +0 -2
  61. data/dev/start.sh +0 -15
  62. data/dev/stop.sh +0 -6
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Rzepecki
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-19 00:00:00.000000000 Z
12
+ date: 2017-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -99,16 +99,16 @@ dependencies:
99
99
  name: cucumber
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '0'
104
+ version: '2.99'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ">="
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: '2.99'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: ci_reporter_rspec
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -226,13 +226,13 @@ files:
226
226
  - LICENSE.md
227
227
  - README.md
228
228
  - Rakefile
229
- - ci/wait_for_server.sh
229
+ - ci/configure_v4.sh
230
+ - ci/configure_v5.sh
230
231
  - conjur-api.gemspec
231
- - dev/docker-compose.yml
232
- - dev/empty.yml
233
- - dev/start.sh
234
- - dev/stop.sh
235
232
  - docker-compose.yml
233
+ - example/demo_v4.rb
234
+ - example/demo_v5.rb
235
+ - features/authn_local.feature
236
236
  - features/exists.feature
237
237
  - features/group.feature
238
238
  - features/host.feature
@@ -257,6 +257,22 @@ files:
257
257
  - features/user.feature
258
258
  - features/variable_fields.feature
259
259
  - features/variable_value.feature
260
+ - features_v4/authn_local.feature
261
+ - features_v4/exists.feature
262
+ - features_v4/host.feature
263
+ - features_v4/host_factory_token.feature
264
+ - features_v4/members.feature
265
+ - features_v4/permitted.feature
266
+ - features_v4/permitted_roles.feature
267
+ - features_v4/resource_fields.feature
268
+ - features_v4/rotate_api_key.feature
269
+ - features_v4/step_definitions/api_steps.rb
270
+ - features_v4/step_definitions/result_steps.rb
271
+ - features_v4/support/env.rb
272
+ - features_v4/support/policy.yml
273
+ - features_v4/support/world.rb
274
+ - features_v4/variable_fields.feature
275
+ - features_v4/variable_value.feature
260
276
  - lib/conjur-api.rb
261
277
  - lib/conjur-api/version.rb
262
278
  - lib/conjur/acts_as_resource.rb
@@ -270,6 +286,8 @@ files:
270
286
  - lib/conjur/api/pubkeys.rb
271
287
  - lib/conjur/api/resources.rb
272
288
  - lib/conjur/api/roles.rb
289
+ - lib/conjur/api/router/v4.rb
290
+ - lib/conjur/api/router/v5.rb
273
291
  - lib/conjur/api/variables.rb
274
292
  - lib/conjur/base.rb
275
293
  - lib/conjur/base_object.rb
@@ -296,6 +314,7 @@ files:
296
314
  - lib/conjur/resource.rb
297
315
  - lib/conjur/role.rb
298
316
  - lib/conjur/role_grant.rb
317
+ - lib/conjur/routing.rb
299
318
  - lib/conjur/user.rb
300
319
  - lib/conjur/variable.rb
301
320
  - lib/conjur/webservice.rb
@@ -315,6 +334,7 @@ files:
315
334
  - spec/ssl_spec.rb
316
335
  - spec/vendor/rest_client_spec.rb
317
336
  - test.sh
337
+ - tmp/.keep
318
338
  homepage: https://github.com/cyberark/conjur-api-ruby/
319
339
  licenses:
320
340
  - Apache-2.0
@@ -335,11 +355,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
355
  version: '0'
336
356
  requirements: []
337
357
  rubyforge_project:
338
- rubygems_version: 2.6.13
358
+ rubygems_version: 2.5.2.1
339
359
  signing_key:
340
360
  specification_version: 4
341
361
  summary: Conjur API
342
362
  test_files:
363
+ - features/authn_local.feature
343
364
  - features/exists.feature
344
365
  - features/group.feature
345
366
  - features/host.feature
@@ -1,10 +0,0 @@
1
- #!/bin/bash -e
2
-
3
- for _ in $(seq 20); do
4
- curl -o /dev/null -fs -X OPTIONS http://conjur > /dev/null && break
5
- echo .
6
- sleep 2
7
- done
8
-
9
- # So we fail if the server isn't up yet:
10
- curl -o /dev/null -fs -X OPTIONS http://conjur > /dev/null
@@ -1,23 +0,0 @@
1
- version: '2'
2
- services:
3
- postgres:
4
- image: postgres:9.3
5
-
6
- conjur:
7
- command: server -a cucumber -f /run/empty.yml
8
- environment:
9
- DATABASE_URL: postgres://postgres@pg/postgres
10
- CONJUR_ADMIN_PASSWORD: admin
11
- CONJUR_DATA_KEY:
12
- volumes:
13
- - ./empty.yml:/run/empty.yml:ro
14
-
15
- conjur-cli:
16
- build: ..
17
- entrypoint: sleep
18
- command: infinity
19
- environment:
20
- CONJUR_APPLIANCE_URL: http://conjur
21
- CONJUR_ACCOUNT: cucumber
22
- volumes:
23
- - ..:/src/conjur-api-ruby
@@ -1,2 +0,0 @@
1
- ---
2
- []
@@ -1,15 +0,0 @@
1
- #!/bin/bash -ex
2
-
3
- export COMPOSE_PROJECT_NAME=apirubydev
4
-
5
- docker-compose build
6
-
7
- if [ ! -f data_key ]; then
8
- echo "Generating data key"
9
- docker-compose run --no-deps --rm --entrypoint conjur conjurctl data-key generate > data_key
10
- fi
11
-
12
- export CONJUR_DATA_KEY="$(cat data_key)"
13
-
14
- docker-compose up -d
15
- docker-compose exec cli bash
@@ -1,6 +0,0 @@
1
- #!/bin/bash -ex
2
-
3
- export COMPOSE_PROJECT_NAME=apirubydev
4
-
5
- docker-compose stop
6
- docker-compose rm -f