Issue #5126 has been updated by James Turnbull.

Target version deleted (1.0.5)


----------------------------------------
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: 
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