No response on -mentors in &gt; 24 hours, so I&#39;m looping in -devel.<br><br>Cheers,<br><br>C.J.<br><br><br><div class="gmail_quote">On Nov 29, 2007 8:33 AM, C.J. Adams-Collier &lt;<a href="mailto:cjcollier@gmail.com">cjcollier@gmail.com
</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey folks,<br><br>I&#39;m looking to make some changes to the heimdal debian packages.
<br>Currently, the heimdal-kdc package contains the following daemons:<br><br>* ./usr/lib/heimdal-servers/kdc<br>* ./usr/lib/heimdal-servers/kadmind<br>* ./usr/lib/heimdal-servers/kpasswd<br><br>If I understand correctly, kdc is responsible for checking credentials
<br>and issuing tickets, kpasswd is responsible for updating credentials,<br>and kadmind is responsible for remote administration of credentials.<br><br>As it stands, kadmind is started only from inetd. &nbsp;During a perusal of
<br>the docs, I found the following:&lt;&lt;EOF<br><br>4.6 Remote administration<br>=========================<br><br>The administration server, `kadmind&#39;, can be started by `inetd&#39; (which<br>isn&#39;t recommended) or run as a normal daemon. If you want to start it
<br>from `inetd&#39; you should add a line similar to the one below to your<br>`/etc/inetd.conf&#39;.<br>EOF<br><br>I modified my krb5.conf file so that heimdal stores its principals in an<br>LDAP data store. &nbsp;A peculiarity of this configuration is that kadmind
<br>expects the access control file to be named after the LDAP dn of the<br>principal container node and to be in the current directory:&lt;&lt;EOF<br><br>cjac@kerberos:~$ ls -l /etc/heimdal-kdc/*.acl<br>-rw-r--r-- 1 root root 156 Nov &nbsp;8 18:00 /etc/heimdal-kdc/kadmind.acl
<br>lrwxrwxrwx 1 root root &nbsp;28 Nov &nbsp;8 17:31 /etc/heimdal-kdc/ldap:ou=KerberosPrincipals,dc=cls2,dc=colliertech,dc=org.acl -&gt; /etc/heimdal-kdc/kadmind.acl<br>EOF<br><br>In order to set $PWD to the correct value, inetd would need to call a
<br>wrapper which does the chdir(2) and exec(3) . &nbsp;I haven&#39;t gotten around<br>to creating one, since the documentation advises against a configuration<br>which uses inetd and hints toward eventual deprecation / obsolescence of
<br>inetd support.<br><br>I have instead created some extra package files in<br>heimdal-0.7.2.dfsg.1/debian/ which will (hopefully) configure kadmind to<br>run as a daemon. &nbsp;When I get it working on my system, I&#39;ll submit a
<br>patch to the BTS and prostrate myself for a beating.<br><br>At this point, it seems that kadmind and kpasswd should be de-coupled<br>from kdc and moved into their own packages. &nbsp;I can imagine many use<br>cases where administrators wouldn&#39;t feel comfortable opening a TCP port
<br>for remote administration of kerberos principals, and &quot;slave&quot; servers<br>should not run kpasswd. &nbsp;Allowing sysadmins to choose not to install the<br>daemons seems a useful feature.<br><br>Currently, all heimdal servers run as root. &nbsp;Yipe. &nbsp;We should probably
<br>create a system user and group as well as an SELinux MAC policy.<br>This /is/ a network authentication infrastructure, after all.<br><br>cjac@kerberos:~$ ps auwx | grep heimdal | grep root<br>root &nbsp; &nbsp; &nbsp;1776 &nbsp;0.0 &nbsp;4.1 &nbsp; 7164 &nbsp;2712 ? &nbsp; &nbsp; &nbsp; &nbsp;Ss &nbsp; 06:13 &nbsp; 0:00 /usr/lib/heimdal-servers/kdc
<br>root &nbsp; &nbsp; &nbsp;1778 &nbsp;0.0 &nbsp;2.6 &nbsp; 6172 &nbsp;1740 ? &nbsp; &nbsp; &nbsp; &nbsp;Ss &nbsp; 06:13 &nbsp; 0:00 /usr/lib/heimdal-servers/kpasswdd<br><br>While going through all of this, I considered requirements to ease the<br>process of modifying the heimdal packages to configure the system to use
<br>alternative principal sources. &nbsp;Is it possible to have one package query<br>another&#39;s entries in the database? &nbsp;How about making modifications to<br>another&#39;s configuration? &nbsp;In order to store to OpenLDAP, heimdal would
<br>benefit from being able to discover some system settings:<br><br>* the configured LDAP base DN<br>* LDAP bind dn and password capable of creating the KerberosPrincipals<br>ou and a bind dn for the heimdal daemons&#39; access to principals
<br><br>Additionally, the package would need to cause some modifications<br>to /etc/default/slapd and /etc/ldap/slapd.conf, which are owned by the<br>slapd package.<br><br>* /etc/default/slapd:<br>** SLAPD_SERVICES=&quot;$SLAPD_SERVICES ldapi:///&quot;
<br><br>/etc/ldap/slapd.conf:<br>** include &nbsp; &nbsp; &nbsp; &nbsp; /etc/ldap/schema/hdb.schema<br>** localSSF &lt;SSF&gt;<br>** sasl-secprops minssf=&lt;above SSF&gt;<br>** sasl-regexp &quot;gidNumber=&lt;heimdal GID&gt;\\\+uidNumber=&lt;heimdal UID&gt;,cn=peercred,cn=external,cn=auth&quot;
<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;&lt;heimdal bind dn&gt;&quot;<br>** access to dn.subtree=&lt;principal container dn&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;by dn=&quot;&lt;heimdal bind dn&gt;&quot;<br><br>Will heimdal packages need to ask slapd to re-configure itself with
<br>these modifications, or can they make modifications in such a way that<br>slapd won&#39;t over-ride them and will recognize them when the user<br>re-configures?<br><br>If heimdal is configured to store principals to LDAP, removal of slapd
<br>would break the system&#39;s kerberos settings, unless principals were<br>dumped to heimdal&#39;s native database and the /etc/krb5.conf were updated<br>to reflect the change.<br><br>I would like to see a simple set of regression tests run after
<br>(re)configuration of slapd and heimdal packages. &nbsp;This would ensure that<br>the heimdal user is able to access and modify principals. &nbsp;There should<br>also be a rollback mechanism in case the regression tests fail. &nbsp;I&#39;d
<br>hate to see an automated update cause a kerberos outage until a human<br>was able to fix the problem.<br><br>Looking forward to your responses,<br><font color="#888888"><br>C.J.<br><br></font></blockquote></div><br><br clear="all">
<br>-- <br>moo.