Project

General

Profile

Actions

Bug #1759

closed

Certifcate Signing fails in the UI with latest HEAD

Added by Greg Sutcliffe almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Puppet
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #1766: puppetca proxy broken with puppet 2.7.18Duplicate07/18/2012Actions
Actions #1

Updated by Ohad Levy almost 12 years ago

  • Target version set to 1.0
Actions #2

Updated by Ohad Levy almost 12 years ago

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 {}
Actions #3

Updated by Ohad Levy almost 12 years ago

  • Project changed from Foreman to Smart Proxy
  • Target version deleted (1.0)
Actions #4

Updated by Ohad Levy almost 12 years ago

  • Category set to Puppet
Actions #5

Updated by Ohad Levy almost 12 years ago

  • Target version set to 1.0
Actions #6

Updated by Ohad Levy almost 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF