Bug #1759
closed
Certifcate Signing fails in the UI with latest HEAD
Added by Greg Sutcliffe over 12 years ago.
Updated over 12 years ago.
Description
Steps to reproduce:
Build New VM
Git clone Foreman
bundle install --path vendor/
db:migrate (I used sqlite3 for speed)
start foreman
install foreman-proxy & sudo setup for certificate signing
Add proxy to foreman's proxy page
create new unsigned cert:
rm -rf /var/lib/puppet/
puppet master -v &
puppet agent --server `hostname -f` --certname unsigned-thing
Foreman -> Smart Proxies -> Certificates -> Click 'sign' by 'unsigned-thing'
Should fail
- Target version set to 1.0
this looks like an issue with puppet 2.7.18 where the certnames are now qouated.
if anyone could try the following patch and let me know:
diff --git a/lib/proxy/puppetca.rb b/lib/proxy/puppetca.rb
index 0f44fe7..e33adc0 100644
--- a/lib/proxy/puppetca.rb
+++ b/lib/proxy/puppetca.rb
@@ -132,10 +132,10 @@ module Proxy::PuppetCA
# parse the puppetca --list output
def certificate str
case str
- when /(\+|\-)\s+(.*)\s+\((\S+)\)/
+ when /(\+|\-)\s+["]{0,1}(.*\w)["]{0,1}\s+\((\S+)\)/
state = $1 == "-" ? "revoked" : "valid"
return { $2.strip => { :state => state, :fingerprint => $3 } }
- when /(.*)\s+\((\S+)\)/
+ when /\s*["]{0,1}(.*\w)["]{0,1}\s+\((\S+)\)/
return { $1.strip => { :state => "pending", :fingerprint => $2 } }
else
return {}
- Project changed from Foreman to Smart Proxy
- Target version deleted (
1.0)
- Target version set to 1.0
- Status changed from New to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF