puppetserver-ca 1.11.4 → 1.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/puppetserver/ca/action/generate.rb +20 -3
- data/lib/puppetserver/ca/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a83e41c0525189b98d0fbdb8922c0c72d8d45a6cd74e9c4f85706d368dbab3c
|
4
|
+
data.tar.gz: 9c58fa566bb413d0dded376f6dc7846911826e7f5cbac75f1140ccc68afd7d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f46104125080129c6b3fba14c2c2bc0f79a9372c01d2ca027de100c608bea2be2ab69da8bab9c70b6722e7e305854ff46aa77442c43568eabe4cde66be9ec048
|
7
|
+
data.tar.gz: 5be1cc72ee0444f022f4597bc9b2c4efb2f6c9ca0eb0eb99264da08f41689e61880b1f091b3183c32ef5ac1a61375500a2a9b6f3c9f6c851a458c89cda0a6d81
|
@@ -26,7 +26,7 @@ Usage:
|
|
26
26
|
puppetserver ca generate [--help]
|
27
27
|
puppetserver ca generate --certname NAME[,NAME] [--config PATH]
|
28
28
|
[--subject-alt-names NAME[,NAME]]
|
29
|
-
[--ca-client]
|
29
|
+
[--ca-client] [--force]
|
30
30
|
|
31
31
|
Description:
|
32
32
|
Generates a new certificate signed by the intermediate CA
|
@@ -75,6 +75,10 @@ BANNER
|
|
75
75
|
'Causes the cert to be generated offline.') do |ca_client|
|
76
76
|
parsed['ca-client'] = true
|
77
77
|
end
|
78
|
+
opts.on('--force', 'Suppress errors when signing cert offline.',
|
79
|
+
"To be used with '--ca-client'") do |force|
|
80
|
+
parsed['force'] = true
|
81
|
+
end
|
78
82
|
opts.on('--ttl TTL', 'The time-to-live for each cert generated and signed') do |ttl|
|
79
83
|
parsed['ttl'] = ttl
|
80
84
|
end
|
@@ -139,8 +143,21 @@ BANNER
|
|
139
143
|
|
140
144
|
# Generate and save certs and associated keys
|
141
145
|
if input['ca-client']
|
142
|
-
#
|
143
|
-
|
146
|
+
# Refuse to generate certs offline if the CA service is running
|
147
|
+
begin
|
148
|
+
return 1 if HttpClient.check_server_online(puppet.settings, @logger)
|
149
|
+
rescue Puppetserver::Ca::ConnectionFailed => e
|
150
|
+
base_message = "Could not determine whether Puppet Server is online."
|
151
|
+
if input['force']
|
152
|
+
@logger.inform("#{base_message} Connection check failed with " \
|
153
|
+
"error: #{e.wrapped}\nContinuing with certificate signing.")
|
154
|
+
else
|
155
|
+
@logger.inform("#{base_message} If you are certain that the " \
|
156
|
+
"Puppetserver service is stopped, run this command again " \
|
157
|
+
"with the '--force' flag.")
|
158
|
+
raise e
|
159
|
+
end
|
160
|
+
end
|
144
161
|
all_passed = generate_authorized_certs(certnames, alt_names, puppet.settings, signer.digest)
|
145
162
|
else
|
146
163
|
all_passed = generate_certs(certnames, alt_names, puppet.settings, signer.digest, input['ttl'])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetserver-ca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|