Doc fixes
[mirror/userdir-ldap.git] / web / doc-mail.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML lang="en">
3 <HEAD>
4 <TITLE>Debian GNU/Linux -- LDAP Gateway</TITLE>
5 <LINK REV="made" HREF="mailto:webmaster@debian.org">
6 <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7 <META NAME="Description" CONTENT="Debian GNU/Linux is a free distribution of the GNU/Linux operating system. It is maintained and updated through the work of many users who volunteer their time and effort.">
8 <META NAME="Keywords" CONTENT="debian, GNU, linux, unix, open source, free, DFSG ">
9 <META NAME="Language" CONTENT="English">
10 <meta name="Author"    content="Debian Webmaster, webmaster@debian.org">
11 <meta name="Generator" content="WML 1.7.4 (06-Oct-1999)">
12 <meta name="Modified"  content="24-10-2000 23:42:44">
13 </HEAD>
14 <BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#800080" alink="#FF0000">
15 <TABLE border="0" cellpadding="3" cellspacing="0" width="100%">
16 <TR>
17 <TD>
18 <A HREF="http://www.debian.org/logos/" BORDER="0"><IMG src="/Pics/logo-50.jpg" border="0" hspace="0" vspace="0" alt=""></A>
19 <IMG src="/Pics/debian.jpg" border="0" hspace="0" vspace="0" alt="Debian Project">
20 </TD>
21 </TR>
22 <TR>
23 <TD bgcolor="#DF0451">
24 <A href="http://www.debian.org/"><IMG src="/Pics/home.en.gif" border="0" hspace="2" vspace="3" alt="Home"></A>
25 <A href="http://www.debian.org/intro/about"><IMG src="/Pics/about.en.gif" border="0" hspace="2" vspace="3" alt="About&nbsp;Debian"></A>
26 <A href="http://www.debian.org/News/"><IMG src="/Pics/news.en.gif" border="0" hspace="2" vspace="3" alt="News"></A>
27 <A href="http://www.debian.org/distrib/"><IMG src="/Pics/distrib.en.gif" border="0" hspace="2" vspace="3" alt="Distribution"></A>
28 <A href="http://www.debian.org/support"><IMG src="/Pics/support.en.gif" border="0" hspace="2" vspace="3" alt="Support"></A>
29 <A href="http://www.debian.org/devel/"><IMG src="/Pics/devel.en.gif" border="0" hspace="2" vspace="3" alt="Developers'&nbsp;Corner"></A>
30 <A href="http://www.debian.org/search"><IMG src="/Pics/search.en.gif" border="0" hspace="2" vspace="3" alt="Search"></A>
31 </TD>
32 </TR>
33 </TABLE>
34 <H1>LDAP Gateway</H1>
35 The LDAP directory has a PGP secured mail gateway that
36 allows users to safely and conveniently effect changes to their entries. It
37 makes use of PGP signed input messages to positively identify the user and
38 to confirm the validity of the request. Furthermore it implements a replay
39 cache that prevents the gateway from accepting the same message more than
40 once.
41 <p>
42 There are three functions logically split into 3 seperate email addresses
43 that are implemented by the gateway: <b>ping</b>, <b>new password</b> and
44 <b>changes</b>. The function to act on is the first argument to the program.
45 <p>
46 Error handling is currently done by generating a bounce message and passing
47 descriptive error text to the mailer. This can generate a somewhat hard to
48 read error message, but it does have all the relevent information.
49 <h1>Ping</h1>
50 The ping command simply returns the users public record. It is useful for
51 testing the gateway and for the requester to get a basic dump of their
52 record. In future this address might 'freshen' the record to indicate the
53 user is alive. Any PGP signed message will produce a reply.
54 <h1>New Password</h1>
55 If a user looses their password they can request that a new one be generated
56 for them. This is done by sending the phrase "Please change my Debian
57 password" to chpasswd@db.debian.org. The phrase is required to prevent the
58 daemon from triggering on arbitary signed email. The best way to invoke this
59 feature is with
60 <pre>echo "Please change my Debian password" | gpg --clearsign | mail chpasswd@db.debian.org</pre>
61 After validating the request the daemon will generate a new random password,
62 set it in the directory and respond with an encrpyted message containing the
63 new password. The password can be changed using one of the other interface
64 methods.
65 <h1>Changes</h1>
66 An address (changes@debian.org) is provided for making almost arbitary
67 changes to the contents of the record. The daemon parses its input line by
68 line and acts on each line in a command oriented manner. Anything, except for
69 passwords, can be changed using this mechanism. Note however that because
70 this is a mail gateway it does stringent checking on its input. The other
71 tools allow fields to be set to virtually anything, the gateway requires
72 specific field formats to be met.
73 <ul>
74 <li>A line of the form <tt>'field: value'</tt> will change the contents of
75 the field to value. Some simple checks are performed on value to make sure
76 that it is not set to nonsense. The values that can be changed are:
77 <b>c</b>, <b>l</b>, <b>facsimiletelephonenumber</b>, <b>telephonenumber</b>,
78 <b>postaladdress</b>, <b>postalcode</b>,
79 <b>loginshell</b>, <b>emailforward</b>, <b>ircnick</b>, <b>onvacation</b>,
80 and <b>labledurl</b>
81 <li>The daemon has a special parser to help changing latitude and longitude
82 values. It accepts several common formats for position information and
83 converts them to one of the standard forms. The permitted types are
84 <pre>D = Degrees, M = Minutes, S = Seconds, x = n,s,e,w
85 +-DDD.DDDDD, +- DDDMM.MMMM, +-DDDMMSS.SSSS [standard forms]
86 DDxMM.MMMM, DD:MM.MMMM x, DD:MM:SS.SSS X)</pre>
87 and the request format is <tt>'Lat: xxx Long: xxx'</tt> where <tt>xxx</tt>
88 is one of the permitted types. The resulting response will include how the
89 input was parsed and the value in decimal degrees.
90 <li>
91 Part of the replicated dataset is a virtual .ssh/authorized_keys file for
92 each user. The change address is the simplest way to set the RSA key(s) you
93 intend to use. Simply place a key on a line by itself, the full SSH key
94 format specification is supported, see sshd(8). Probably the most common way
95 to use this function will be
96 <pre>cat .ssh/identity.pub | gpg --clearsign | mail change@db.debian.org</pre>
97 which will set the authentication key to the identity you are using.
98 Multiple keys per user are supported, but they must all be sent at once.
99 <li>Debian.net DNS Zone Entry. The only way to get a debian.net address is
100 to use the mail gateway. It
101 will verify the request and prevent name collisions automatically. Requests
102 can take two forms: <tt>'foo in a 1.2.3.4'</tt> or <tt>'foo in cname
103 foo.bar.'</tt> The precise form is critical and must not be deviated from.
104 Like the SSH function above, multiple hosts are supported, but they must all
105 be sent at once. The debian.net zone is only reloaded once per day at
106 midnight -0700.
107 <li>If the single word <b>show</b> appears on a line then a PGP encrypted version
108 of the entire record will be attached to the resulting email.
109 </ul>
110 After processing the requests the daemon will generate a report which contains
111 each input command and the action taken. If there are any parsing errors
112 processing stops immediately, but valid changes up to that point are
113 processed.
114 <h2>Notes</h2>
115 <p>
116 In this document PGP refers to any message or key that GnuPG is
117 able to generate or parse, specificaly it includes both PGP2.x and OpenPGP
118 (aka GnuPG) keys.
119 <p>
120 Due to the replay cache the clock on the computer that generates the
121 signatures has to be accurate to at least one day. If it is off by several
122 months or more then the deamon will outright reject all messages.
123 <p>
124 Examples are given using GnuPG, but PGP 2.x can also be used. The correct
125 options to generate a clear signed ascii armored message in 'filter' mode
126 are <tt>pgp -fast</tt> which does the same as <tt>gpg --clearsign</tt>
127 <p>
128 Debian.org machines rely on secured replication to transfer login data out
129 of the database. Replication is performed at 15 min intervals so it can take
130 a short while before any changes made take effect.
131 <HR>
132 <P>Back to the <A href="http://www.debian.org/">Debian Project homepage</A>.
133 <HR>
134 <SMALL>You can contact us at <A href="mailto:admin@db.debian.org">admin@db.debian.org</A>.</SMALL><P>
135 <SMALL>Last Modified: Wed, Oct 25 05:42:44 UTC 2000<BR>
136 Copyright &copy; 1997-1999 <A href="http://www.spi-inc.org/">SPI</A>; See <A href="http://www.debian.org/license">license terms</A>
137         
138          </SMALL>
139 </BODY>
140 </HTML>