<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 8/3/11 6:13 PM, Dmitri Pal wrote:
    <blockquote class=" cite" id="mid_4E39C7F9_8010706_redhat_com"
      cite="mid:4E39C7F9.8010706@redhat.com" type="cite">
      <pre wrap="">On 08/03/2011 10:10 AM, Ian Stokes-Rees wrote:
</pre>
      <blockquote class=" cite" id="Cite_0" type="cite">
        <pre wrap="">If there were some way to securely embed an arbitrary string in the
user profile, that would go a long way to solving this problem.  At
least 4KB to cover a 2048 X.509 public key, but ideally 10 KB or
more.  To remove the ACL complexity, just having it accessible only by
the user (token or password based fetch) would be suitable.
</pre>
      </blockquote>
      <pre wrap="">Do not quite understand how that would work or what you mean.
</pre>
    </blockquote>
    <br>
    I've just realized that I think the functionality I'm looking for is
    already available.  I want the same system that is used for storing
    passwords.  Consider the following trace:<br>
    <br>
    $ ldapsearch -h freeipa -b
    uid=tester,cn=users,cn=portal,dc=nebiogrid,dc=org -Y GSSAPI -LLL -d
    0 -T ~/.ldapresults/<br>
    <br>
    SASL/GSSAPI authentication started<br>
    SASL username: <a class="moz-txt-link-abbreviated" href="mailto:ijstokes@NEBIOGRID.ORG">ijstokes@NEBIOGRID.ORG</a><br>
    SASL SSF: 56<br>
    SASL data security layer installed.<br>
    dn: uid=tester,cn=users,cn=portal,dc=nebiogrid,dc=org<br>
    objectClass: person<br>
    objectClass: posixAccount<br>
    objectClass: account<br>
    objectClass: inetOrgPerson<br>
    objectClass: top<br>
    objectClass: organizationalPerson<br>
    givenName: test<br>
    sn: test<br>
    cn: test test<br>
    mail: <a class="moz-txt-link-abbreviated" href="mailto:meghan@hkl.hms.harvard.edu">meghan@hkl.hms.harvard.edu</a><br>
    uidNumber: 1031<br>
    gidNumber: 1031<br>
    homeDirectory: /p/home//tester<br>
    uid: tester<br>
    userPassword:: e2NyeXB0fXNCb2drN3p4c2lha1E=<br>
    <br>
    [aside: I'd love a tip on how to get rid of the non-LDIF SASL
    headers]<br>
    <br>
    The userpassword (hash) is stored in base-64 format and is only
    accessible by me because I have permissions to access this.  Some
    other user doing the same query would not get the userPassword
    attribute.  Even better, I can use the "-tt" option to write the
    base64-decoded content to a file.<br>
    <br>
    The parts of the puzzle that I'd have to work out are:<br>
    <br>
    1. are there objectClass schemas that have fields that would be
    suitable for a set of common private keys (rsa1, rsa2, dsa, gpg,
    pgp, and x509)?<br>
    <br>
    2. if not, instructions on how to set up such a schema (basically
    with exactly the set of attributes above), with the fields being
    base64 (binary?)<br>
    <br>
    3. what do I have to do to get the behavior that only certain
    parties can read a particular attribute?<br>
    <br>
    4. any way to get ldapsearch to write out particular attributes to
    particular files?<br>
    <br>
    Thanks,<br>
    <br>
    Ian<br>
  </body>
</html>