Sha256: b8c713bc1fff352c6afe01c712c46690fd7d08702a93488967c7ec094b3b6055

Contents?: true

Size: 680 Bytes

Versions: 162

Compression:

Stored size: 680 Bytes

Contents

require 'puppet/indirector/code'
require 'puppet/ssl/certificate'

class Puppet::SSL::Certificate::DisabledCa < Puppet::Indirector::Code
  desc "Manage SSL certificates 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::Certificate.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

162 entries across 162 versions & 2 rubygems

Version Path
bolt-0.20.6 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.20.5 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.20.3 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.20.2 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.19.1 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.1 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.1-x86-mingw32 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.1-x64-mingw32 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.1-universal-darwin lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.3.6 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.3.6-x86-mingw32 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.3.6-x64-mingw32 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.3.6-universal-darwin lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.19.0 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.18.2 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.18.1 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
bolt-0.18.0 vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.0 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.0-x86-mingw32 lib/puppet/indirector/certificate/disabled_ca.rb
puppet-5.5.0-x64-mingw32 lib/puppet/indirector/certificate/disabled_ca.rb