conjur-cli 4.25.0 → 4.25.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9327368d238b90717af3151f2fc1a2091ff4f051
4
- data.tar.gz: a90f6d8e898919557b9b20f54435a5b07d508f61
3
+ metadata.gz: d792f7bd1ecbf6604d3d39ee0706bbceae4ec01e
4
+ data.tar.gz: 5ba5e9e5f22043a61ef9e7e1b66749d8a5545c99
5
5
  SHA512:
6
- metadata.gz: d3b6e29c9c849478d5a67e50d0d59b6e5973dced0d58010d00fbdd1c2dc5287911a9f308c5b9ba9bc6320ea6fedfcb9e098b53582227b1231e95b3693d2a6bb1
7
- data.tar.gz: a7a9a8fb315d6fd1dd089e6e0e3cd2330ea98f8ccb37f555eea056d09a5d258660b9b6f793f475951390d2de0c597e01ec04f339dd2e4a670d14c78e93b526be
6
+ metadata.gz: 8a39979f919c51295778131ebc6f7d7433be5ab1e03f1f116238c6b85f353a571bfeb0c89943431ac5d542c9519a15aab3f616a526c4c12605b8c86a5dd690cc
7
+ data.tar.gz: 503120adb8c7c37b4cc6ee2b9b61ce60f75efba31259910710b8c3599f40d34665efa4dfa537ce9ef9192b57277361104d01a768e87a8ce6f5d3ee579e236e98
data/CHANGELOG.md CHANGED
@@ -1,52 +1,57 @@
1
+ # 4.25.1
2
+
3
+ * Remove spurious line written to stdout during user creation.
4
+ * Fix up-front permission checking in `conjur bootstrap` so that it will run on a fresh server.
5
+
1
6
  # 4.25.0
2
7
 
3
8
  * A record can be retired to a specific role, in addition to the default behavior of retiring to the `attic` user.
4
- * Variable can be created with the id only, without becoming interactive
5
- * Run `conjur variable create -i -a` to create interactively with annotations
9
+ * Variable can be created with the id only, without becoming interactive.
10
+ * Run `conjur variable create -i -a` to create interactively with annotations.
6
11
  * Interactive annotation can be performed on bare resources with `conjur resource annotate -i`.
7
- * Don't require 'admin' user to bootstrap, prompt to create a new security admin during bootstrap
8
- * Check if user privileges are sufficient before running `retire`
12
+ * Don't require 'admin' user to bootstrap, prompt to create a new security admin during bootstrap.
13
+ * Check if user privileges are sufficient before running `retire`.
9
14
  * Don't revoke a user's access to a record in the middle of retire, because doing so leads to 403 errors later on.
10
- * Interactive mode of user, group and pubkey creation
15
+ * Interactive mode of user, group and pubkey creation.
11
16
 
12
17
  # 4.24.0
13
18
 
14
- * Interactive mode for variable creation
19
+ * Interactive mode for variable creation.
15
20
 
16
21
  # 4.23.0
17
22
 
18
- * Don't check if netrc is world-readable on Windows, since the answer is not reliable
19
- * Use new [conjur](https://supermarket.chef.io/cookbooks/conjur) cookbook for conjurize
20
- * Fix faulty initialization of plugins list, if it's nil, in the .conjurrc
21
- * Log DSL commands to stderr, even if CONJURAPI_LOG is not explicitly configured
23
+ * Don't check if netrc is world-readable on Windows, since the answer is not reliable.
24
+ * Use new [conjur](https://supermarket.chef.io/cookbooks/conjur) cookbook for conjurize.
25
+ * Fix faulty initialization of plugins list, if it's nil, in the .conjurrc.
26
+ * Log DSL commands to stderr, even if CONJURAPI_LOG is not explicitly configured.
22
27
  * In policy DSL, allow creation of records without an explicit `id`. In this case, the current scope is used as the `id`.
23
28
 
24
29
  # 4.22.0
25
30
 
26
- * New 'plugin' subcommand to manage CLI plugins
27
- * Configure SSL certificate from Conjur.configuration
28
- * Print the error message if there's a problem loading a plugin
31
+ * New 'plugin' subcommand to manage CLI plugins.
32
+ * Configure SSL certificate from Conjur.configuration.
33
+ * Print the error message if there's a problem loading a plugin.
29
34
 
30
35
  # 4.21.1
31
36
 
32
- * Configure trust to the new certificate in `conjur init`, before attempting to contact the Conjur server
37
+ * Configure trust to the new certificate in `conjur init`, before attempting to contact the Conjur server.
33
38
 
34
39
  # 4.21.0
35
40
 
36
- * Use user cache dir for mimetype cache
37
- * Retrieve the whole certificate chain on conjur init
41
+ * Use user cache dir for mimetype cache.
42
+ * Retrieve the whole certificate chain on conjur init.
38
43
 
39
44
  # 4.20.1
40
45
 
41
- * Improve the error reporting
46
+ * Improve the error reporting.
42
47
 
43
48
  # 4.20.0
44
49
 
45
- * GID manipulation commands
50
+ * GID manipulation commands.
46
51
 
47
52
  # 4.19.0
48
53
 
49
- * Add command `conjur role graph` for batch retrieval of role relationships
54
+ * Add command `conjur role graph` for batch retrieval of role relationships.
50
55
 
51
56
  # 4.18.5
52
57
 
@@ -57,25 +57,37 @@ class Conjur::Command::Bootstrap < Conjur::Command
57
57
  end
58
58
  security_admin = api.group("security_admin")
59
59
  memberships = user.role.memberships.map(&:roleid) if user
60
- begin
61
- # The user exists
62
- # The security_admin group exists
63
- # The user has a role which is admin of the security_admin role
64
- # The user has the role which owns the security_admin resource
65
- user &&
66
- security_admin.exists? &&
67
- security_admin.role.members.find{|m| memberships.member?(m.member.roleid) && m.admin_option} &&
68
- memberships.member?(security_admin.resource.ownerid)
69
- rescue RestClient::Forbidden
60
+
61
+ if user
62
+ if security_admin.exists?
63
+ begin
64
+ # The user has a role which is admin of the security_admin role
65
+ # The user has the role which owns the security_admin resource
66
+ security_admin.role.members.find{|m| memberships.member?(m.member.roleid) && m.admin_option} &&
67
+ memberships.member?(security_admin.resource.ownerid)
68
+ rescue RestClient::Forbidden
69
+ false
70
+ end
71
+ else
72
+ user.login == "admin"
73
+ end
74
+ else
70
75
  false
71
76
  end
72
77
  end
73
78
 
74
79
  Conjur::CLI.command :bootstrap do |c|
80
+ c.desc "Don't perform up-front checks to see if you are sufficiently privileged to run this command."
81
+ c.switch [:f, :force]
82
+
75
83
  c.action do |global_options,options,args|
76
84
  require 'highline/import'
85
+
86
+ # Ensure there's a logged in user
87
+ Conjur::Authn.connect
77
88
 
78
- exit_now! "You must be an administrator to bootstrap Conjur" unless security_admin_manager?(api)
89
+ force = options[:force]
90
+ exit_now! "You must be an administrator to bootstrap Conjur" unless force || security_admin_manager?(api)
79
91
 
80
92
  if (security_admin = api.group("security_admin")).exists?
81
93
  puts "Group 'security_admin' exists"
@@ -73,7 +73,6 @@ class Conjur::Command::Users < Conjur::Command
73
73
  user_options[:password] = password if password
74
74
  user = api.create_user(login, user_options)
75
75
 
76
- puts "User created"
77
76
  display user
78
77
 
79
78
  if interactive
@@ -19,6 +19,6 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
  module Conjur
22
- VERSION = "4.25.0"
22
+ VERSION = "4.25.1"
23
23
  ::Version=VERSION
24
24
  end
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.25.0
4
+ version: 4.25.1
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: 2015-05-30 00:00:00.000000000 Z
12
+ date: 2015-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport