[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Matt Robinson matt at puppetlabs.com
Tue May 10 08:03:14 UTC 2011


The following commit has been merged in the experimental branch:
commit dac675c94e6ed1ee67a3081ba7379e000ee93c1c
Merge: 022114d8e50b1adb785b38262251979a222e7972 af6e08c0a59db951502d0cf8c0ca24f5001e92f1
Author: Matt Robinson <matt at puppetlabs.com>
Date:   Thu Dec 2 14:43:15 2010 -0800

    Merge branch '2.6.x' into next
    
    * 2.6.x:
      (#5304) Use internal_name rather than real_name for maillist provider
      Updated CHANGELOG and version for 2.6.4
      Revert "(#5304) Use internal_name rather than real_name for maillist provider"
      Disable remote ralsh by default
      (#5424) Ship auth.conf as part of installing from source
      (#5304) Use internal_name rather than real_name for maillist provider
      Renamed Reductive to Puppet
    
    Manually Resolved Conflicts:
    	lib/puppet/provider/maillist/mailman.rb

diff --combined lib/puppet/network/rest_authconfig.rb
index b6a1633,7abe069..850f921
--- a/lib/puppet/network/rest_authconfig.rb
+++ b/lib/puppet/network/rest_authconfig.rb
@@@ -17,7 -17,6 +17,6 @@@ module Puppe
        { :acl => "/certificate/", :method => :find, :authenticated => false },
        { :acl => "/certificate_request", :method => [:find, :save], :authenticated => false },
        { :acl => "/status", :method => [:find], :authenticated => true },
-       { :acl => "/resource", :method => [:find, :save, :search], :authenticated => true },
      ]
  
      def self.main
@@@ -32,21 -31,21 +31,21 @@@
      # check wether this request is allowed in our ACL
      # raise an Puppet::Network::AuthorizedError if the request
      # is denied.
 -    def allowed?(request)
 +    def allowed?(indirection, method, key, params)
        read
  
        # we're splitting the request in part because
        # fail_on_deny could as well be called in the XMLRPC context
        # with a ClientRequest.
  
 -            @rights.fail_on_deny(
 -        build_uri(request),
 -        
 -                  :node => request.node,
 -                  :ip => request.ip,
 -                  :method => request.method,
 -                  :environment => request.environment,
 -                  :authenticated => request.authenticated)
 +      @rights.fail_on_deny(
 +        build_uri(indirection, key),
 +        :node => params[:node],
 +        :ip => params[:ip],
 +        :method => method,
 +        :environment => params[:environment],
 +        :authenticated => params[:authenticated]
 +      )
      end
  
      def initialize(file = nil, parsenow = true)
@@@ -90,8 -89,8 +89,8 @@@
        @rights.restrict_authenticated(acl[:acl], acl[:authenticated]) unless acl[:authenticated].nil?
      end
  
 -    def build_uri(request)
 -      "/#{request.indirection_name}/#{request.key}"
 +    def build_uri(indirection_name, key)
 +      "/#{indirection_name}/#{key}"
      end
    end
  end
diff --combined spec/unit/network/rest_authconfig_spec.rb
index e81eb41,06436e7..10dbb76
--- a/spec/unit/network/rest_authconfig_spec.rb
+++ b/spec/unit/network/rest_authconfig_spec.rb
@@@ -17,7 -17,6 +17,6 @@@ describe Puppet::Network::RestAuthConfi
      { :acl => "/certificate/", :method => :find, :authenticated => false },
      { :acl => "/certificate_request", :method => [:find, :save], :authenticated => false },
      { :acl => "/status", :method => [:find], :authenticated => true },
-     { :acl => "/resource", :method => [:find, :save, :search], :authenticated => true },
    ]
  
    before :each do
@@@ -30,6 -29,9 +29,6 @@@
  
      @acl = stub_everything 'rights'
      @authconfig.rights = @acl
 -
 -    @request = stub 'request', :indirection_name => "path", :key => "to/resource", :ip => "127.0.0.1",
 -      :node => "me", :method => :save, :environment => :env, :authenticated => true
    end
  
    it "should use the puppet default rest authorization file" do
@@@ -38,10 -40,16 +37,10 @@@
      Puppet::Network::RestAuthConfig.new(nil, false)
    end
  
    it "should ask for authorization to the ACL subsystem" do
      @acl.expects(:fail_on_deny).with("/path/to/resource", :node => "me", :ip => "127.0.0.1", :method => :save, :environment => :env, :authenticated => true)
  
 -    @authconfig.allowed?(@request)
 +    @authconfig.allowed?("path", :save, "to/resource", :ip => "127.0.0.1", :node => "me", :environment => :env, :authenticated => true)
    end
  
    describe "when defining an acl with mk_acl" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list