Module: Puppet::Network::Authorization
- Defined in:
- lib/puppet/network/authorization.rb
Class Method Summary collapse
-
.authconfigloader_class=(klass) ⇒ Object
This method is deprecated and will be removed in a future release.
-
.check_external_authorization(method, path) ⇒ Object
Verify something external to puppet is authorizing REST requests, so we don’t fail insecurely due to misconfiguration.
Class Method Details
.authconfigloader_class=(klass) ⇒ Object
This method is deprecated and will be removed in a future release.
7 8 9 |
# File 'lib/puppet/network/authorization.rb', line 7 def authconfigloader_class=(klass) @authconfigloader_class = klass end |
.check_external_authorization(method, path) ⇒ Object
Verify something external to puppet is authorizing REST requests, so we don’t fail insecurely due to misconfiguration.
13 14 15 16 17 18 |
# File 'lib/puppet/network/authorization.rb', line 13 def (method, path) if @authconfigloader_class.nil? = "Forbidden request: #{path} (method #{method})" raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError.new(, Puppet::Network::HTTP::Issues::FAILED_AUTHORIZATION) end end |