-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>Class: MCollective::Security::Base</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
- <script type="text/javascript">
- // <![CDATA[
-
- function popupCode( url ) {
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
- }
-
- function toggleCode( id ) {
- if ( document.getElementById )
- elem = document.getElementById( id );
- else if ( document.all )
- elem = eval( "document.all." + id );
- else
- return false;
-
- elemStyle = elem.style;
-
- if ( elemStyle.display != "block" ) {
- elemStyle.display = "block"
- } else {
- elemStyle.display = "none"
- }
-
- return true;
- }
-
- // Make codeblocks hidden by default
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
-
- // ]]>
- </script>
-
-</head>
-<body>
-
-
-
- <div id="classHeader">
- <table class="header-table">
- <tr class="top-aligned-row">
- <td><strong>Class</strong></td>
- <td class="class-name-in-header">MCollective::Security::Base</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../../files/lib/mcollective/security/base_rb.html">
- lib/mcollective/security/base.rb
- </a>
- <br />
- </td>
- </tr>
-
- <tr class="top-aligned-row">
- <td><strong>Parent:</strong></td>
- <td>
- Object
- </td>
- </tr>
- </table>
- </div>
- <!-- banner header -->
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
- <div id="bodyContent">
+ <title>Class: MCollective::Security::Base</title>
+ <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
+ <script src="../../js/jquery.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="../../js/thickbox-compressed.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="../../js/quicksearch.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="../../js/darkfish.js" type="text/javascript"
+ charset="utf-8"></script>
- <div id="contextContent">
-
- <div id="description">
- <p>
+</head>
+<body class="class">
+
+ <div id="metadata">
+ <div id="file-metadata">
+ <div id="file-list-section" class="section">
+ <h3 class="section-header">In Files</h3>
+ <div class="section-body">
+ <ul>
+
+ <li><a href="../../lib/mcollective/security/base_rb.html?TB_iframe=true&height=550&width=785"
+ class="thickbox" title="lib/mcollective/security/base.rb">lib/mcollective/security/base.rb</a></li>
+
+ </ul>
+ </div>
+ </div>
+
+
+ </div>
+
+ <div id="class-metadata">
+
+ <!-- Parent Class -->
+
+ <div id="parent-class-section" class="section">
+ <h3 class="section-header">Parent</h3>
+
+ <p class="link"><a href="../../Object.html">Object</a></p>
+
+ </div>
+
+
+ <!-- Namespace Contents -->
+
+
+ <!-- Method Quickref -->
+
+ <div id="method-list-section" class="section">
+ <h3 class="section-header">Methods</h3>
+ <ul class="link-list">
+
+ <li><a href="#M000353">::inherited</a></li>
+
+ <li><a href="#M000354">::new</a></li>
+
+ <li><a href="#M000361">#callerid</a></li>
+
+ <li><a href="#M000356">#create_reply</a></li>
+
+ <li><a href="#M000357">#create_request</a></li>
+
+ <li><a href="#M000366">#decodemsg</a></li>
+
+ <li><a href="#M000364">#encodereply</a></li>
+
+ <li><a href="#M000363">#encoderequest</a></li>
+
+ <li><a href="#M000359">#should_process_msg?</a></li>
+
+ <li><a href="#M000360">#valid_callerid?</a></li>
+
+ <li><a href="#M000355">#validate_filter?</a></li>
+
+ <li><a href="#M000362">#validrequest?</a></li>
+
+ </ul>
+ </div>
+
+
+ <!-- Included Modules -->
+
+ </div>
+
+ <div id="project-metadata">
+
+
+ <div id="fileindex-section" class="section project-section">
+ <h3 class="section-header">Files</h3>
+ <ul>
+
+ <li class="file"><a href="../../COPYING.html">COPYING</a></li>
+
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a></li>
+
+ <li class="file"><a href="../../README.html">README</a></li>
+
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a></li>
+
+ <li class="file"><a href="../../etc/client_cfg_dist.html">client.cfg.dist</a></li>
+
+ <li class="file"><a href="../../etc/data-help_erb.html">data-help.erb</a></li>
+
+ <li class="file"><a href="../../etc/discovery-help_erb.html">discovery-help.erb</a></li>
+
+ <li class="file"><a href="../../etc/facts_yaml_dist.html">facts.yaml.dist</a></li>
+
+ <li class="file"><a href="../../etc/metadata-help_erb.html">metadata-help.erb</a></li>
+
+ <li class="file"><a href="../../etc/msg-help_erb.html">msg-help.erb</a></li>
+
+ <li class="file"><a href="../../etc/rpc-help_erb.html">rpc-help.erb</a></li>
+
+ <li class="file"><a href="../../etc/server_cfg_dist.html">server.cfg.dist</a></li>
+
+ <li class="file"><a href="../../etc/ssl/PLACEHOLDER.html">PLACEHOLDER</a></li>
+
+ <li class="file"><a href="../../etc/ssl/clients/PLACEHOLDER.html">PLACEHOLDER</a></li>
+
+ <li class="file"><a href="../../lib/mcollective/generators/templates/action_snippet_erb.html">action_snippet.erb</a></li>
+
+ <li class="file"><a href="../../lib/mcollective/generators/templates/data_input_snippet_erb.html">data_input_snippet.erb</a></li>
+
+ <li class="file"><a href="../../lib/mcollective/generators/templates/ddl_erb.html">ddl.erb</a></li>
+
+ <li class="file"><a href="../../lib/mcollective/generators/templates/plugin_erb.html">plugin.erb</a></li>
+
+ <li class="file"><a href="../../lib/mcollective/locales/en_yml.html">en.yml</a></li>
+
+ <li class="file"><a href="../../mcollective_init.html">mcollective.init</a></li>
+
+ </ul>
+ </div>
+
+
+ <div id="classindex-section" class="section project-section">
+ <h3 class="section-header">Class Index
+ <span class="search-toggle"><img src="../../images/find.png"
+ height="16" width="16" alt="[+]"
+ title="show/hide quicksearch" /></span></h3>
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
+ <fieldset>
+ <legend>Quicksearch</legend>
+ <input type="text" name="quicksearch" value=""
+ class="quicksearch-field" />
+ </fieldset>
+ </form>
+
+ <ul class="link-list">
+
+ <li><a href="../../MCollective.html">MCollective</a></li>
+
+ <li><a href="../../MCollective/Agent.html">MCollective::Agent</a></li>
+
+ <li><a href="../../MCollective/Agents.html">MCollective::Agents</a></li>
+
+ <li><a href="../../MCollective/Aggregate.html">MCollective::Aggregate</a></li>
+
+ <li><a href="../../MCollective/Aggregate/Base.html">MCollective::Aggregate::Base</a></li>
+
+ <li><a href="../../MCollective/Aggregate/Result.html">MCollective::Aggregate::Result</a></li>
+
+ <li><a href="../../MCollective/Aggregate/Result/Base.html">MCollective::Aggregate::Result::Base</a></li>
+
+ <li><a href="../../MCollective/Aggregate/Result/CollectionResult.html">MCollective::Aggregate::Result::CollectionResult</a></li>
+
+ <li><a href="../../MCollective/Aggregate/Result/NumericResult.html">MCollective::Aggregate::Result::NumericResult</a></li>
+
+ <li><a href="../../MCollective/Application.html">MCollective::Application</a></li>
+
+ <li><a href="../../MCollective/Applications.html">MCollective::Applications</a></li>
+
+ <li><a href="../../MCollective/Cache.html">MCollective::Cache</a></li>
+
+ <li><a href="../../MCollective/Client.html">MCollective::Client</a></li>
+
+ <li><a href="../../MCollective/CodedError.html">MCollective::CodedError</a></li>
+
+ <li><a href="../../MCollective/Config.html">MCollective::Config</a></li>
+
+ <li><a href="../../MCollective/Connector.html">MCollective::Connector</a></li>
+
+ <li><a href="../../MCollective/Connector/Base.html">MCollective::Connector::Base</a></li>
+
+ <li><a href="../../MCollective/DDL.html">MCollective::DDL</a></li>
+
+ <li><a href="../../MCollective/DDL/AgentDDL.html">MCollective::DDL::AgentDDL</a></li>
+
+ <li><a href="../../MCollective/DDL/Base.html">MCollective::DDL::Base</a></li>
+
+ <li><a href="../../MCollective/DDL/DataDDL.html">MCollective::DDL::DataDDL</a></li>
+
+ <li><a href="../../MCollective/DDL/DiscoveryDDL.html">MCollective::DDL::DiscoveryDDL</a></li>
+
+ <li><a href="../../MCollective/DDL/ValidatorDDL.html">MCollective::DDL::ValidatorDDL</a></li>
+
+ <li><a href="../../MCollective/DDLValidationError.html">MCollective::DDLValidationError</a></li>
+
+ <li><a href="../../MCollective/Data.html">MCollective::Data</a></li>
+
+ <li><a href="../../MCollective/Data/Base.html">MCollective::Data::Base</a></li>
+
+ <li><a href="../../MCollective/Data/Result.html">MCollective::Data::Result</a></li>
+
+ <li><a href="../../MCollective/Discovery.html">MCollective::Discovery</a></li>
+
+ <li><a href="../../MCollective/Facts.html">MCollective::Facts</a></li>
+
+ <li><a href="../../MCollective/Facts/Base.html">MCollective::Facts::Base</a></li>
+
+ <li><a href="../../MCollective/Generators.html">MCollective::Generators</a></li>
+
+ <li><a href="../../MCollective/Generators/AgentGenerator.html">MCollective::Generators::AgentGenerator</a></li>
+
+ <li><a href="../../MCollective/Generators/Base.html">MCollective::Generators::Base</a></li>
+
+ <li><a href="../../MCollective/Generators/DataGenerator.html">MCollective::Generators::DataGenerator</a></li>
+
+ <li><a href="../../MCollective/InvalidRPCData.html">MCollective::InvalidRPCData</a></li>
+
+ <li><a href="../../MCollective/Log.html">MCollective::Log</a></li>
+
+ <li><a href="../../MCollective/Logger.html">MCollective::Logger</a></li>
+
+ <li><a href="../../MCollective/Logger/Base.html">MCollective::Logger::Base</a></li>
+
+ <li><a href="../../MCollective/Logger/Console_logger.html">MCollective::Logger::Console_logger</a></li>
+
+ <li><a href="../../MCollective/Logger/File_logger.html">MCollective::Logger::File_logger</a></li>
+
+ <li><a href="../../MCollective/Logger/Syslog_logger.html">MCollective::Logger::Syslog_logger</a></li>
+
+ <li><a href="../../MCollective/Matcher.html">MCollective::Matcher</a></li>
+
+ <li><a href="../../MCollective/Matcher/Parser.html">MCollective::Matcher::Parser</a></li>
+
+ <li><a href="../../MCollective/Matcher/Scanner.html">MCollective::Matcher::Scanner</a></li>
+
+ <li><a href="../../MCollective/Message.html">MCollective::Message</a></li>
+
+ <li><a href="../../MCollective/MissingRPCData.html">MCollective::MissingRPCData</a></li>
+
+ <li><a href="../../MCollective/MsgDoesNotMatchRequestID.html">MCollective::MsgDoesNotMatchRequestID</a></li>
+
+ <li><a href="../../MCollective/MsgTTLExpired.html">MCollective::MsgTTLExpired</a></li>
+
+ <li><a href="../../MCollective/NotTargettedAtUs.html">MCollective::NotTargettedAtUs</a></li>
+
+ <li><a href="../../MCollective/Optionparser.html">MCollective::Optionparser</a></li>
+
+ <li><a href="../../MCollective/PluginManager.html">MCollective::PluginManager</a></li>
+
+ <li><a href="../../MCollective/PluginPackager.html">MCollective::PluginPackager</a></li>
+
+ <li><a href="../../MCollective/PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
+
+ <li><a href="../../MCollective/PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
+
+ <li><a href="../../MCollective/RPC.html">MCollective::RPC</a></li>
+
+ <li><a href="../../MCollective/RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
+
+ <li><a href="../../MCollective/RPC/Agent.html">MCollective::RPC::Agent</a></li>
+
+ <li><a href="../../MCollective/RPC/Audit.html">MCollective::RPC::Audit</a></li>
+
+ <li><a href="../../MCollective/RPC/Client.html">MCollective::RPC::Client</a></li>
+
+ <li><a href="../../MCollective/RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
+
+ <li><a href="../../MCollective/RPC/Progress.html">MCollective::RPC::Progress</a></li>
+
+ <li><a href="../../MCollective/RPC/Reply.html">MCollective::RPC::Reply</a></li>
+
+ <li><a href="../../MCollective/RPC/Request.html">MCollective::RPC::Request</a></li>
+
+ <li><a href="../../MCollective/RPC/Result.html">MCollective::RPC::Result</a></li>
+
+ <li><a href="../../MCollective/RPC/Stats.html">MCollective::RPC::Stats</a></li>
+
+ <li><a href="../../MCollective/RPCAborted.html">MCollective::RPCAborted</a></li>
+
+ <li><a href="../../MCollective/RPCError.html">MCollective::RPCError</a></li>
+
+ <li><a href="../../MCollective/Registration.html">MCollective::Registration</a></li>
+
+ <li><a href="../../MCollective/Registration/Base.html">MCollective::Registration::Base</a></li>
+
+ <li><a href="../../MCollective/Runner.html">MCollective::Runner</a></li>
+
+ <li><a href="../../MCollective/RunnerStats.html">MCollective::RunnerStats</a></li>
+
+ <li><a href="../../MCollective/SSL.html">MCollective::SSL</a></li>
+
+ <li><a href="../../MCollective/Security.html">MCollective::Security</a></li>
+
+ <li><a href="../../MCollective/Security/Base.html">MCollective::Security::Base</a></li>
+
+ <li><a href="../../MCollective/SecurityValidationFailed.html">MCollective::SecurityValidationFailed</a></li>
+
+ <li><a href="../../MCollective/Shell.html">MCollective::Shell</a></li>
+
+ <li><a href="../../MCollective/Translatable.html">MCollective::Translatable</a></li>
+
+ <li><a href="../../MCollective/UnixDaemon.html">MCollective::UnixDaemon</a></li>
+
+ <li><a href="../../MCollective/UnknownRPCAction.html">MCollective::UnknownRPCAction</a></li>
+
+ <li><a href="../../MCollective/UnknownRPCError.html">MCollective::UnknownRPCError</a></li>
+
+ <li><a href="../../MCollective/Util.html">MCollective::Util</a></li>
+
+ <li><a href="../../MCollective/Validator.html">MCollective::Validator</a></li>
+
+ <li><a href="../../MCollective/ValidatorError.html">MCollective::ValidatorError</a></li>
+
+ <li><a href="../../MCollective/WindowsDaemon.html">MCollective::WindowsDaemon</a></li>
+
+ <li><a href="../../Array.html">Array</a></li>
+
+ <li><a href="../../Dir.html">Dir</a></li>
+
+ <li><a href="../../Object.html">Object</a></li>
+
+ <li><a href="../../String.html">String</a></li>
+
+ <li><a href="../../Symbol.html">Symbol</a></li>
+
+ </ul>
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
+ </div>
+
+
+ </div>
+ </div>
+
+ <div id="documentation">
+ <h1 class="class">MCollective::Security::Base</h1>
+
+ <div id="description">
+ <p>
This is a base class the other security modules should inherit from it
handles statistics and validation of messages that should in most cases
apply to all security models.
inherits from this and provides the following methods:
</p>
<p>
-<a href="Base.html#M000271">decodemsg</a> - Decodes a message that was
-received from the middleware <a href="Base.html#M000270">encodereply</a> -
-Encodes a reply message to a previous request message <a
-href="Base.html#M000269">encoderequest</a> - Encodes a <a
-href="Base.html#M000261">new</a> request message <a
-href="Base.html#M000268">validrequest?</a> - Validates a request received
-from the middleware
+decodemsg - Decodes a message that was received from the middleware
+encodereply - Encodes a reply message to a previous request message
+encoderequest - Encodes a new request message validrequest? - Validates a
+request received from the middleware
</p>
<p>
Optionally if you are identifying users by some other means like
-certificate name you can provide your own <a
-href="Base.html#M000267">callerid</a> method that can provide the rest of
-the system with an id, and you would see this id being usable in SimpleRPC
-authorization methods
+certificate name you can provide your own callerid method that can provide
+the rest of the system with an id, and you would see this id being usable
+in SimpleRPC authorization methods
</p>
<p>
-The @initiated_by variable will be set to either :client or :node depending
-on who is using this plugin. This is to help security providers that
-operate in an asymetric mode like public/private key based systems.
+The @<a href="Base.html#initiated_by">initiated_by</a> variable will be set
+to either :client or :node depending on who is using this plugin. This is
+to help security providers that operate in an asymetric mode like
+public/private key based systems.
</p>
<p>
Specifics of each of these are a bit fluid and the interfaces for this is
MCollective::Security::PSK plugin.
</p>
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000267">callerid</a>
- <a href="#M000263">create_reply</a>
- <a href="#M000264">create_request</a>
- <a href="#M000271">decodemsg</a>
- <a href="#M000270">encodereply</a>
- <a href="#M000269">encoderequest</a>
- <a href="#M000260">inherited</a>
- <a href="#M000261">new</a>
- <a href="#M000265">should_process_msg?</a>
- <a href="#M000266">valid_callerid?</a>
- <a href="#M000262">validate_filter?</a>
- <a href="#M000268">validrequest?</a>
- </div>
- </div>
-
- </div>
-
-
- <!-- if includes -->
-
- <div id="section">
-
-
-
-
-
- <div id="attribute-list">
- <h3 class="section-bar">Attributes</h3>
-
- <div class="name-list">
- <table>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">initiated_by</td>
- <td class="context-item-value"> [RW] </td>
- <td class="context-item-desc"></td>
- </tr>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">stats</td>
- <td class="context-item-value"> [R] </td>
- <td class="context-item-desc"></td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Class methods</h3>
-
- <div id="method-M000260" class="method-detail">
- <a name="M000260"></a>
-
- <div class="method-heading">
- <a href="#M000260" class="method-signature">
- <span class="method-name">inherited</span><span class="method-args">(klass)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+ </div>
+
+ <!-- Constants -->
+
+
+ <!-- Attributes -->
+
+ <div id="attribute-method-details" class="method-section section">
+ <h3 class="section-header">Attributes</h3>
+
+
+ <div id="stats-attribute-method" class="method-detail">
+ <a name="stats"></a>
+
+ <div class="method-heading attribute-method-heading">
+ <span class="method-name">stats</span><span
+ class="attribute-access-type">[R]</span>
+ </div>
+
+ <div class="method-description">
+
+ <p class="missing-docs">(Not documented)</p>
+
+ </div>
+ </div>
+
+ <div id="initiated-by-attribute-method" class="method-detail">
+ <a name="initiated_by"></a>
+
+ <a name="initiated_by="></a>
+
+ <div class="method-heading attribute-method-heading">
+ <span class="method-name">initiated_by</span><span
+ class="attribute-access-type">[RW]</span>
+ </div>
+
+ <div class="method-description">
+
+ <p class="missing-docs">(Not documented)</p>
+
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- Methods -->
+
+ <div id="public-class-method-details" class="method-section section">
+ <h3 class="section-header">Public Class Methods</h3>
+
+
+ <div id="inherited-method" class="method-detail ">
+ <a name="M000353"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">inherited</span><span
+ class="method-args">(klass)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
Register plugins that inherits base
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000260-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000260-source">
+
+
+
+ <div class="method-source-code"
+ id="inherited-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 32</span>
32: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inherited</span>(<span class="ruby-identifier">klass</span>)
33: <span class="ruby-constant">PluginManager</span> <span class="ruby-operator"><<</span> {<span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"security_plugin"</span>, <span class="ruby-identifier">:class</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_s</span>}
-34: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000261" class="method-detail">
- <a name="M000261"></a>
-
- <div class="method-heading">
- <a href="#M000261" class="method-signature">
- <span class="method-name">new</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Initializes configuration and logging as well as prepare a zero‘d
+34: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="new-method" class="method-detail ">
+ <a name="M000354"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">new</span><span
+ class="method-args">()</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Initializes configuration and logging as well as prepare a zero’d
hash of stats various security methods and filter validators should
increment stats, see MCollective::Security::Psk for a sample
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000261-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000261-source">
+
+
+
+ <div class="method-source-code"
+ id="new-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 38</span>
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
39: <span class="ruby-ivar">@config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>
40: <span class="ruby-ivar">@log</span> = <span class="ruby-constant">Log</span>
41: <span class="ruby-ivar">@stats</span> = <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">"global_stats"</span>]
-42: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000267" class="method-detail">
- <a name="M000267"></a>
-
- <div class="method-heading">
- <a href="#M000267" class="method-signature">
- <span class="method-name">callerid</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+42: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+ <div id="public-instance-method-details" class="method-section section">
+ <h3 class="section-header">Public Instance Methods</h3>
+
+
+ <div id="callerid-method" class="method-detail ">
+ <a name="M000361"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">callerid</span><span
+ class="method-args">()</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
Returns a unique id for the caller, by default we just use the unix user
id, security plugins can provide their own means of doing ids.
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000267-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000267-source">
+
+
+
+ <div class="method-source-code"
+ id="callerid-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 219</span>
219: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callerid</span>
220: <span class="ruby-node">"uid=#{Process.uid}"</span>
-221: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000263" class="method-detail">
- <a name="M000263"></a>
-
- <div class="method-heading">
- <a href="#M000263" class="method-signature">
- <span class="method-name">create_reply</span><span class="method-args">(reqid, agent, body)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000263-source">
+221: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="create-reply-method" class="method-detail ">
+ <a name="M000356"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">create_reply</span><span
+ class="method-args">(reqid, agent, body)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p class="missing-docs">(Not documented)</p>
+
+
+
+ <div class="method-source-code"
+ id="create-reply-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 167</span>
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_reply</span>(<span class="ruby-identifier">reqid</span>, <span class="ruby-identifier">agent</span>, <span class="ruby-identifier">body</span>)
172: <span class="ruby-identifier">:senderagent</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">agent</span>,
173: <span class="ruby-identifier">:msgtime</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">to_i</span>,
174: <span class="ruby-identifier">:body</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">body</span>}
-175: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000264" class="method-detail">
- <a name="M000264"></a>
-
- <div class="method-heading">
- <a href="#M000264" class="method-signature">
- <span class="method-name">create_request</span><span class="method-args">(reqid, filter, msg, initiated_by, target_agent, target_collective, ttl=60)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000264-source">
+175: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="create-request-method" class="method-detail ">
+ <a name="M000357"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">create_request</span><span
+ class="method-args">(reqid, filter, msg, initiated_by, target_agent, target_collective, ttl=60)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p class="missing-docs">(Not documented)</p>
+
+
+
+ <div class="method-source-code"
+ id="create-request-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 177</span>
177: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_request</span>(<span class="ruby-identifier">reqid</span>, <span class="ruby-identifier">filter</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-identifier">initiated_by</span>, <span class="ruby-identifier">target_agent</span>, <span class="ruby-identifier">target_collective</span>, <span class="ruby-identifier">ttl</span>=<span class="ruby-value">60</span>)
186: <span class="ruby-identifier">:callerid</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">callerid</span>,
187: <span class="ruby-identifier">:ttl</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ttl</span>,
188: <span class="ruby-identifier">:msgtime</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">to_i</span>}
-189: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000271" class="method-detail">
- <a name="M000271"></a>
-
- <div class="method-heading">
- <a href="#M000271" class="method-signature">
- <span class="method-name">decodemsg</span><span class="method-args">(msg)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+189: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="decodemsg-method" class="method-detail ">
+ <a name="M000366"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">decodemsg</span><span
+ class="method-args">(msg)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
<a href="../Security.html">Security</a> providers should provide this, see
MCollective::Security::Psk
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000271-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000271-source">
+
+
+
+ <div class="method-source-code"
+ id="decodemsg-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 239</span>
239: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decodemsg</span>(<span class="ruby-identifier">msg</span>)
240: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"decodemsg is not implemented in #{self.class}"</span>)
-241: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000270" class="method-detail">
- <a name="M000270"></a>
-
- <div class="method-heading">
- <a href="#M000270" class="method-signature">
- <span class="method-name">encodereply</span><span class="method-args">(sender, msg, requestcallerid=nil)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+241: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="encodereply-method" class="method-detail ">
+ <a name="M000364"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">encodereply</span><span
+ class="method-args">(sender, msg, requestcallerid=nil)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
<a href="../Security.html">Security</a> providers should provide this, see
MCollective::Security::Psk
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000270-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000270-source">
+
+
+
+ <div class="method-source-code"
+ id="encodereply-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 234</span>
234: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encodereply</span>(<span class="ruby-identifier">sender</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-identifier">requestcallerid</span>=<span class="ruby-keyword kw">nil</span>)
235: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"encodereply is not implemented in #{self.class}"</span>)
-236: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000269" class="method-detail">
- <a name="M000269"></a>
-
- <div class="method-heading">
- <a href="#M000269" class="method-signature">
- <span class="method-name">encoderequest</span><span class="method-args">(sender, msg, filter={})</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+236: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="encoderequest-method" class="method-detail ">
+ <a name="M000363"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">encoderequest</span><span
+ class="method-args">(sender, msg, filter={})</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
<a href="../Security.html">Security</a> providers should provide this, see
MCollective::Security::Psk
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000269-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000269-source">
+
+
+
+ <div class="method-source-code"
+ id="encoderequest-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 229</span>
229: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encoderequest</span>(<span class="ruby-identifier">sender</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-identifier">filter</span>={})
230: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"encoderequest is not implemented in #{self.class}"</span>)
-231: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000265" class="method-detail">
- <a name="M000265"></a>
-
- <div class="method-heading">
- <a href="#M000265" class="method-signature">
- <span class="method-name">should_process_msg?</span><span class="method-args">(msg, msgid)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+231: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="should-process-msg--method" class="method-detail ">
+ <a name="M000359"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">should_process_msg?</span><span
+ class="method-args">(msg, msgid)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
Give a MC::Message instance and a message id this will figure out if you
the incoming message id matches the one the <a
href="../Message.html">Message</a> object is expecting and raise if its not
Mostly used by security plugins to figure out if they should do the hard
work of decrypting etc messages that would only later on be ignored
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000265-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000265-source">
+
+
+
+ <div class="method-source-code"
+ id="should-process-msg--source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 196</span>
196: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">should_process_msg?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">msgid</span>)
203: <span class="ruby-keyword kw">end</span>
204:
205: <span class="ruby-keyword kw">true</span>
-206: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000266" class="method-detail">
- <a name="M000266"></a>
-
- <div class="method-heading">
- <a href="#M000266" class="method-signature">
- <span class="method-name">valid_callerid?</span><span class="method-args">(id)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Validates a <a href="Base.html#M000267">callerid</a>. We do not want to
-allow things like \ and / in callerids since other plugins make assumptions
-that these are safe strings.
+206: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="valid-callerid--method" class="method-detail ">
+ <a name="M000360"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">valid_callerid?</span><span
+ class="method-args">(id)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Validates a callerid. We do not want to allow things like \ and / in
+callerids since other plugins make assumptions that these are safe strings.
</p>
<p>
callerids are generally in the form uid=123 or cert=foo etc so we do that
here but security plugins could override this for some complex uses
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000266-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000266-source">
+
+
+
+ <div class="method-source-code"
+ id="valid-callerid--source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 213</span>
213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_callerid?</span>(<span class="ruby-identifier">id</span>)
214: <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">id</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^[\w]+=[\w\.\-]+$/</span>)
-215: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000262" class="method-detail">
- <a name="M000262"></a>
-
- <div class="method-heading">
- <a href="#M000262" class="method-signature">
- <span class="method-name">validate_filter?</span><span class="method-args">(filter)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+215: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="validate-filter--method" class="method-detail ">
+ <a name="M000355"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">validate_filter?</span><span
+ class="method-args">(filter)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
Takes a Hash with a filter in it and validates it against host information.
</p>
<p>
</li>
</ul>
<p>
-TODO: Support REGEX and/or multiple filter keys to be AND‘d
+TODO: Support REGEX and/or multiple filter keys to be AND’d
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000262-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000262-source">
+
+
+
+ <div class="method-source-code"
+ id="validate-filter--source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 55</span>
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_filter?</span>(<span class="ruby-identifier">filter</span>)
162:
163: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
164: <span class="ruby-keyword kw">end</span>
-165: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000268" class="method-detail">
- <a name="M000268"></a>
-
- <div class="method-heading">
- <a href="#M000268" class="method-signature">
- <span class="method-name">validrequest?</span><span class="method-args">(req)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+165: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="validrequest--method" class="method-detail ">
+ <a name="M000362"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">validrequest?</span><span
+ class="method-args">(req)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
<a href="../Security.html">Security</a> providers should provide this, see
MCollective::Security::Psk
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000268-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000268-source">
+
+
+
+ <div class="method-source-code"
+ id="validrequest--source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/security/base.rb, line 224</span>
224: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validrequest?</span>(<span class="ruby-identifier">req</span>)
225: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"validrequest? is not implemented in #{self.class}"</span>)
-226: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
+226: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+ </div>
- </div>
+
+ </div>
+
+ </div>
- </div>
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
+
+ <p>Disabled; run with --debug to generate this.</p>
+
+ </div>
-<div id="validator-badges">
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
-</div>
+ <div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
+ Rdoc Generator</a> 1.1.6</small>.</p>
+ </div>
</body>
-</html>
\ No newline at end of file
+</html>
+