Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 1bc48f41aa3133e7c600817581bc4c91 > files > 87

krb5-workstation-1.17-2.1.mga7.armv7hl.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Configuring Kerberos with OpenLDAP back-end &#8212; MIT Kerberos Documentation</title>
    <link rel="stylesheet" href="../_static/agogo.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../_static/kerb.css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="next" title="Application servers" href="appl_servers.html" />
    <link rel="prev" title="Account lockout" href="lockout.html" /> 
  </head><body>
    <div class="header-wrapper">
        <div class="header">
            
            
            <h1><a href="../index.html">MIT Kerberos Documentation</a></h1>
            
            <div class="rel">
                
        <a href="../index.html" title="Full Table of Contents"
            accesskey="C">Contents</a> |
        <a href="lockout.html" title="Account lockout"
            accesskey="P">previous</a> |
        <a href="appl_servers.html" title="Application servers"
            accesskey="N">next</a> |
        <a href="../genindex.html" title="General Index"
            accesskey="I">index</a> |
        <a href="../search.html" title="Enter search criteria"
            accesskey="S">Search</a> |
    <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__Configuring Kerberos with OpenLDAP back-end">feedback</a>
            </div>
        </div>
    </div>

    <div class="content-wrapper">
      <div class="content">
        <div class="document">
            
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="configuring-kerberos-with-openldap-back-end">
<span id="conf-ldap"></span><h1>Configuring Kerberos with OpenLDAP back-end<a class="headerlink" href="#configuring-kerberos-with-openldap-back-end" title="Permalink to this headline">¶</a></h1>
<blockquote>
<div><ol class="arabic">
<li><p class="first">Set up SSL on the OpenLDAP server and client to ensure secure
communication when the KDC service and LDAP server are on different
machines.  <code class="docutils literal notranslate"><span class="pre">ldapi://</span></code> can be used if the LDAP server and KDC
service are running on the same machine.</p>
<ol class="upperalpha simple">
<li>Setting up SSL on the OpenLDAP server:</li>
</ol>
<blockquote>
<div><ol class="lowerroman">
<li><p class="first">Get a CA certificate using OpenSSL tools</p>
</li>
<li><p class="first">Configure OpenLDAP server for using SSL/TLS</p>
<p>For the latter, you need to specify the location of CA
certificate location in <em>slapd.conf</em> file.</p>
<p>Refer to the following link for more information:
<a class="reference external" href="https://www.openldap.org/doc/admin23/tls.html">https://www.openldap.org/doc/admin23/tls.html</a></p>
</li>
</ol>
</div></blockquote>
<ol class="upperalpha" start="2">
<li><p class="first">Setting up SSL on OpenLDAP client:</p>
<ol class="lowerroman">
<li><p class="first">For the KDC and Admin Server, you need to do the client-side
configuration in ldap.conf.  For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">TLS_CACERT</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">openldap</span><span class="o">/</span><span class="n">certs</span><span class="o">/</span><span class="n">cacert</span><span class="o">.</span><span class="n">pem</span>
</pre></div>
</div>
</li>
</ol>
</li>
</ol>
</li>
<li><p class="first">Include the Kerberos schema file (kerberos.schema) in the
configuration file (slapd.conf) on the LDAP Server, by providing
the location where it is stored:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">include</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">openldap</span><span class="o">/</span><span class="n">schema</span><span class="o">/</span><span class="n">kerberos</span><span class="o">.</span><span class="n">schema</span>
</pre></div>
</div>
</li>
<li><p class="first">Choose DNs for the <a class="reference internal" href="admin_commands/krb5kdc.html#krb5kdc-8"><span class="std std-ref">krb5kdc</span></a> and <a class="reference internal" href="admin_commands/kadmind.html#kadmind-8"><span class="std std-ref">kadmind</span></a> servers
to bind to the LDAP server, and create them if necessary. These DNs
will be specified with the <strong>ldap_kdc_dn</strong> and <strong>ldap_kadmind_dn</strong>
directives in <a class="reference internal" href="conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a>; their passwords can be stashed
with “<code class="docutils literal notranslate"><span class="pre">kdb5_ldap_util</span> <span class="pre">stashsrvpw</span></code>” and the resulting file
specified with the <strong>ldap_service_password_file</strong> directive.</p>
</li>
<li><p class="first">Choose a DN for the global Kerberos container entry (but do not
create the entry at this time).  This DN will be specified with the
<strong>ldap_kerberos_container_dn</strong> directive in <a class="reference internal" href="conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a>.
Realm container entries will be created underneath this DN.
Principal entries may exist either underneath the realm container
(the default) or in separate trees referenced from the realm
container.</p>
</li>
<li><p class="first">Configure the LDAP server ACLs to enable the KDC and kadmin server
DNs to read and write the Kerberos data.  If
<strong>disable_last_success</strong> and <strong>disable_lockout</strong> are both set to
true in the <a class="reference internal" href="conf_files/kdc_conf.html#dbmodules"><span class="std std-ref">[dbmodules]</span></a> subsection for the realm, then the
KDC DN only requires read access to the Kerberos data.</p>
<p>Sample access control information:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">access</span> <span class="n">to</span> <span class="n">dn</span><span class="o">.</span><span class="n">base</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">read</span>

<span class="n">access</span> <span class="n">to</span> <span class="n">dn</span><span class="o">.</span><span class="n">base</span><span class="o">=</span><span class="s2">&quot;cn=Subschema&quot;</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">read</span>

<span class="n">access</span> <span class="n">to</span> <span class="n">attrs</span><span class="o">=</span><span class="n">userPassword</span><span class="p">,</span><span class="n">userPKCS12</span>
    <span class="n">by</span> <span class="bp">self</span> <span class="n">write</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">auth</span>

<span class="n">access</span> <span class="n">to</span> <span class="n">attrs</span><span class="o">=</span><span class="n">shadowLastChange</span>
    <span class="n">by</span> <span class="bp">self</span> <span class="n">write</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">read</span>

<span class="c1"># Providing access to realm container</span>
<span class="n">access</span> <span class="n">to</span> <span class="n">dn</span><span class="o">.</span><span class="n">subtree</span><span class="o">=</span> <span class="s2">&quot;cn=EXAMPLE.COM,cn=krbcontainer,dc=example,dc=com&quot;</span>
    <span class="n">by</span> <span class="n">dn</span><span class="o">.</span><span class="n">exact</span><span class="o">=</span><span class="s2">&quot;cn=kdc-service,dc=example,dc=com&quot;</span> <span class="n">write</span>
    <span class="n">by</span> <span class="n">dn</span><span class="o">.</span><span class="n">exact</span><span class="o">=</span><span class="s2">&quot;cn=adm-service,dc=example,dc=com&quot;</span> <span class="n">write</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">none</span>

<span class="c1"># Providing access to principals, if not underneath realm container</span>
<span class="n">access</span> <span class="n">to</span> <span class="n">dn</span><span class="o">.</span><span class="n">subtree</span><span class="o">=</span> <span class="s2">&quot;ou=users,dc=example,dc=com&quot;</span>
    <span class="n">by</span> <span class="n">dn</span><span class="o">.</span><span class="n">exact</span><span class="o">=</span><span class="s2">&quot;cn=kdc-service,dc=example,dc=com&quot;</span> <span class="n">write</span>
    <span class="n">by</span> <span class="n">dn</span><span class="o">.</span><span class="n">exact</span><span class="o">=</span><span class="s2">&quot;cn=adm-service,dc=example,dc=com&quot;</span> <span class="n">write</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">none</span>

<span class="n">access</span> <span class="n">to</span> <span class="o">*</span>
    <span class="n">by</span> <span class="o">*</span> <span class="n">read</span>
</pre></div>
</div>
<p>If the locations of the container and principals or the DNs of
the service objects for a realm are changed then this
information should be updated.</p>
</li>
<li><p class="first">Start the LDAP server as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">slapd</span> <span class="o">-</span><span class="n">h</span> <span class="s2">&quot;ldapi:/// ldaps:///&quot;</span>
</pre></div>
</div>
</li>
<li><p class="first">Modify the <a class="reference internal" href="conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> file to include LDAP specific items
listed below:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">realms</span>
    <span class="n">database_module</span>

<span class="n">dbmodules</span>
    <span class="n">db_library</span>
    <span class="n">db_module_dir</span>
    <span class="n">ldap_kdc_dn</span>
    <span class="n">ldap_kadmind_dn</span>
    <span class="n">ldap_service_password_file</span>
    <span class="n">ldap_servers</span>
    <span class="n">ldap_conns_per_server</span>
</pre></div>
</div>
</li>
<li><p class="first">Create the realm using <a class="reference internal" href="admin_commands/kdb5_ldap_util.html#kdb5-ldap-util-8"><span class="std std-ref">kdb5_ldap_util</span></a> (see
<a class="reference internal" href="database.html#ldap-create-realm"><span class="std std-ref">Creating a Kerberos realm</span></a>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kdb5_ldap_util</span> <span class="o">-</span><span class="n">D</span> <span class="n">cn</span><span class="o">=</span><span class="n">admin</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span> <span class="n">create</span> <span class="o">-</span><span class="n">subtrees</span> <span class="n">ou</span><span class="o">=</span><span class="n">users</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span> <span class="o">-</span><span class="n">r</span> <span class="n">EXAMPLE</span><span class="o">.</span><span class="n">COM</span> <span class="o">-</span><span class="n">s</span>
</pre></div>
</div>
<p>Use the <strong>-subtrees</strong> option if the principals are to exist in a
separate subtree from the realm container.  Before executing the
command, make sure that the subtree mentioned above
<code class="docutils literal notranslate"><span class="pre">(ou=users,dc=example,dc=com)</span></code> exists.  If the principals will
exist underneath the realm container, omit the <strong>-subtrees</strong> option
and do not worry about creating the principal subtree.</p>
<p>For more information, refer to the section <a class="reference internal" href="database.html#ops-on-ldap"><span class="std std-ref">Operations on the LDAP database</span></a>.</p>
<p>The realm object is created under the
<strong>ldap_kerberos_container_dn</strong> specified in the configuration file.
This operation will also create the Kerberos container, if not
present already.  This will be used to store information related to
all realms.</p>
</li>
<li><p class="first">Stash the password of the service object used by the KDC and
Administration service to bind to the LDAP server using the
<a class="reference internal" href="admin_commands/kdb5_ldap_util.html#kdb5-ldap-util-8"><span class="std std-ref">kdb5_ldap_util</span></a> <strong>stashsrvpw</strong> command (see
<a class="reference internal" href="database.html#stash-ldap"><span class="std std-ref">Stashing service object’s password</span></a>).  The object DN should be the same as
<strong>ldap_kdc_dn</strong> and <strong>ldap_kadmind_dn</strong> values specified in the
<a class="reference internal" href="conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kdb5_ldap_util</span> <span class="o">-</span><span class="n">D</span> <span class="n">cn</span><span class="o">=</span><span class="n">admin</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span> <span class="n">stashsrvpw</span> <span class="o">-</span><span class="n">f</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">kerberos</span><span class="o">/</span><span class="n">service</span><span class="o">.</span><span class="n">keyfile</span> <span class="n">cn</span><span class="o">=</span><span class="n">krbadmin</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span>
</pre></div>
</div>
</li>
<li><p class="first">Add <code class="docutils literal notranslate"><span class="pre">krbPrincipalName</span></code> to the indexes in slapd.conf to speed up
the access.</p>
</li>
</ol>
</div></blockquote>
<p>With the LDAP back end it is possible to provide aliases for principal
entries.  Currently we provide no mechanism provided for creating
aliases, so it must be done by direct manipulation of the LDAP
entries.</p>
<p>An entry with aliases contains multiple values of the
<em>krbPrincipalName</em> attribute.  Since LDAP attribute values are not
ordered, it is necessary to specify which principal name is canonical,
by using the <em>krbCanonicalName</em> attribute.  Therefore, to create
aliases for an entry, first set the <em>krbCanonicalName</em> attribute of
the entry to the canonical principal name (which should be identical
to the pre-existing <em>krbPrincipalName</em> value), and then add additional
<em>krbPrincipalName</em> attributes for the aliases.</p>
<p>Principal aliases are only returned by the KDC when the client
requests canonicalization.  Canonicalization is normally requested for
service principals; for client principals, an explicit flag is often
required (e.g., <code class="docutils literal notranslate"><span class="pre">kinit</span> <span class="pre">-C</span></code>) and canonicalization is only performed
for initial ticket requests.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="advanced/ldapbackend.html#ldap-be-ubuntu"><span class="std std-ref">LDAP backend on Ubuntu 10.4 (lucid)</span></a></p>
</div>
</div>


          </div>
        </div>
      </div>
        </div>
        <div class="sidebar">
    <h2>On this page</h2>
    <ul>
<li><a class="reference internal" href="#">Configuring Kerberos with OpenLDAP back-end</a></li>
</ul>

    <br/>
    <h2>Table of contents</h2>
    <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">For users</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">For administrators</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="install.html">Installation guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="conf_files/index.html">Configuration Files</a></li>
<li class="toctree-l2"><a class="reference internal" href="realm_config.html">Realm configuration decisions</a></li>
<li class="toctree-l2"><a class="reference internal" href="database.html">Database administration</a></li>
<li class="toctree-l2"><a class="reference internal" href="dbtypes.html">Database types</a></li>
<li class="toctree-l2"><a class="reference internal" href="lockout.html">Account lockout</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Configuring Kerberos with OpenLDAP back-end</a></li>
<li class="toctree-l2"><a class="reference internal" href="appl_servers.html">Application servers</a></li>
<li class="toctree-l2"><a class="reference internal" href="host_config.html">Host configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="backup_host.html">Backups of secure hosts</a></li>
<li class="toctree-l2"><a class="reference internal" href="pkinit.html">PKINIT configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="otp.html">OTP Preauthentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="spake.html">SPAKE Preauthentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="dictionary.html">Addressing dictionary attack risks</a></li>
<li class="toctree-l2"><a class="reference internal" href="princ_dns.html">Principal names and DNS</a></li>
<li class="toctree-l2"><a class="reference internal" href="enctypes.html">Encryption types</a></li>
<li class="toctree-l2"><a class="reference internal" href="https.html">HTTPS proxy configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="auth_indicator.html">Authentication indicators</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin_commands/index.html">Administration  programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mitK5defaults.html">MIT Kerberos defaults</a></li>
<li class="toctree-l2"><a class="reference internal" href="env_variables.html">Environment variables</a></li>
<li class="toctree-l2"><a class="reference internal" href="troubleshoot.html">Troubleshooting</a></li>
<li class="toctree-l2"><a class="reference internal" href="advanced/index.html">Advanced topics</a></li>
<li class="toctree-l2"><a class="reference internal" href="various_envs.html">Various links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../appdev/index.html">For application developers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plugindev/index.html">For plugin module developers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../build/index.html">Building Kerberos V5</a></li>
<li class="toctree-l1"><a class="reference internal" href="../basic/index.html">Kerberos V5 concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../formats/index.html">Protocols and file formats</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mitK5features.html">MIT Kerberos features</a></li>
<li class="toctree-l1"><a class="reference internal" href="../build_this.html">How to build this documentation from the source</a></li>
<li class="toctree-l1"><a class="reference internal" href="../about.html">Contributing to the MIT Kerberos Documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../resources.html">Resources</a></li>
</ul>

    <br/>
    <h4><a href="../index.html">Full Table of Contents</a></h4>
    <h4>Search</h4>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
        </div>
        <div class="clearer"></div>
      </div>
    </div>

    <div class="footer-wrapper">
        <div class="footer" >
            <div class="right" ><i>Release: 1.17</i><br />
                &copy; <a href="../copyright.html">Copyright</a> 1985-2019, MIT.
            </div>
            <div class="left">
                
        <a href="../index.html" title="Full Table of Contents"
            >Contents</a> |
        <a href="lockout.html" title="Account lockout"
            >previous</a> |
        <a href="appl_servers.html" title="Application servers"
            >next</a> |
        <a href="../genindex.html" title="General Index"
            >index</a> |
        <a href="../search.html" title="Enter search criteria"
            >Search</a> |
    <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__Configuring Kerberos with OpenLDAP back-end">feedback</a>
            </div>
        </div>
    </div>

  </body>
</html>