Sha256: 8f119f1ba35ed706d8a379b8adfa695d6044a841af866d6cf3f50b786b3cbe49

Contents?: true

Size: 706 Bytes

Versions: 286

Compression:

Stored size: 706 Bytes

Contents

require 'puppet/indirector/code'
require 'puppet/ssl/certificate_request'

class Puppet::SSL::CertificateRequest::DisabledCa < Puppet::Indirector::Code
  desc "Manage SSL certificate requests on disk, but reject any remote access
to the SSL data store. Used when a master has an explicitly disabled CA to
prevent clients getting confusing 'success' behaviour."

  def initialize
    @file = Puppet::SSL::CertificateRequest.indirection.terminus(:file)
  end

  [:find, :head, :search, :save, :destroy].each do |name|
    define_method(name) do |request|
      if request.remote?
        raise Puppet::Error, "this master is not a CA"
      else
        @file.send(name, request)
      end
    end
  end
end

Version data entries

286 entries across 286 versions & 4 rubygems

Version Path
puppet-retrospec-1.5.0 vendor/gems/puppet-4.5.2/lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.8 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.8-x86-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.8-x64-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.8-universal-darwin lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.7 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.7-x86-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.7-x64-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.7-universal-darwin lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.6 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.6-x86-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.6-x64-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.6-universal-darwin lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.5 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.5-x86-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.5-x64-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.5-universal-darwin lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.4 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.4-x86-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb
puppet-4.10.4-x64-mingw32 lib/puppet/indirector/certificate_request/disabled_ca.rb