<div dir="ltr"><p style="margin-bottom:0.2in"><span>Hello sssd-developers,</span></p><span>
</span><p style="margin-bottom:0in"><span>Allow me to introduce myself and the suggested contribution to the
SSSD project. PrimaryData Inc. is a startup company in the field of
distributed NAS. As such, we would like to contribute to the SSSD
project by developing support for rpc.idmapd. 
</span></p><span>
</span><span>
</span><p style="margin-bottom:0in"><span>Below is our proposed design for this
new feature.</span></p><p style="margin-bottom:0in">
</p><p style="margin-bottom:0in">Best regards,<br>Noam Meltzer</p><span>
</span><p style="margin-bottom:0in"><br><span></span></p><p style="margin-bottom:0in"><span><br></span></p><p style="margin-bottom:0in"><span>---</span></p><p style="margin-bottom:0in"><span><u><b>SSS NFS Client (rpc.idmapd plugin) - Design</b></u></span><br>
<br>We named the client &quot;sss_nfs&quot; (althogh &quot;sss_idmap&quot; or &quot;idmap&quot; might have
 been better names, the term &quot;idmap&quot; is already occupied in the SSSD 
world).</p><p style="margin-bottom:0in"><br></p><span>
</span><p style="margin-bottom:0.2in"><span><b>rpc.idmapd - background</b></span></p><span>
</span><p style="margin-bottom:0in"><span>rpc.idmapd runs on NFSv4 servers as a
userspace daemon (part of nfs-utils). It&#39;s role is to assist knfsd by
providing the following 6 mapping functions:</span></p><div class="im"><span>
</span><p style="margin-bottom:0in"><span>1. (user) name to uid</span></p><span>
</span><p style="margin-bottom:0in"><span>2. (group) name to gid</span></p><span>
</span><p style="margin-bottom:0in"><span>3. uid to (user) name</span></p><span>
</span><p style="margin-bottom:0in"><span>4. gid to (group) name</span></p><span>
</span><p style="margin-bottom:0in"><span>5. principal (user) name to ids (uid +
gid)</span></p><span>
</span><p style="margin-bottom:0.2in"><span>6. principal (user) name to grouplist
(groups which user are member of)</span></p><span>
</span></div><p style="margin-bottom:0in"><span></span></p><div class="im">rpc.idmapd provides API for developing
plugins (loaded by <font face="comic sans ms, sans-serif">dlopen(3))</font>
which implements the actual mapping process.<br><br></div>* note: 5 + 6 are
relevant only for kerberised NFSv4 servers. At the first stage we
only purpose a design without kerberos support.<br><div class="im"><span>
</span><p style="margin-bottom:0in"><span>* note2: On the kernel level, there&#39;s a
caching mechanism for the responses from the userspace daemon.</span></p><p style="margin-bottom:0in"><br></p><p style="margin-bottom:0in"><span style><span><b>SSSD - Responder</b></span></span></p><p style="margin-bottom:0in">
<span style><span></span></span>The functionality required from the Responder side is a subset of the functionality provided by existing NSS Responder&#39;s commands. <br></p><br></div><div class="im">As you can see  below (on the client part of the design) - no changes are needed in the NSS Responder.<br>
</div><div class="im"><p style="margin-bottom:0in"><span></span></p><p style="margin-bottom:0in"><span><br></span></p><p style="margin-bottom:0in"><b>SSSD - NFS Client</b></p><p style="margin-bottom:0in"></p><p style="margin-bottom:0in">
</p><p style="margin-bottom:0in"><u>Responder-Facing Interactions (existing NSS Responder commands)<br></u></p><p style="margin-bottom:0in"><span style="font-family:courier new,monospace">SSS_NSS_GETPWNAM</span> - map (user) name to uid requests<br>
<span style="font-family:courier new,monospace">SSS_NSS_GETGRNAM</span> - map (group) name to gid requests<br><span style="font-family:courier new,monospace">SSS_NSS_GETPWUID</span> - map uid to (user) name requests<br><span style="font-family:courier new,monospace">SSS_NSS_GETGRGID</span> - map gid to (group) name requests<br>
</p><p style="margin-bottom:0in"></p><p style="margin-bottom:0in"></p><p style="margin-bottom:0in">The request &amp; reply sent to &amp; from the responder is &quot;standard&quot; in terms of the NSS Responder. <br></p><p style="margin-bottom:0in">
The client only needs a portion of the reply.  Only this portion will be extracted from the packet (i.e. uid/gid/user name/group name).<br></p><p style="margin-bottom:0in"><br></p><p style="margin-bottom:0in"><u>Optimisation Techniques</u></p>
<p style="margin-bottom:0in">The optimisation techniques used for the NSS client will be used here as well. i.e. Fast Cache (memcache) &amp; negative-cache.</p><p style="margin-bottom:0in">It will be possible for the user to disable Fast Cache from the configuration file. (see below)<br>
</p><p style="margin-bottom:0in"><br></p><p style="margin-bottom:0in"><span></span></p><p style="margin-bottom:0in"><span><u>Configuration File<br></u></span></p><p style="margin-bottom:0in"><span>The configuration of the client will be part of rpc.idmap config file (/etc/idmapd.conf).</span></p>
<p style="margin-bottom:0in"><span><br></span></p></div><br>-- <br><div dir="ltr"><span><font color="#888888"><div dir="ltr"><p><b><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Noam Meltzer</span></b><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"></span></p>
<p><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><b>Linux Software Engineer</b></span><span style="font-size:6pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br></span></p>
<p><b><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">PRIMARY DATA</span></b><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br>
<br></span><span dir="RTL" style="font-size:5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;" lang="HE"></span></p><p><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">P.O. Box 12650, </span><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Herzliya Pituach</span><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"> 4673300<br>

</span><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">9 Hamenofim St. Akerstein Towers, Tower A, 5th fl. </span><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Herzliya</span><span dir="RTL" style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;" lang="HE"></span></p>

<p><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Office: <a value="+972778981888">+972-77-8981888</a></span><span dir="RTL"></span><span dir="RTL" style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><span dir="RTL"></span> </span><span dir="LTR"></span><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><span dir="LTR"></span>| Fax: <a value="+97237617140">+972-3-7617140</a> | Mobile: <a value="+972504227171">+972-54-5873843</a></span><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"> </span></p>

<span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">E-mail: <a href="mailto:noam@primarydata.com" target="_blank">noam@primarydata.com</a><br></span><u><span style="font-size:12pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;color:blue"><a href="mailto:Slankry@PrimaryData.com" target="_blank"><span style="color:blue"></span></a></span></u></div>
</font></span></div>
</div>