3 # Auditing of requests is done only for SimpleRPC requests, you provide
4 # a plugin in the MCollective::Audit::* namespace which the SimpleRPC
5 # framework calls for each message
7 # We provide a simple one that logs to a logfile in the class
8 # MCollective::Audit::Logfile you can create your own:
10 # Create a class in plugins/mcollective/audit/<yourplugin>.rb
12 # You must inherit from MCollective::RPC::Audit which will take
13 # care of registering you with the plugin system.
15 # Your plugin must provide audit_request(request, connection)
16 # the request parameter will be an instance of MCollective::RPC::Request
18 # To enable auditing you should set:
21 # rpcauditprovider = Logfile
23 # in the config file this will enable logging using the
24 # MCollective::Audit::Logile class
26 # The Audit class acts as a base for audit plugins and takes care of registering them
27 # with the plugin manager
29 def self.inherited(klass)
30 PluginManager << {:type => "rpcaudit_plugin", :class => klass.to_s}
33 def audit_request(request, connection)
34 @log.error("audit_request is not implimented in #{this.class}")