Files
confdroid_ssh/doc/file.README.html
2026-04-14 17:02:59 +02:00

180 lines
6.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="file_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">File: README</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1>
<p><a href="https://jenkins.confdroid.com/job/confdroid_ssh/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_ssh&amp;style=plastic"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_ssh"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_ssh&amp;metric=security_hotspots&amp;token=sqb_8c77823906f10af2e4f8fcf24c467fe9dc500dba"></a></p>
<ul><li>
<p><a href="#readme">Readme</a></p>
</li><li>
<p><a href="#synopsis">Synopsis</a></p>
</li><li>
<p><a href="#warning">WARNING</a></p>
</li><li>
<p><a href="#features">Features</a></p>
</li><li>
<p><a href="#adding-custom-configurations">Adding custom configurations</a></p>
</li><li>
<p><a href="#support">Support</a></p>
</li><li>
<p><a href="#parameter-inheritance">Parameter Inheritance</a></p>
</li><li>
<p><a href="#module-deployment">Module Deployment</a></p>
</li><li>
<p><a href="#tests">Tests</a></p>
</li><li>
<p><a href="#contact-us">Contact Us</a></p>
</li><li>
<p><a href="#disclaimer">Disclaimer</a></p>
</li></ul>
<h2 id="label-Synopsis">Synopsis</h2>
<p><code>confdroid_ssh</code>manages the aspects of the sshd daemon.</p>
<h2 id="label-WARNING">WARNING</h2>
<blockquote>
<p><strong>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</strong></p>
</blockquote>
<h2 id="label-Features">Features</h2>
<ul><li>
<p>install required binaries</p>
</li><li>
<p>manage required files and directories including selinux context</p>
</li><li>
<p>manage service</p>
</li><li>
<p>(optional) manage firewall</p>
</li></ul>
<h2 id="label-Adding+custom+configurations">Adding custom configurations</h2>
<p>Custom configuration files live in <code>/etc/ssh/sshd_config.d/</code>. IN order to create a custom config file, add a stanza like this in your control repo:</p>
<pre class="code ruby"><code class="ruby">confdroid_ssh::custom::custom_config { &#39;30-my-custom-rule&#39;:
config_name =&gt; &#39;30-custom-rule&#39;,
config_content =&gt; [&#39;PasswordAuthentication no&#39;],
}
</code></pre>
<p>This will create a file /etc/ssh/sshd_config.d/30-custom-rule.conf with this content:</p>
<pre class="code ruby"><code class="ruby"><span class='comment'>###############################################################################
</span><span class='comment'>##### DO NOT EDIT THIS FILE MANUALLY #
</span><span class='comment'>##### This file is managed by Puppet. Any changes to this file will be #
</span><span class='comment'>##### overwritten. Update the Puppet define input instead. #
</span><span class='comment'>###############################################################################
</span><span class='const'>PasswordAuthentication</span> <span class='id identifier rubyid_no'>no</span>
</code></pre>
<p>Note that the value for config_content <strong>has to be an array</strong>, even if only one key pair is in there. This field is designed to hold multiple values, which create one line in the config file each.</p>
<h2 id="label-Support">Support</h2>
<ul><li>
<p>Rocky 9 (Any RHEL 9 based OS should work but has not been tested)</p>
</li><li>
<p>Puppet 8</p>
</li></ul>
<h2 id="label-Parameter+Inheritance">Parameter Inheritance</h2>
<p>All parameters are listed in <code>params.pp</code> and inherited from there. Variable parameters are in the upper section and also documented in the top. These can be overridden by the ENC. Parameters in the bottom section (curly brackets) cannot be overridden and usually are used for keeping the code in the classes more readable.</p>
<h2 id="label-Module+Deployment">Module Deployment</h2>
<p>Almost every puppet setup is done in very custom ways, and hence the way the modules are deployed to nodes are different. This module assumes <a href="https://www.theforeman.org/manuals/3.13/quickstart_guide.html">Foreman</a> as ENC, so the modules just have to be present on the master node and Foreman will take care for it.</p>
<h2 id="label-Tests">Tests</h2>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Sonar Quality Gate</p>
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<ul><li>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
</li><li>
<p><a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
</li></ul>
<h2 id="label-Disclaimer">Disclaimer</h2>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.</p>
</div></div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>