Class: MCollective::Signer::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/mcollective/signer/base.rb

Direct Known Subclasses

Choria

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



10
11
12
13
# File 'lib/mcollective/signer/base.rb', line 10

def initialize
  @config = Config.instance
  @log = Log
end

Class Method Details

.inherited(klass) ⇒ Object

Register plugins that inherits base



5
6
7
8
# File 'lib/mcollective/signer/base.rb', line 5

def self.inherited(klass)
  PluginManager << {:type => "choria_signer_plugin", :class => klass.to_s}
  super
end

Instance Method Details

#sign_secure_request!(secure_request) ⇒ Object

Signs a secure request

Generally for local mode this would just use the users own certificate but if you have a remote signer this might use a token to speak to a remote API, by default Choria supports a standard web service for remote signatures

Parameters:

  • secure_request (Hash)

    a choria:secure:request:1 hash

Raises:

  • (StandardError)

    when signing fails



23
24
25
# File 'lib/mcollective/signer/base.rb', line 23

def sign_secure_request!(secure_request)
  raise(NoMethodError, "undefined method `sign_secure_request!' for %s" % inspect)
end