conjur-cli 5.6.6 → 6.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.dockerignore +1 -1
- data/.gitignore +2 -0
- data/.rubocop.yml +1 -1
- data/APPLIANCE_VERSION +1 -1
- data/CHANGELOG.md +3 -42
- data/Gemfile +4 -7
- data/Humanfile.md +31 -0
- data/Jenkinsfile +34 -63
- data/README.md +41 -55
- data/Rakefile +5 -1
- data/bin/conjur +0 -2
- data/build-deb.sh +1 -3
- data/ci/cli-test.sh +6 -0
- data/ci/package.sh +3 -1
- data/ci/publish.sh +2 -2
- data/ci/secrets/publish.yml +2 -2
- data/ci/wait_for_server.sh +10 -0
- data/conjur-cli.gemspec +7 -7
- data/dev/docker-compose.yml +24 -0
- data/dev/start.sh +15 -0
- data/dev/stop.sh +5 -0
- data/docker-compose.yml +30 -0
- data/features/authentication/authenticate.feature +34 -0
- data/features/authentication/login.feature +13 -0
- data/features/authentication/logout.feature +15 -0
- data/{acceptance-features → features}/authentication/whoami.feature +0 -0
- data/features/authorization/resource/annotate.feature +22 -0
- data/features/authorization/resource/check.feature +47 -0
- data/{acceptance-features → features}/authorization/resource/exists.feature +18 -6
- data/features/authorization/resource/permitted_roles.feature +35 -0
- data/features/authorization/resource/show.feature +34 -0
- data/features/authorization/role/exists.feature +28 -0
- data/features/authorization/role/members.feature +45 -0
- data/features/authorization/role/memberships.feature +43 -0
- data/features/conjurenv/check.feature +34 -0
- data/features/conjurenv/run.feature +15 -0
- data/{acceptance-features → features}/conjurenv/template.feature +8 -3
- data/{acceptance-features → features}/directory/user/update_password.feature +8 -2
- data/{acceptance-features → features}/directory/variable/value.feature +9 -5
- data/{acceptance-features → features}/directory/variable/values-add.feature +8 -3
- data/features/hostfactory/tokens.feature +22 -0
- data/features/pubkeys/show.feature +18 -0
- data/features/step_definitions/authn_steps.rb +22 -0
- data/features/step_definitions/cli_steps.rb +28 -0
- data/features/step_definitions/file_steps.rb +12 -0
- data/features/step_definitions/flow_control_steps.rb +7 -0
- data/features/step_definitions/graph_steps.rb +4 -3
- data/{acceptance-features → features}/step_definitions/http_steps.rb +0 -0
- data/features/step_definitions/overrides.rb +9 -0
- data/features/step_definitions/policy_steps.rb +11 -0
- data/{acceptance-features → features}/step_definitions/trusted_proxy_steps.rb +0 -0
- data/features/support/blank.yml +1 -0
- data/features/support/env.rb +21 -7
- data/features/support/hooks.rb +31 -116
- data/features/support/world.rb +16 -76
- data/jenkins.sh +33 -0
- data/lib/conjur/authenticator.rb +83 -0
- data/lib/conjur/authn.rb +5 -20
- data/lib/conjur/cli.rb +13 -6
- data/lib/conjur/command.rb +30 -350
- data/lib/conjur/command/authn.rb +23 -15
- data/lib/conjur/command/host_factories.rb +2 -74
- data/lib/conjur/command/hosts.rb +6 -113
- data/lib/conjur/command/init.rb +20 -35
- data/lib/conjur/command/{secrets.rb → policies.rb} +33 -22
- data/lib/conjur/command/pubkeys.rb +3 -63
- data/lib/conjur/command/resources.rb +45 -162
- data/lib/conjur/command/roles.rb +11 -181
- data/lib/conjur/command/rspec/helpers.rb +0 -1
- data/lib/conjur/command/rspec/mock_services.rb +4 -4
- data/lib/conjur/command/users.rb +2 -159
- data/lib/conjur/command/variables.rb +5 -218
- data/lib/conjur/complete.rb +2 -2
- data/lib/conjur/config.rb +1 -11
- data/lib/conjur/conjurenv.rb +12 -9
- data/lib/conjur/identifier_manipulation.rb +3 -5
- data/lib/conjur/version.rb +2 -2
- data/{publish-rubygem.sh → publish.sh} +0 -4
- data/spec/authn_spec.rb +4 -0
- data/spec/command/hosts_spec.rb +2 -69
- data/spec/command/init_spec.rb +16 -11
- data/spec/command/pubkeys_spec.rb +1 -46
- data/spec/command/resources_spec.rb +21 -170
- data/spec/command/roles_spec.rb +5 -181
- data/spec/command/users_spec.rb +3 -79
- data/spec/command_spec.rb +1 -20
- data/spec/complete_spec.rb +1 -23
- data/spec/config_spec.rb +1 -1
- data/spec/spec_helper.rb +4 -5
- data/test.sh +29 -25
- metadata +92 -212
- data/.githooks/pre_commit/run_specs.rb +0 -23
- data/Dockerfile +0 -15
- data/Dockerfile.fpm +0 -18
- data/Dockerfile.publish +0 -12
- data/Dockerfile.standalone +0 -33
- data/Dockerfile.validate-packaging +0 -9
- data/VERSION +0 -1
- data/acceptance-features/audit/audit_event_send.feature +0 -107
- data/acceptance-features/audit/fetch.feature +0 -16
- data/acceptance-features/audit/send.feature +0 -51
- data/acceptance-features/authentication/authenticate.feature +0 -10
- data/acceptance-features/authentication/login.feature +0 -12
- data/acceptance-features/authentication/logout.feature +0 -13
- data/acceptance-features/authorization/resource/annotate.feature +0 -35
- data/acceptance-features/authorization/resource/check.feature +0 -24
- data/acceptance-features/authorization/resource/create.feature +0 -21
- data/acceptance-features/authorization/resource/deny.feature +0 -12
- data/acceptance-features/authorization/resource/give.feature +0 -24
- data/acceptance-features/authorization/resource/permit.feature +0 -20
- data/acceptance-features/authorization/resource/permitted_roles.feature +0 -16
- data/acceptance-features/authorization/resource/show.feature +0 -28
- data/acceptance-features/authorization/role/create.feature +0 -13
- data/acceptance-features/authorization/role/exists.feature +0 -19
- data/acceptance-features/authorization/role/grant_to.feature +0 -21
- data/acceptance-features/authorization/role/graph.feature +0 -57
- data/acceptance-features/authorization/role/members.feature +0 -23
- data/acceptance-features/authorization/role/memberships.feature +0 -27
- data/acceptance-features/bootstrap.feature +0 -13
- data/acceptance-features/conjurenv/check.feature +0 -21
- data/acceptance-features/conjurenv/run.feature +0 -10
- data/acceptance-features/directory/group/create.feature +0 -20
- data/acceptance-features/directory/group/retire.feature +0 -54
- data/acceptance-features/directory/host/create.feature +0 -23
- data/acceptance-features/directory/host/retire.feature +0 -6
- data/acceptance-features/directory/hostfactory/create.feature +0 -28
- data/acceptance-features/directory/hostfactory/tokens.feature +0 -16
- data/acceptance-features/directory/layer/create.feature +0 -10
- data/acceptance-features/directory/layer/hosts-add.feature +0 -9
- data/acceptance-features/directory/layer/hosts-remove.feature +0 -10
- data/acceptance-features/directory/layer/retire.feature +0 -43
- data/acceptance-features/directory/user/create.feature +0 -23
- data/acceptance-features/directory/user/retire.feature +0 -6
- data/acceptance-features/directory/variable/create.feature +0 -14
- data/acceptance-features/directory/variable/retire.feature +0 -17
- data/acceptance-features/dsl/policy_owner.feature +0 -45
- data/acceptance-features/dsl/resource_owner.feature +0 -17
- data/acceptance-features/dsl/retire.feature +0 -15
- data/acceptance-features/global-privilege/elevate.feature +0 -20
- data/acceptance-features/global-privilege/reveal.privilege +0 -20
- data/acceptance-features/pubkeys/add.feature +0 -22
- data/acceptance-features/pubkeys/delete.feature +0 -9
- data/acceptance-features/pubkeys/names.feature +0 -26
- data/acceptance-features/pubkeys/show.feature +0 -27
- data/acceptance-features/step_definitions/cli_steps.rb +0 -57
- data/acceptance-features/step_definitions/graph_steps.rb +0 -22
- data/acceptance-features/step_definitions/user_steps.rb +0 -51
- data/acceptance-features/support/env.rb +0 -23
- data/acceptance-features/support/hooks.rb +0 -178
- data/acceptance-features/support/world.rb +0 -176
- data/acceptance-features/trusted_proxies.feature +0 -82
- data/bin/conjurize +0 -26
- data/bin/jsonfield +0 -70
- data/build-standalone +0 -6
- data/deprecations.sh +0 -38
- data/features/conjurize.feature +0 -134
- data/features/dsl_context.feature +0 -36
- data/features/dsl_host_create.feature +0 -11
- data/features/dsl_ownership.feature +0 -30
- data/features/dsl_permission.feature +0 -45
- data/features/dsl_resource_create.feature +0 -23
- data/features/dsl_role_create.feature +0 -11
- data/features/dsl_user_create.feature +0 -23
- data/features/jsonfield.feature +0 -49
- data/features/role_graph.feature +0 -58
- data/features/step_definitions/conjurize_steps.rb +0 -5
- data/features/step_definitions/dsl_steps.rb +0 -52
- data/features/support/conjur.conf +0 -6
- data/lib/conjur/command/assets.rb +0 -121
- data/lib/conjur/command/audit.rb +0 -155
- data/lib/conjur/command/bootstrap.rb +0 -129
- data/lib/conjur/command/dsl_command.rb +0 -75
- data/lib/conjur/command/elevate.rb +0 -76
- data/lib/conjur/command/field.rb +0 -45
- data/lib/conjur/command/groups.rb +0 -208
- data/lib/conjur/command/ids.rb +0 -34
- data/lib/conjur/command/layers.rb +0 -211
- data/lib/conjur/command/ldapsync.rb +0 -118
- data/lib/conjur/command/rspec/audit_helpers.rb +0 -68
- data/lib/conjur/command/rubydsl.rb +0 -93
- data/lib/conjur/command/script.rb +0 -48
- data/lib/conjur/command/server.rb +0 -67
- data/lib/conjur/conjurize.rb +0 -71
- data/lib/conjur/conjurize/script.rb +0 -150
- data/lib/conjur/dsl/runner.rb +0 -273
- data/publish-deb.sh +0 -6
- data/push-image +0 -29
- data/spec/command/assets_spec.rb +0 -115
- data/spec/command/audit_spec.rb +0 -376
- data/spec/command/elevate_spec.rb +0 -28
- data/spec/command/env_spec.rb +0 -168
- data/spec/command/groups_spec.rb +0 -77
- data/spec/command/host_factories_spec.rb +0 -38
- data/spec/command/layers_spec.rb +0 -35
- data/spec/command/ldapsync_spec.rb +0 -28
- data/spec/command/rubydsl_spec.rb +0 -63
- data/spec/command/variable_expiration_spec.rb +0 -164
- data/spec/command/variables_spec.rb +0 -192
- data/spec/conjurize/script_spec.rb +0 -62
- data/spec/conjurize_spec.rb +0 -70
- data/spec/dsl/runner_spec.rb +0 -93
- data/spec/env_spec.rb +0 -214
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6c66aad137ca989c44d4457f7310664747027f0a
|
4
|
+
data.tar.gz: 2c6db52a45ae0b89b1c361d63385bc6a67ea86dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33eb8f41c248b2954cec5efe6aeaf7bd0996b69cacfc6d6af3544a3c6da1239e426aa1d3b69940deb3d6917aa084548f9c8506dee535fdf6c9c50c75fa85edc5
|
7
|
+
data.tar.gz: db6e99feb08b30907df699d09142c52dcb70c10db7f666cd0e5909b91b0b6b3fb495e6c863ab2523ee0cb2dc4e0110f8828b91de1b819dec871fbea3dc235a66
|
data/.dockerignore
CHANGED
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/APPLIANCE_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
5.0
|
data/CHANGELOG.md
CHANGED
@@ -1,46 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# 6.0.0.rc1
|
2
2
|
|
3
|
-
*
|
4
|
-
|
5
|
-
# 5.6.5
|
6
|
-
|
7
|
-
* Fix init cert check when Conjur behind a SNI - [#209](https://github.com/cyberark/conjur-cli/pull/209)
|
8
|
-
|
9
|
-
# 5.6.4
|
10
|
-
|
11
|
-
* Allow activesupport 5 as a dependency.
|
12
|
-
|
13
|
-
# 5.6.3
|
14
|
-
|
15
|
-
* Fix the gemspec to reflect dependency changes.
|
16
|
-
|
17
|
-
# 5.6.2
|
18
|
-
|
19
|
-
* License changed to Apache 2.0
|
20
|
-
* Don't let conjur-api drift to v5.
|
21
|
-
|
22
|
-
# 5.6.1
|
23
|
-
|
24
|
-
* Fix handling of `-k / --kind` argument to `resource list`.
|
25
|
-
|
26
|
-
# 5.6.0
|
27
|
-
|
28
|
-
The following enhancements require Conjur server 4.9.1.0 or later:
|
29
|
-
|
30
|
-
* Supports filter and pagination of role-listing methods `role memberships`, `role members`, and `resource permitted_roles`.
|
31
|
-
* Supports non-recursive (`--no-recursive`) retrieval of `role memberships`.
|
32
|
-
|
33
|
-
On older server versions, the new options will be ignored by the server.
|
34
|
-
|
35
|
-
# 5.5.0
|
36
|
-
|
37
|
-
* Use `CONJUR_AUTHN_TOKEN_FILE` as the Conjur access token file, if it's available in the environment.
|
38
|
-
|
39
|
-
# 5.4.0
|
40
|
-
|
41
|
-
* Deprecated several commands in favor of using policy.
|
42
|
-
* Add `policy` subcommand for `ldap-sync`, get rid of `jobs` and `now` subcommands.
|
43
|
-
* Relax constraint on activesupport gem
|
3
|
+
* Provides compatibility with [cyberark/conjur](https://github.com/cyberark/conjur), Conjur 5 CE.
|
4
|
+
* License changed to Apache 2.0.
|
44
5
|
|
45
6
|
# 5.3.0
|
46
7
|
|
data/Gemfile
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
#ruby=ruby-2.
|
3
|
+
#ruby=ruby-2.2.5
|
4
4
|
#ruby-gemset=conjur-cli
|
5
5
|
|
6
6
|
# Specify your gem's dependencies in conjur.gemspec
|
7
7
|
gemspec
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
gem 'ruby-prof'
|
13
|
-
gem 'conjur-debify', '~> 1.0', require: false
|
14
|
-
end
|
9
|
+
gem 'activesupport', '~> 4.2'
|
10
|
+
|
11
|
+
gem 'conjur-api', '~> 5'
|
data/Humanfile.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
This text file is intended to describe in human terms the actions that are
|
2
|
+
needed to set this project up which cannot be easily specified in a
|
3
|
+
machine-readable way due to lack of required tools (or the lack of my
|
4
|
+
knowledge of them).
|
5
|
+
|
6
|
+
The intent is for this document to reflect the current state. The timestamp of
|
7
|
+
when the state was changed/checked should be included with the description
|
8
|
+
to emphasize this, even though in principle git log should also have this information.
|
9
|
+
|
10
|
+
For pull requests, when the requester is unable to perform the change of state
|
11
|
+
or state should only be changed after merging, a note to that effect should be
|
12
|
+
included instead. The onus is then on whoever is merging to actually apply the
|
13
|
+
changes and update the timestamp in this document.
|
14
|
+
|
15
|
+
# Dockerhub builds
|
16
|
+
|
17
|
+
The dockerhub repository should be created as a public automatic build
|
18
|
+
repository, linked to the github repo for automatic build on push.
|
19
|
+
|
20
|
+
To accomplish that, follow the guide at https://docs.docker.com/docker-hub/github/
|
21
|
+
|
22
|
+
## Settings
|
23
|
+
|
24
|
+
Dockerhub repo: https://hub.docker.com/r/conjurinc/cli5/
|
25
|
+
Github repo: https://github.com/conjurinc/cli-ruby
|
26
|
+
|
27
|
+
### [Automated build settings](https://hub.docker.com/r/conjurinc/cli5/~/settings/automated-builds/):
|
28
|
+
|
29
|
+
- Automatically build on pushes: yes.
|
30
|
+
|
31
|
+
[Configuration true as of 2017-06-14T20:41+00:00.]
|
data/Jenkinsfile
CHANGED
@@ -3,14 +3,13 @@ pipeline {
|
|
3
3
|
|
4
4
|
options {
|
5
5
|
timestamps()
|
6
|
-
buildDiscarder(logRotator(
|
6
|
+
buildDiscarder(logRotator(daysToKeepStr: '30'))
|
7
7
|
}
|
8
8
|
|
9
9
|
stages {
|
10
|
-
|
11
10
|
stage('Test 2.2') {
|
12
11
|
environment {
|
13
|
-
RUBY_VERSION = '2.2'
|
12
|
+
RUBY_VERSION = '2.2.8'
|
14
13
|
}
|
15
14
|
steps {
|
16
15
|
sh './test.sh'
|
@@ -20,7 +19,7 @@ pipeline {
|
|
20
19
|
|
21
20
|
stage('Test 2.3') {
|
22
21
|
environment {
|
23
|
-
RUBY_VERSION = '2.3'
|
22
|
+
RUBY_VERSION = '2.3.5'
|
24
23
|
}
|
25
24
|
steps {
|
26
25
|
sh './test.sh'
|
@@ -30,7 +29,7 @@ pipeline {
|
|
30
29
|
|
31
30
|
stage('Test 2.4') {
|
32
31
|
environment {
|
33
|
-
RUBY_VERSION = '2.4'
|
32
|
+
RUBY_VERSION = '2.4.2'
|
34
33
|
}
|
35
34
|
steps {
|
36
35
|
sh './test.sh'
|
@@ -38,70 +37,42 @@ pipeline {
|
|
38
37
|
}
|
39
38
|
}
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
archiveArtifacts "tmp/deb/*"
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
stage('Publish deb') {
|
49
|
-
when {
|
50
|
-
branch 'v4'
|
51
|
-
}
|
52
|
-
|
53
|
-
steps {
|
54
|
-
sh './publish-deb.sh $(cat APPLIANCE_VERSION) stable'
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
stage('Build standalone Docker image') {
|
59
|
-
steps {
|
60
|
-
sh './build-standalone'
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
stage('Publish standalone Docker image to DockerHub') {
|
65
|
-
steps {
|
66
|
-
sh './push-image'
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
// Only publish to RubyGems if the HEAD is
|
71
|
-
// tagged with the same version as in version.rb
|
72
|
-
stage('Publish to RubyGems') {
|
40
|
+
// Only publish to RubyGems if branch is 'master'
|
41
|
+
// AND someone confirms this stage within 5 minutes
|
42
|
+
stage('Publish to RubyGems?') {
|
73
43
|
agent { label 'releaser-v2' }
|
74
44
|
|
75
45
|
when {
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
test "$HEAD" = "$TAG"
|
98
|
-
'''
|
99
|
-
return exitCode == 0
|
46
|
+
allOf {
|
47
|
+
branch 'master'
|
48
|
+
expression {
|
49
|
+
boolean publish = false
|
50
|
+
|
51
|
+
if(env.PUBLISH_GEM == "true") {
|
52
|
+
return true
|
53
|
+
}
|
54
|
+
|
55
|
+
try {
|
56
|
+
timeout(time: 5, unit: 'MINUTES') {
|
57
|
+
input(message: 'Publish to RubyGems?')
|
58
|
+
publish = true
|
59
|
+
}
|
60
|
+
} catch (final ignore) {
|
61
|
+
publish = false
|
62
|
+
}
|
63
|
+
|
64
|
+
return publish
|
65
|
+
}
|
100
66
|
}
|
101
67
|
}
|
102
68
|
steps {
|
103
|
-
|
104
|
-
sh '
|
69
|
+
// Clean up first
|
70
|
+
sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd'
|
71
|
+
|
72
|
+
sh './publish.sh'
|
73
|
+
|
74
|
+
// Clean up again...
|
75
|
+
sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd'
|
105
76
|
deleteDir()
|
106
77
|
}
|
107
78
|
}
|
data/README.md
CHANGED
@@ -1,84 +1,70 @@
|
|
1
1
|
# Conjur
|
2
2
|
|
3
|
-
|
3
|
+
*NOTE*: This is work-in-progress, for a future (as yet unreleased) version of Conjur.
|
4
|
+
_It will not work with Conjur 4._
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
Note that this `v4` branch is for Conjur 4.x. Use `master` for Conjur 5.x and later.
|
6
|
+
Command-line interface to Conjur 5.
|
8
7
|
|
9
|
-
|
8
|
+
A complete reference guide is available at [developer.conjur.net](http://developer.conjur.net/reference).
|
10
9
|
|
11
|
-
|
10
|
+
## Quick start
|
12
11
|
|
13
|
-
|
12
|
+
```sh-session
|
13
|
+
$ docker run -it -v $PWD:/work conjurinc/cli5
|
14
|
+
root@2b5f618dfdcb:/# conjur -v
|
15
|
+
conjur version 6.0.0.pre.beta.2
|
16
|
+
```
|
14
17
|
|
15
|
-
|
18
|
+
## Docker images
|
16
19
|
|
17
|
-
|
20
|
+
[![Docker Build Status](https://img.shields.io/docker/build/conjurinc/cli5.svg)](https://hub.docker.com/r/conjurinc/cli5/)
|
18
21
|
|
19
|
-
|
22
|
+
Images for development/experimental use are automatically built [on docker hub](https://hub.docker.com/r/conjurinc/cli5/).
|
23
|
+
These are based off [Dockerfile.standalone](Dockerfile.standalone) and can be rebuilt with:
|
20
24
|
|
21
|
-
|
25
|
+
docker build . -f Dockerfile.standalone -t conjurinc/cli5
|
22
26
|
|
23
|
-
|
27
|
+
Note these images are not subject to any QA at the moment and so should never be used in production, especially without specific image id pin.
|
24
28
|
|
25
|
-
|
26
|
-
image. Docker containers are designed to be ephemeral, which means they don't
|
27
|
-
store state after the container exits.
|
29
|
+
## Development
|
28
30
|
|
29
|
-
|
31
|
+
Create a sandbox environment in Docker using the `./dev` folder:
|
30
32
|
|
31
33
|
```sh-session
|
32
|
-
$
|
33
|
-
|
34
|
+
$ cd dev
|
35
|
+
dev $ ./start.sh
|
34
36
|
```
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
This will drop you into a bash shell in a container called `cli`. The sandbox also includes a Postgres container and Conjur server container. The environment is already setup to connect the CLI to the server:
|
39
|
+
|
40
|
+
* **CONJUR_APPLIANCE_URL** `http://conjur`
|
41
|
+
* **CONJUR_ACCOUNT** `cucumber`
|
39
42
|
|
40
|
-
You can
|
41
|
-
CLI uses to connect. For example:
|
43
|
+
You can obtain the API key for the role `cucumber:user:admin` from the Docker logs of the Conjur container. Use it to login:
|
42
44
|
|
43
45
|
```sh-session
|
44
|
-
|
45
|
-
|
46
|
-
$ docker run --rm -it -v $(PWD)/mydata:/root cyberark/conjur-cli:4 init -h https://conjur.myorg.com
|
47
|
-
SHA1 Fingerprint=16:C8:F8:AC:7B:57:BD:5B:58:B4:13:27:22:8E:3F:A2:12:01:DB:68
|
48
|
-
|
49
|
-
Please verify this certificate on the appliance using command:
|
50
|
-
openssl x509 -fingerprint -noout -in ~conjur/etc/ssl/conjur.pem
|
51
|
-
|
52
|
-
Trust this certificate (yes/no): yes
|
53
|
-
Wrote certificate to /root/conjur-conjur.pem
|
54
|
-
Wrote configuration to /root/.conjurrc
|
55
|
-
$ ls -lA mydata
|
56
|
-
total 8
|
57
|
-
drwxr-xr-x 2 you staff 64 Mar 28 19:30 .cache
|
58
|
-
-rw-r--r-- 1 you staff 128 Mar 28 19:30 .conjurrc
|
59
|
-
-rw-r--r-- 1 you staff 2665 Mar 28 19:30 conjur-conjur.pem
|
60
|
-
$ docker run --rm -it -v $(PWD)/mydata:/root cyberark/conjur-cli:4 authn login -u your-user-name
|
61
|
-
Please enter your password (it will not be echoed):
|
46
|
+
root@2b5f618dfdcb:/# conjur authn login admin
|
47
|
+
Please enter admin's password (it will not be echoed):
|
62
48
|
Logged in
|
63
|
-
$ ls -lA mydata
|
64
|
-
total 12
|
65
|
-
drwxr-xr-x 2 you staff 64 Mar 28 19:26 .cache
|
66
|
-
-rw-r--r-- 1 you staff 128 Mar 28 19:20 .conjurrc
|
67
|
-
-rw------- 1 you staff 143 Mar 28 19:27 .netrc
|
68
|
-
-rw-r--r-- 1 you staff 2665 Mar 28 19:20 conjur-conjur.pem
|
69
|
-
$
|
70
49
|
```
|
71
50
|
|
72
|
-
|
73
|
-
login`, contains a user identity credential that can be used to access the
|
74
|
-
Conjur API. You should remove it after use or otherwise secure it like you would
|
75
|
-
another netrc file.
|
51
|
+
At this point, you can use any CLI command you like.
|
76
52
|
|
77
|
-
###
|
53
|
+
### Running Cucumber
|
78
54
|
|
79
|
-
To
|
55
|
+
To install dev packages, run `bundle` from within the container:
|
80
56
|
|
81
|
-
|
57
|
+
```sh-session
|
58
|
+
root@2b5f618dfdcb:/# cd /usr/src/cli-ruby/
|
59
|
+
root@2b5f618dfdcb:/usr/src/cli-ruby# bundle
|
60
|
+
```
|
61
|
+
|
62
|
+
Then you can run the cucumber tests:
|
63
|
+
|
64
|
+
```sh-session
|
65
|
+
root@2b5f618dfdcb:/usr/src/cli-ruby# cucumber
|
66
|
+
...
|
67
|
+
```
|
82
68
|
|
83
69
|
## Contributing
|
84
70
|
|
data/Rakefile
CHANGED
@@ -8,7 +8,11 @@ begin
|
|
8
8
|
require 'cucumber/rake/task'
|
9
9
|
require 'rspec/core/rake_task'
|
10
10
|
|
11
|
-
|
11
|
+
# ci_reporter_rspec cleans and then writes results to spec/reports
|
12
|
+
RSpec::Core::RakeTask.new :spec do |t|
|
13
|
+
t.rspec_opts = '--tag ~wip --format junit'
|
14
|
+
end
|
15
|
+
|
12
16
|
Cucumber::Rake::Task.new :features
|
13
17
|
|
14
18
|
task :jenkins => ['ci:setup:rspec', :spec] do
|
data/bin/conjur
CHANGED
data/build-deb.sh
CHANGED
@@ -3,9 +3,7 @@
|
|
3
3
|
export DEBUG=true
|
4
4
|
export GLI_DEBUG=true
|
5
5
|
|
6
|
-
|
7
|
-
docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd
|
8
|
-
fi
|
6
|
+
debify clean
|
9
7
|
|
10
8
|
docker build -t conjur-cli-fpm -f Dockerfile.fpm .
|
11
9
|
docker build -t conjur-cli-validate-packaging -f Dockerfile.validate-packaging .
|