Issue #5126 has been updated by Matt Robinson.

Status changed from Needs more information to Accepted
Assignee deleted (Matt Robinson)

It's hard to tell by reading the proposed patch, but wouldn't this cause people 
NOT using Basic Auth to be unable to connect?  Maybe you could submit the patch 
as a github branch?

Perhaps this is something we want to add in a commented out portion of the 
script, or we make it so that you can change a variable to enable basic auth.  
We did something like this with the file so that if you were using https it 
would turn on SSL for you.
----------------------------------------
Feature #5126: Support Basic Auth in external_node registration script
https://projects.puppetlabs.com/issues/5126

Author: Stephen Sadowski
Status: Accepted
Priority: High
Assignee: 
Category: 
Target version: 1.0.5
Keywords: 
Branch: 1.0.4
Affected URL: 
Affected Dashboard version: 


bin/external_node doesn't work with basic auth in 1.0.3 or 1.0.4 - patch below.

Perhaps also consider that url parse should be used for user/password and host 
could be set via ARGV.

--- external_node.old   2010-10-27 19:51:50.000000000 +0000
+++ external_node.new   2010-10-27 19:55:32.000000000 +0000
@@ -12,11 +12,17 @@
 require 'uri'
 require 'net/http'

+USER=""
+PASSWORD=""
 BASE="http://localhost:3000";
 NODE = ARGV.first

 url = URI.parse("#{BASE}/nodes/#{NODE}")
+
 req = Net::HTTP::Get.new(url.path, 'Accept' => 'text/yaml')
+if (USER != "") then
+       req.basic_auth USER,PASSWORD
+end
 res = Net::HTTP.start(url.host, url.port) {|http| http.request(req) }

 case res
~           


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to