Sha256: 6782f0e68519bf3a5f1647656979e34010dfb230542c638a3baa0df7933df1f0

Contents?: true

Size: 732 Bytes

Versions: 20

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true
module Puppet::Network
  module Authorization
    class << self
      # This method is deprecated and will be removed in a future release.
      def authconfigloader_class=(klass)
        @authconfigloader_class = klass
      end

      # Verify something external to puppet is authorizing REST requests, so
      # we don't fail insecurely due to misconfiguration.
      def check_external_authorization(method, path)
        if @authconfigloader_class.nil?
          message = "Forbidden request: #{path} (method #{method})"
          raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError.new(message, Puppet::Network::HTTP::Issues::FAILED_AUTHORIZATION)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/network/authorization.rb
puppet-8.3.0-x86-mingw32 lib/puppet/network/authorization.rb
puppet-8.3.0-x64-mingw32 lib/puppet/network/authorization.rb
puppet-8.3.0-universal-darwin lib/puppet/network/authorization.rb
puppet-8.3.1 lib/puppet/network/authorization.rb
puppet-8.3.1-x86-mingw32 lib/puppet/network/authorization.rb
puppet-8.3.1-x64-mingw32 lib/puppet/network/authorization.rb
puppet-8.3.1-universal-darwin lib/puppet/network/authorization.rb
puppet-8.2.0 lib/puppet/network/authorization.rb
puppet-8.2.0-x86-mingw32 lib/puppet/network/authorization.rb
puppet-8.2.0-x64-mingw32 lib/puppet/network/authorization.rb
puppet-8.2.0-universal-darwin lib/puppet/network/authorization.rb
puppet-8.1.0 lib/puppet/network/authorization.rb
puppet-8.1.0-x86-mingw32 lib/puppet/network/authorization.rb
puppet-8.1.0-x64-mingw32 lib/puppet/network/authorization.rb
puppet-8.1.0-universal-darwin lib/puppet/network/authorization.rb
puppet-8.0.1 lib/puppet/network/authorization.rb
puppet-8.0.1-x86-mingw32 lib/puppet/network/authorization.rb
puppet-8.0.1-x64-mingw32 lib/puppet/network/authorization.rb
puppet-8.0.1-universal-darwin lib/puppet/network/authorization.rb