conjur-cli 4.30.1 → 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.
- checksums.yaml +4 -4
- data/.dockerignore +2 -2
- data/.gitignore +3 -1
- data/APPLIANCE_VERSION +1 -0
- data/CHANGELOG.md +13 -1
- data/Dockerfile +1 -1
- data/Gemfile +2 -2
- data/PUBLISH.md +19 -1
- data/Rakefile +22 -16
- data/build-deb.sh +7 -10
- data/ci/install.sh +11 -0
- data/ci/package.sh +17 -0
- data/ci/publish.sh +35 -0
- data/ci/secrets/publish.yml +2 -0
- data/conjur.gemspec +0 -1
- data/jenkins.sh +1 -1
- data/lib/conjur/cli.rb +4 -3
- data/lib/conjur/command/plugin.rb +11 -11
- data/lib/conjur/command/{policy.rb → rubydsl.rb} +21 -20
- data/lib/conjur/command/script.rb +1 -1
- data/lib/conjur/config.rb +5 -1
- data/lib/conjur/version.rb +1 -1
- data/publish.sh +4 -7
- data/spec/command/init_spec.rb +26 -32
- data/spec/command/{policy_spec.rb → rubydsl_spec.rb} +7 -7
- data/spec/complete_spec.rb +3 -5
- metadata +13 -10
- data/distrib/bin/_conjur +0 -3
- data/distrib/bin/conjur +0 -3
- data/distrib/bin/conjurize +0 -3
- data/distrib/bin/jsonfield +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33a3e3fad78dc2dd87aa3fa6a243f0b14803c5e5
|
|
4
|
+
data.tar.gz: d6df01dfa23da5c6c70a404c18cf2649ee7714b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f461169a657242cf740174c974fb86c2bfdf1b956eb7e81ef0697056426efaa3280b8e33bbcf2e285200b43c0231923bf582f14fbd8fac57a756ce8ace392dcd
|
|
7
|
+
data.tar.gz: ba975bee2a0cb9ad5131ebbdc0e53850e194e196daaa45b7cd84d0270f8aa53af13742e87efe17d9beff4d65c725ceabce6d9781d2e83c6dd1c70fa1d3e368d1
|
data/.dockerignore
CHANGED
data/.gitignore
CHANGED
data/APPLIANCE_VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 5.1.0
|
|
2
|
+
|
|
3
|
+
* CLI plugin config is now stored in `~/.conjur-plugins.yml`.
|
|
4
|
+
|
|
5
|
+
# 5.0.0
|
|
6
|
+
|
|
7
|
+
* **Breaking change** Ruby Policy DSL is now deprecated in favor of
|
|
8
|
+
[new YML policy markup](https://developer.conjur.net/reference/policy-markup.html).
|
|
9
|
+
The existing `policy` subcommand has been moved to the `rubydsl` subcommand.
|
|
10
|
+
The new `policy` command operates on YML policies.
|
|
11
|
+
* Created a new non-Omnibus Debian packaging of the Ruby gems.
|
|
12
|
+
|
|
13
|
+
# 4.30.1
|
|
2
14
|
|
|
3
15
|
* Fix the `conjur-api` gem dependency version
|
|
4
16
|
|
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
#ruby=ruby-2.
|
|
3
|
+
#ruby=ruby-2.2.4
|
|
4
4
|
#ruby-gemset=conjur-cli
|
|
5
5
|
|
|
6
6
|
# Specify your gem's dependencies in conjur.gemspec
|
|
@@ -13,5 +13,5 @@ group :test, :development do
|
|
|
13
13
|
gem 'pry'
|
|
14
14
|
gem 'pry-doc'
|
|
15
15
|
gem 'ruby-prof'
|
|
16
|
-
gem 'conjur-debify', '
|
|
16
|
+
gem 'conjur-debify', '~> 1.0'
|
|
17
17
|
end
|
data/PUBLISH.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Publishing the CLI
|
|
2
2
|
|
|
3
|
-
We distribute the Conjur CLI as
|
|
3
|
+
We distribute the Conjur CLI as an Omnibus package for Ubuntu, Centos, OSX and also as a rubygem.
|
|
4
|
+
|
|
5
|
+
Experimentally, the CLI is also avaliable as a non-Omnibus deb package called 'rubygems-conjur-cli'
|
|
6
|
+
which depends on ruby2.0.
|
|
4
7
|
|
|
5
8
|
Steps to publish a new version of the CLI:
|
|
6
9
|
|
|
@@ -17,6 +20,21 @@ Steps to publish a new version of the CLI:
|
|
|
17
20
|
11. Update the links on the [CLI page](https://github.com/conjurinc/developer-www/blob/master/app/views/pages/cli/index.html.haml) for the devsite.
|
|
18
21
|
12. Promote the devsite to production [in Jenkins](https://jenkins.conjur.net/job/developer-www/) [2](#ref2).
|
|
19
22
|
|
|
23
|
+
Publishing the experimental deb:
|
|
24
|
+
|
|
25
|
+
1. `./build-deb.sh`
|
|
26
|
+
2. `summon -f ci/secrets/publish.yml ./publish.sh <component> <distribution>`
|
|
27
|
+
|
|
28
|
+
Installing from experimental deb:
|
|
29
|
+
|
|
30
|
+
```sh-session
|
|
31
|
+
# apt-get install -y wget apt-transport-https
|
|
32
|
+
# echo 'deb https://conjurinc.artifactoryonline.com/conjurinc/debian-public v4 master' >> /etc/apt/sources.list
|
|
33
|
+
# wget -qO - https://conjurinc.artifactoryonline.com/conjurinc/api/gpg/key/public | apt-key add -
|
|
34
|
+
# apt-get update
|
|
35
|
+
# apt-get install conjur-cli
|
|
36
|
+
```
|
|
37
|
+
|
|
20
38
|
---
|
|
21
39
|
|
|
22
40
|
<a id="ref1">1</a>:
|
data/Rakefile
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env rake
|
|
2
2
|
require "bundler/gem_tasks"
|
|
3
|
-
require 'ci/reporter/rake/rspec'
|
|
4
|
-
require 'ci/reporter/rake/cucumber'
|
|
5
|
-
require 'cucumber'
|
|
6
|
-
require 'cucumber/rake/task'
|
|
7
|
-
require 'rspec/core/rake_task'
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
begin
|
|
5
|
+
require 'ci/reporter/rake/rspec'
|
|
6
|
+
require 'ci/reporter/rake/cucumber'
|
|
7
|
+
require 'cucumber'
|
|
8
|
+
require 'cucumber/rake/task'
|
|
9
|
+
require 'rspec/core/rake_task'
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
RSpec::Core::RakeTask.new :spec
|
|
12
|
+
Cucumber::Rake::Task.new :features
|
|
13
|
+
|
|
14
|
+
task :jenkins => ['ci:setup:rspec', :spec] do
|
|
15
|
+
File.write('build_number', ENV['BUILD_NUMBER']) if ENV['BUILD_NUMBER']
|
|
16
|
+
require 'fileutils'
|
|
17
|
+
FileUtils.rm_rf 'features/reports'
|
|
18
|
+
Cucumber::Rake::Task.new do |t|
|
|
19
|
+
t.cucumber_opts = "--tags ~@real-api --format pretty --format junit --out features/reports"
|
|
20
|
+
end.runner.run
|
|
21
|
+
end
|
|
20
22
|
|
|
21
|
-
task default: [:spec, :features]
|
|
23
|
+
task default: [:spec, :features]
|
|
24
|
+
rescue LoadError
|
|
25
|
+
$stderr.puts $!
|
|
26
|
+
$stderr.puts "This error will be ignored"
|
|
27
|
+
end
|
data/build-deb.sh
CHANGED
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
export DEBUG=true
|
|
4
4
|
export GLI_DEBUG=true
|
|
5
5
|
|
|
6
|
-
# Make sure Gemfile.lock exists
|
|
7
|
-
gem install -N bundler
|
|
8
|
-
bundle
|
|
9
|
-
|
|
10
6
|
debify clean
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--depends ruby2.0
|
|
8
|
+
docker build -t conjur-cli-fpm -f Dockerfile.fpm .
|
|
9
|
+
docker build -t conjur-cli-validate-packaging -f Dockerfile.validate-packaging .
|
|
10
|
+
|
|
11
|
+
mkdir -p tmp/deb
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
docker run -v $PWD/tmp/deb:/share --rm conjur-cli-fpm
|
|
19
14
|
|
|
15
|
+
# Test that the install succeeds
|
|
16
|
+
docker run --rm -v $PWD/tmp/deb:/share conjur-cli-validate-packaging
|
data/ci/install.sh
ADDED
data/ci/package.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash -ex
|
|
2
|
+
|
|
3
|
+
mkdir -p /tmp/gems
|
|
4
|
+
mkdir -p /tmp/src
|
|
5
|
+
|
|
6
|
+
rm -f /share/*
|
|
7
|
+
|
|
8
|
+
rake build
|
|
9
|
+
|
|
10
|
+
gem install --no-ri --no-rdoc --install-dir /tmp/gems pkg/*.gem
|
|
11
|
+
|
|
12
|
+
ITERATION=$(date +%s)
|
|
13
|
+
|
|
14
|
+
find /tmp/gems/cache -name '*.gem' | xargs -rn1 \
|
|
15
|
+
fpm --prefix $(gem environment gemdir) --iteration $ITERATION -s gem -t deb
|
|
16
|
+
|
|
17
|
+
cp -a *.deb /share
|
data/ci/publish.sh
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/bin/bash -e
|
|
2
|
+
|
|
3
|
+
distribution=$1
|
|
4
|
+
component=$2
|
|
5
|
+
|
|
6
|
+
if [ "$distribution" == "" ]; then
|
|
7
|
+
echo Distribution is required
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
if [ "$component" == "" ]; then
|
|
11
|
+
echo Component is required
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
if [ "$ART_USERNAME" == "" -o "$ART_PASSWORD" == "" ]; then
|
|
16
|
+
echo Usage: summon -f ci/secrets/publish.yml ./publish.sh
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
docker build -t conjur-cli-publish -f Dockerfile.publish .
|
|
21
|
+
|
|
22
|
+
for package in *.deb; do
|
|
23
|
+
echo Publishing "$package"
|
|
24
|
+
docker run \
|
|
25
|
+
--rm \
|
|
26
|
+
-v $PWD/tmp/deb:/src \
|
|
27
|
+
conjur-cli-publish \
|
|
28
|
+
upload \
|
|
29
|
+
--url https://conjurinc.artifactoryonline.com/conjurinc \
|
|
30
|
+
--user $ART_USERNAME \
|
|
31
|
+
--password $ART_PASSWORD \
|
|
32
|
+
--deb "$distribution"/"$component"/amd64 \
|
|
33
|
+
$package \
|
|
34
|
+
debian-public
|
|
35
|
+
done
|
data/conjur.gemspec
CHANGED
data/jenkins.sh
CHANGED
data/lib/conjur/cli.rb
CHANGED
|
@@ -110,6 +110,7 @@ module Conjur
|
|
|
110
110
|
|
|
111
111
|
init!
|
|
112
112
|
|
|
113
|
+
program_desc 'Command-line toolkit for managing roles, resources and privileges'
|
|
113
114
|
version Conjur::VERSION
|
|
114
115
|
|
|
115
116
|
pre do |global,command,options,args|
|
|
@@ -134,7 +135,7 @@ module Conjur
|
|
|
134
135
|
exit_now!("Role '#{as_role}' does not exist, or you don't have permission to use it") unless role.exists?
|
|
135
136
|
options[:ownerid] = role.roleid
|
|
136
137
|
end
|
|
137
|
-
|
|
138
|
+
|
|
138
139
|
true
|
|
139
140
|
end
|
|
140
141
|
|
|
@@ -143,11 +144,11 @@ module Conjur
|
|
|
143
144
|
code.call
|
|
144
145
|
@current_command = nil
|
|
145
146
|
end
|
|
146
|
-
|
|
147
|
+
|
|
147
148
|
on_error do |exception|
|
|
148
149
|
require 'rest-client'
|
|
149
150
|
require 'patches/conjur/error'
|
|
150
|
-
|
|
151
|
+
|
|
151
152
|
run_default_handler = true
|
|
152
153
|
if @current_command != nil && !command_version_compatible?(@current_command)
|
|
153
154
|
$stderr.puts "error: this command is not supported by the current Conjur server version"
|
|
@@ -23,6 +23,7 @@ require 'rubygems'
|
|
|
23
23
|
require 'rubygems/commands/install_command'
|
|
24
24
|
require 'rubygems/commands/uninstall_command'
|
|
25
25
|
require 'yaml'
|
|
26
|
+
require 'fileutils'
|
|
26
27
|
|
|
27
28
|
require 'conjur/command'
|
|
28
29
|
|
|
@@ -121,18 +122,17 @@ end
|
|
|
121
122
|
|
|
122
123
|
def modify_plugin_list(op, plugin_name)
|
|
123
124
|
config_exists = false
|
|
124
|
-
Conjur::Config.
|
|
125
|
-
if File.file?(f)
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
Conjur::Config.plugin_config_files.each do |f|
|
|
126
|
+
if !File.file?(f)
|
|
127
|
+
FileUtils.touch(f)
|
|
128
|
+
end
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
config = YAML.load(IO.read(f)).stringify_keys rescue {}
|
|
131
|
+
config['plugins'] ||= []
|
|
132
|
+
config['plugins'] += [plugin_name] if op == 'add'
|
|
133
|
+
config['plugins'] -= [plugin_name] if op == 'remove'
|
|
134
|
+
config['plugins'].uniq!
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
end
|
|
136
|
+
File.write(f, YAML.dump(config))
|
|
136
137
|
end
|
|
137
|
-
exit_now! 'No Conjur config file found, run "conjur init"' unless config_exists
|
|
138
138
|
end
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
#
|
|
21
21
|
require 'conjur/command/dsl_command'
|
|
22
22
|
|
|
23
|
-
class Conjur::Command::
|
|
24
|
-
desc "Manage policies"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
class Conjur::Command::RubyDSL < Conjur::DSLCommand
|
|
24
|
+
desc "Manage Ruby DSL policies (deprecated)"
|
|
25
|
+
long_desc 'DEPRECATED. Declarative YML policy supercedes Ruby policy DSL.'
|
|
26
|
+
command :rubydsl do |rubydsl|
|
|
27
|
+
rubydsl.desc "Load a policy from Conjur DSL"
|
|
28
|
+
rubydsl.long_desc <<-DESC
|
|
29
|
+
Loads a Conjur policy from Ruby DSL, applying particular conventions to the role and resource
|
|
29
30
|
ids.
|
|
30
31
|
|
|
31
32
|
The first path element of each id is the collection. Policies can be separated into collections
|
|
@@ -40,8 +41,8 @@ annotations on the policy. The policy role becomes the owner of the owned policy
|
|
|
40
41
|
--as-group and --as-role options can be used to set the owner of the policy role. The default
|
|
41
42
|
owner of the policy role is the logged-in user (you), as always.
|
|
42
43
|
DESC
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
rubydsl.arg_name "FILE"
|
|
45
|
+
rubydsl.command :load do |c|
|
|
45
46
|
acting_as_option(c)
|
|
46
47
|
collection_option(c)
|
|
47
48
|
context_option(c)
|
|
@@ -61,9 +62,9 @@ owner of the policy role is the logged-in user (you), as always.
|
|
|
61
62
|
end
|
|
62
63
|
end
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
rubydsl.desc 'Decommision a policy'
|
|
66
|
+
rubydsl.arg_name 'POLICY'
|
|
67
|
+
rubydsl.command :retire do |c|
|
|
67
68
|
retire_options c
|
|
68
69
|
|
|
69
70
|
c.action do |global_options, options, args |
|
|
@@ -71,22 +72,22 @@ owner of the policy role is the logged-in user (you), as always.
|
|
|
71
72
|
|
|
72
73
|
# policy isn't a rolsource (yet), but we can pretend
|
|
73
74
|
Policy = Struct.new(:role, :resource)
|
|
74
|
-
|
|
75
|
+
rubydsl = Policy.new(api.role(id), api.resource(id))
|
|
76
|
+
|
|
77
|
+
validate_retire_privileges(rubydsl, options)
|
|
78
|
+
|
|
79
|
+
retire_resource(rubydsl)
|
|
75
80
|
|
|
76
|
-
validate_retire_privileges(policy, options)
|
|
77
|
-
|
|
78
|
-
retire_resource(policy)
|
|
79
|
-
|
|
80
81
|
# The policy resource is owned by the policy role. Having the
|
|
81
82
|
# policy role is what allows us to administer it. So, we have
|
|
82
83
|
# to give the resource away before we can revoke the role.
|
|
83
|
-
give_away_resource(
|
|
84
|
-
|
|
85
|
-
retire_role(
|
|
84
|
+
give_away_resource(rubydsl, options)
|
|
85
|
+
|
|
86
|
+
retire_role(rubydsl)
|
|
86
87
|
|
|
87
88
|
puts 'Policy retired'
|
|
88
89
|
end
|
|
89
90
|
end
|
|
90
|
-
|
|
91
|
+
|
|
91
92
|
end
|
|
92
93
|
end
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
require 'conjur/command/dsl_command'
|
|
22
22
|
|
|
23
23
|
class Conjur::Command::Script < Conjur::DSLCommand
|
|
24
|
-
desc "Execute
|
|
24
|
+
desc "Execute Ruby DSL scripts"
|
|
25
25
|
command :script do |script|
|
|
26
26
|
script.desc "Run a Conjur DSL script"
|
|
27
27
|
script.arg_name "script"
|
data/lib/conjur/config.rb
CHANGED
|
@@ -30,6 +30,10 @@ module Conjur
|
|
|
30
30
|
@@attributes = {}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def plugin_config_files
|
|
34
|
+
[ File.expand_path("~/.conjur-plugins.yml") ]
|
|
35
|
+
end
|
|
36
|
+
|
|
33
37
|
def user_config_files
|
|
34
38
|
if ENV['CONJURRC']
|
|
35
39
|
return ENV['CONJURRC']
|
|
@@ -46,7 +50,7 @@ module Conjur
|
|
|
46
50
|
end
|
|
47
51
|
|
|
48
52
|
def default_config_files
|
|
49
|
-
['/etc/conjur.conf', user_config_files].flatten.uniq
|
|
53
|
+
['/etc/conjur.conf', user_config_files, plugin_config_files].flatten.uniq
|
|
50
54
|
end
|
|
51
55
|
|
|
52
56
|
def load(config_files = default_config_files)
|
data/lib/conjur/version.rb
CHANGED
data/publish.sh
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
#!/bin/bash -
|
|
1
|
+
#!/bin/bash -e
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
distribution=$1
|
|
4
|
+
component=${2:-`echo $GIT_BRANCH | sed 's/^origin\///' | tr '/' '.'`}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
COMPONENT=${2:-`echo $GIT_BRANCH | sed 's/^origin\///' | tr '/' '.'`}
|
|
8
|
-
|
|
9
|
-
debify publish --component $COMPONENT $DISTRIBUTION cli
|
|
6
|
+
exec summon -f ci/secrets/publish.yml ./ci/publish.sh $distribution $component
|
data/spec/command/init_spec.rb
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
require 'highline'
|
|
3
3
|
|
|
4
|
-
GITHUB_FP = "SHA1 Fingerprint=
|
|
4
|
+
GITHUB_FP = "SHA1 Fingerprint=D7:9F:07:61:10:B3:92:93:E3:49:AC:89:84:5B:03:80:C1:9E:2F:8B"
|
|
5
5
|
GITHUB_CERT = <<EOF
|
|
6
6
|
-----BEGIN CERTIFICATE-----
|
|
7
|
-
|
|
7
|
+
MIIEtjCCA56gAwIBAgIQDHmpRLCMEZUgkmFf4msdgzANBgkqhkiG9w0BAQsFADBs
|
|
8
8
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
ggEBAG/nbcuC8++QhwnXDxUiLIz+06scipbbXRJd0XjAMbD/RciJ9wiYUhcfTEsg
|
|
34
|
-
ZGpt21DXEL5+q/4vgNipSlhBaYFyGQiDm5IQTmIte0ZwQ26jUxMf4pOmI1v3kj43
|
|
35
|
-
FHU7uUskQS6lPUgND5nqHkKXxv6V2qtHmssrA9YNQMEK93ga2rWDpK21mUkgLviT
|
|
36
|
-
PB5sPdE7IzprOCp+Ynpf3RcFddAkXb6NqJoQRPrStMrv19C1dqUmJRwIQdhkkqev
|
|
37
|
-
ff6IQDlhC8BIMKmCNK33cEYDfDWROtW7JNgBvBTwww8jO1gyug8SbGZ6bZ3k8OV8
|
|
38
|
-
XX4C2NesiZcLYbc2n7B9O+63M2k=
|
|
9
|
+
d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
|
|
10
|
+
ZSBFViBSb290IENBMB4XDTEzMTAyMjEyMDAwMFoXDTI4MTAyMjEyMDAwMFowdTEL
|
|
11
|
+
MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
|
|
12
|
+
LmRpZ2ljZXJ0LmNvbTE0MDIGA1UEAxMrRGlnaUNlcnQgU0hBMiBFeHRlbmRlZCBW
|
|
13
|
+
YWxpZGF0aW9uIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
|
14
|
+
ggEBANdTpARR+JmmFkhLZyeqk0nQOe0MsLAAh/FnKIaFjI5j2ryxQDji0/XspQUY
|
|
15
|
+
uD0+xZkXMuwYjPrxDKZkIYXLBxA0sFKIKx9om9KxjxKws9LniB8f7zh3VFNfgHk/
|
|
16
|
+
LhqqqB5LKw2rt2O5Nbd9FLxZS99RStKh4gzikIKHaq7q12TWmFXo/a8aUGxUvBHy
|
|
17
|
+
/Urynbt/DvTVvo4WiRJV2MBxNO723C3sxIclho3YIeSwTQyJ3DkmF93215SF2AQh
|
|
18
|
+
cJ1vb/9cuhnhRctWVyh+HA1BV6q3uCe7seT6Ku8hI3UarS2bhjWMnHe1c63YlC3k
|
|
19
|
+
8wyd7sFOYn4XwHGeLN7x+RAoGTMCAwEAAaOCAUkwggFFMBIGA1UdEwEB/wQIMAYB
|
|
20
|
+
Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF
|
|
21
|
+
BQcDAjA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRp
|
|
22
|
+
Z2ljZXJ0LmNvbTBLBgNVHR8ERDBCMECgPqA8hjpodHRwOi8vY3JsNC5kaWdpY2Vy
|
|
23
|
+
dC5jb20vRGlnaUNlcnRIaWdoQXNzdXJhbmNlRVZSb290Q0EuY3JsMD0GA1UdIAQ2
|
|
24
|
+
MDQwMgYEVR0gADAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2VydC5j
|
|
25
|
+
b20vQ1BTMB0GA1UdDgQWBBQ901Cl1qCt7vNKYApl0yHU+PjWDzAfBgNVHSMEGDAW
|
|
26
|
+
gBSxPsNpA/i/RwHUmCYaCALvY2QrwzANBgkqhkiG9w0BAQsFAAOCAQEAnbbQkIbh
|
|
27
|
+
hgLtxaDwNBx0wY12zIYKqPBKikLWP8ipTa18CK3mtlC4ohpNiAexKSHc59rGPCHg
|
|
28
|
+
4xFJcKx6HQGkyhE6V6t9VypAdP3THYUYUN9XR3WhfVUgLkc3UHKMf4Ib0mKPLQNa
|
|
29
|
+
2sPIoc4sUqIAY+tzunHISScjl2SFnjgOrWNoPLpSgVh5oywM395t6zHyuqB8bPEs
|
|
30
|
+
1OG9d4Q3A84ytciagRpKkk47RpqF/oOi+Z6Mo8wNXrM9zwR4jxQUezKcxwCmXMS1
|
|
31
|
+
oVWNWlZopCJwqjyBcdmdqEU79OX2olHdx3ti6G8MdOu42vi/hw15UJGQmxg7kVkn
|
|
32
|
+
8TUoE6smftX3eg==
|
|
39
33
|
-----END CERTIFICATE-----
|
|
40
34
|
EOF
|
|
41
35
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
require 'conjur/dsl/runner'
|
|
3
3
|
|
|
4
|
-
describe Conjur::Command::
|
|
4
|
+
describe Conjur::Command::RubyDSL do
|
|
5
5
|
context "when logged in", logged_in: true do
|
|
6
6
|
let(:role) do
|
|
7
7
|
double("role", exists?: true, api_key: "the-api-key", roleid: "the-role")
|
|
@@ -22,8 +22,8 @@ describe Conjur::Command::Policy do
|
|
|
22
22
|
allow(api).to receive(:role).with("the-account:policy:#{collection}/the-policy-1.0.0").and_return role
|
|
23
23
|
allow(api).to receive(:resource).with("the-account:policy:#{collection}/the-policy-1.0.0").and_return resource
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
describe_command '
|
|
25
|
+
|
|
26
|
+
describe_command 'rubydsl:load --collection the-collection http://example.com/policy.rb' do
|
|
27
27
|
let(:collection) { "the-collection" }
|
|
28
28
|
before {
|
|
29
29
|
allow(File).to receive(:exists?).with("http://example.com/policy.rb").and_return false
|
|
@@ -33,7 +33,7 @@ describe Conjur::Command::Policy do
|
|
|
33
33
|
expect(invoke).to eq(0)
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
|
-
describe_command '
|
|
36
|
+
describe_command 'rubydsl:load --collection the-collection policy.rb' do
|
|
37
37
|
let(:collection) { "the-collection" }
|
|
38
38
|
it "creates the policy" do
|
|
39
39
|
expect(invoke).to eq(0)
|
|
@@ -44,16 +44,16 @@ describe Conjur::Command::Policy do
|
|
|
44
44
|
before {
|
|
45
45
|
stub_const("ENV", "USER" => "alice", "HOSTNAME" => "localhost")
|
|
46
46
|
}
|
|
47
|
-
describe_command '
|
|
47
|
+
describe_command 'rubydsl:load --as-group the-group policy.rb' do
|
|
48
48
|
let(:group) { double(:group, exists?: true) }
|
|
49
49
|
it "creates the policy" do
|
|
50
50
|
allow(Conjur::Command.api).to receive(:role).with("the-account:group:the-group").and_return group
|
|
51
51
|
expect_any_instance_of(Conjur::DSL::Runner).to receive(:owner=).with("the-account:group:the-group")
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
expect(invoke).to eq(0)
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
|
-
describe_command '
|
|
56
|
+
describe_command 'rubydsl:load policy.rb' do
|
|
57
57
|
it "creates the policy with default collection" do
|
|
58
58
|
expect(invoke).to eq(0)
|
|
59
59
|
end
|
data/spec/complete_spec.rb
CHANGED
|
@@ -21,9 +21,7 @@ describe Conjur::CLI::Complete do
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
context 'with "conjur p"' do
|
|
24
|
-
it { expects_completions_for('p').to include 'plugin',
|
|
25
|
-
'policy',
|
|
26
|
-
'pubkeys' }
|
|
24
|
+
it { expects_completions_for('p').to include 'plugin', 'pubkeys' }
|
|
27
25
|
end
|
|
28
26
|
|
|
29
27
|
context 'with "conjur host l"' do
|
|
@@ -31,8 +29,8 @@ describe Conjur::CLI::Complete do
|
|
|
31
29
|
'list' }
|
|
32
30
|
end
|
|
33
31
|
|
|
34
|
-
context 'with "conjur
|
|
35
|
-
it { expects_completions_for('
|
|
32
|
+
context 'with "conjur rubydsl"' do
|
|
33
|
+
it { expects_completions_for('rubydsl ').to include 'load' }
|
|
36
34
|
end
|
|
37
35
|
end
|
|
38
36
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: conjur-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
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: 2016-03-
|
|
12
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
@@ -268,8 +268,12 @@ files:
|
|
|
268
268
|
- .overcommit.yml
|
|
269
269
|
- .project
|
|
270
270
|
- .rubocop.yml
|
|
271
|
+
- APPLIANCE_VERSION
|
|
271
272
|
- CHANGELOG.md
|
|
272
273
|
- Dockerfile
|
|
274
|
+
- Dockerfile.fpm
|
|
275
|
+
- Dockerfile.publish
|
|
276
|
+
- Dockerfile.validate-packaging
|
|
273
277
|
- Gemfile
|
|
274
278
|
- LICENSE
|
|
275
279
|
- PUBLISH.md
|
|
@@ -338,14 +342,13 @@ files:
|
|
|
338
342
|
- bin/conjurize
|
|
339
343
|
- bin/jsonfield
|
|
340
344
|
- build-deb.sh
|
|
341
|
-
- ci/
|
|
345
|
+
- ci/install.sh
|
|
346
|
+
- ci/package.sh
|
|
347
|
+
- ci/publish.sh
|
|
348
|
+
- ci/secrets/publish.yml
|
|
342
349
|
- ci/test.sh
|
|
343
350
|
- conjur.gemspec
|
|
344
351
|
- debify.sh
|
|
345
|
-
- distrib/bin/_conjur
|
|
346
|
-
- distrib/bin/conjur
|
|
347
|
-
- distrib/bin/conjurize
|
|
348
|
-
- distrib/bin/jsonfield
|
|
349
352
|
- features/conjurize.feature
|
|
350
353
|
- features/dsl_context.feature
|
|
351
354
|
- features/dsl_host_create.feature
|
|
@@ -387,7 +390,6 @@ files:
|
|
|
387
390
|
- lib/conjur/command/init.rb
|
|
388
391
|
- lib/conjur/command/layers.rb
|
|
389
392
|
- lib/conjur/command/plugin.rb
|
|
390
|
-
- lib/conjur/command/policy.rb
|
|
391
393
|
- lib/conjur/command/pubkeys.rb
|
|
392
394
|
- lib/conjur/command/resources.rb
|
|
393
395
|
- lib/conjur/command/roles.rb
|
|
@@ -396,6 +398,7 @@ files:
|
|
|
396
398
|
- lib/conjur/command/rspec/helpers.rb
|
|
397
399
|
- lib/conjur/command/rspec/mock_services.rb
|
|
398
400
|
- lib/conjur/command/rspec/output_matchers.rb
|
|
401
|
+
- lib/conjur/command/rubydsl.rb
|
|
399
402
|
- lib/conjur/command/script.rb
|
|
400
403
|
- lib/conjur/command/secrets.rb
|
|
401
404
|
- lib/conjur/command/server.rb
|
|
@@ -424,10 +427,10 @@ files:
|
|
|
424
427
|
- spec/command/hosts_spec.rb
|
|
425
428
|
- spec/command/init_spec.rb
|
|
426
429
|
- spec/command/layers_spec.rb
|
|
427
|
-
- spec/command/policy_spec.rb
|
|
428
430
|
- spec/command/pubkeys_spec.rb
|
|
429
431
|
- spec/command/resources_spec.rb
|
|
430
432
|
- spec/command/roles_spec.rb
|
|
433
|
+
- spec/command/rubydsl_spec.rb
|
|
431
434
|
- spec/command/users_spec.rb
|
|
432
435
|
- spec/command/variable_expiration_spec.rb
|
|
433
436
|
- spec/command/variables_spec.rb
|
|
@@ -494,10 +497,10 @@ test_files:
|
|
|
494
497
|
- spec/command/hosts_spec.rb
|
|
495
498
|
- spec/command/init_spec.rb
|
|
496
499
|
- spec/command/layers_spec.rb
|
|
497
|
-
- spec/command/policy_spec.rb
|
|
498
500
|
- spec/command/pubkeys_spec.rb
|
|
499
501
|
- spec/command/resources_spec.rb
|
|
500
502
|
- spec/command/roles_spec.rb
|
|
503
|
+
- spec/command/rubydsl_spec.rb
|
|
501
504
|
- spec/command/users_spec.rb
|
|
502
505
|
- spec/command/variable_expiration_spec.rb
|
|
503
506
|
- spec/command/variables_spec.rb
|
data/distrib/bin/_conjur
DELETED
data/distrib/bin/conjur
DELETED
data/distrib/bin/conjurize
DELETED
data/distrib/bin/jsonfield
DELETED