d17695766bc285f966127782102a6490e9b2a670
[monkeysphere.git] / doc / ExternalValidation.html
1 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
2 <base href="http://redmine.josefsson.org/wiki/gnutls/GnuTLSExternalValidation"><div style="margin:-1px -1px 0;padding:0;border:1px solid #999;background:#fff"><div style="margin:12px;padding:8px;border:1px solid #999;background:#ddd;font:13px arial,sans-serif;color:#000;font-weight:normal;text-align:left">This is Google&#39;s cache of <a href="http://redmine.josefsson.org/wiki/gnutls/GnuTLSExternalValidation" style="text-decoration:underline;color:#00c">http://redmine.josefsson.org/wiki/gnutls/GnuTLSExternalValidation</a>. It is a snapshot of the page as it appeared on Dec 15, 2008 14:31:48 GMT. The <a href="http://redmine.josefsson.org/wiki/gnutls/GnuTLSExternalValidation" style="text-decoration:underline;color:#00c">current page</a> could have changed in the meantime. <a href="http://www.google.com/intl/en/help/features_list.html#cached" style="text-decoration:underline;color:#00c">Learn more</a><br><br><div style="float:right"><a href="http://74.125.47.132/search?q=cache:TK3CfB0McV4J:redmine.josefsson.org/wiki/gnutls/GnuTLSExternalValidation+http://redmine.josefsson.org/wiki/gnutls/GnuTLSExternalValidation&amp;hl=en&amp;gl=us&strip=1" style="text-decoration:underline;color:#00c">Text-only version</a></div>
3 <div>These terms only appear in links pointing to this page: <span style="font-weight:bold">http</span>&nbsp;<span style="font-weight:bold">redmine</span>&nbsp;<span style="font-weight:bold">josefsson</span>&nbsp;<span style="font-weight:bold">org</span>&nbsp;<span style="font-weight:bold">wiki</span>&nbsp;<span style="font-weight:bold">gnutls</span>&nbsp;<span style="font-weight:bold">gnutlsexternalvalidation</span>&nbsp;&nbsp;</div></div></div><div style="position:relative">
4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6 <head>
7 <title>GnuTLS - GnuTLSExternalValidation - Redmine</title>
8 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
9 <meta name="description" content="Redmine" />
10 <meta name="keywords" content="issue,bug,tracker" />
11 <link href="/stylesheets/application.css?1227251496" media="all" rel="stylesheet" type="text/css" />
12 <script src="/javascripts/prototype.js?1224248241" type="text/javascript"></script>
13 <script src="/javascripts/effects.js?1224248241" type="text/javascript"></script>
14 <script src="/javascripts/dragdrop.js?1224248241" type="text/javascript"></script>
15 <script src="/javascripts/controls.js?1224248241" type="text/javascript"></script>
16 <script src="/javascripts/application.js?1224248241" type="text/javascript"></script>
17 <link href="/stylesheets/jstoolbar.css?1224248241" media="screen" rel="stylesheet" type="text/css" />
18 <!--[if IE]>
19     <style type="text/css">
20       * html body{ width: expression( document.documentElement.clientWidth < 900 ? '900px' : '100%' ); }
21       body {behavior: url(/stylesheets/csshover.htc?1224248241);}
22     </style>
23 <![endif]-->
24
25 <!-- page specific tags -->
26
27   <link href="/stylesheets/scm.css?1224248241" media="screen" rel="stylesheet" type="text/css" />
28 </head>
29 <body>
30 <div id="wrapper">
31 <div id="top-menu">
32     <div id="account">
33         <ul><li><a href="/login" class="login">Sign in</a></li>
34 <li><a href="/account/register" class="register">Register</a></li></ul>    </div>
35     
36     <ul><li><a href="/" class="home">Home</a></li>
37 <li><a href="/projects" class="projects">Projects</a></li>
38 <li><a href="http://www.redmine.org/guide" class="help">Help</a></li></ul></div>
39       
40 <div id="header">
41     <div id="quick-search">
42         <form action="/search/index/gnutls" method="get">
43         <a href="/search/index/gnutls" accesskey="4">Search</a>:
44         <input accesskey="f" class="small" id="q" name="q" size="20" type="text" />
45         </form>
46         
47     </div>
48     
49     <h1>GnuTLS</h1>
50     
51     <div id="main-menu">
52         <ul><li><a href="/projects/show/gnutls">Overview</a></li>
53 <li><a href="/projects/activity/gnutls">Activity</a></li>
54 <li><a href="/projects/roadmap/gnutls">Roadmap</a></li>
55 <li><a href="/projects/gnutls/issues">Issues</a></li>
56 <li><a href="/wiki/gnutls" class="selected">Wiki</a></li>
57 <li><a href="/repositories/show/gnutls">Repository</a></li></ul>
58     </div>
59 </div>
60
61 <div class="" id="main">
62     <div id="sidebar">        
63         
64   <h3>Wiki</h3>
65
66 <a href="/wiki/gnutls">Start page</a><br />
67 <a href="/wiki/gnutls/Page_index/special">Index by title</a><br />
68 <a href="/wiki/gnutls/Date_index/special">Index by date</a><br />
69
70
71     </div>
72     
73     <div id="content">
74             
75             
76         <div class="contextual">
77
78
79
80
81
82
83
84
85 <a href="/wiki/gnutls/GnuTLSExternalValidation/history" class="icon icon-history">History</a>
86 </div>
87
88
89
90
91
92 <div class="wiki">
93   <h1 id="GnuTLSExternalValidation">GnuTLSExternalValidation<a href="#GnuTLSExternalValidation" class="wiki-anchor">&para;</a></h1>
94
95
96         <p>This page is intended to flesh out ideas to externalize the X.509 chain validation, X.509 private key handling, and possibly also OpenPGP validation and private key handling.</p>
97
98
99         <p>It is important to realize that these are different problems, so the solution may be different.  Let's first make the goals clear:</p>
100
101
102         <ul>
103         <li>Make it possible to store private keys in a process different from the process that runs the GnuTLS client/server.</li>
104                 <li>Make it possible to perform X.509 chain validation in a different process.</li>
105                 <li>Make it possible to perform OpenPGP key validation in a different process.</li>
106         </ul>
107
108
109         <p>One must decide whether the external agent should be responsible for making authentication decisions, authorization decisions, or both.  Possibly it should be able to make both kind of decisions.  The GnuTLS process can always make further authorization decisions as well.</p>
110
111
112         <p>For private keys, there is the PKCS#11 interface.  GnuTLS has a branch that supports it.  However, PKCS#11 doesn't solve the problem with an external process.  It seems better to move the PKCS#11 interface to the external agent, rather than adding PKCS#11 interface to GnuTLS itself.  Btw, GnuTLS already has PKCS#11 support on a special branch, and has been tested against the Scute PKCS#11 provider together with a Swedish eID X.509 smartcard.</p>
113
114
115         <p>The solution should allow simple integration with GNOME components such as <a href="http://live.gnome.org/Seahorse" class="external">SeaHorse</a>.</p>
116
117
118         <h2 id="Private-key-protocol">Private key protocol<a href="#Private-key-protocol" class="wiki-anchor">&para;</a></h2>
119
120
121         <p>Possible we should re-use GnuPG's external protocol here?  What we need is an IPC protocol that does:</p>
122
123
124         <pre><code>SIGN [ALG] [KEY-ID] [TLS-DATA]</code></pre>
125
126
127         <p>Where KEY-ID somehow denotes a key to use, and TLS-DATA is the data that needs to be signed using the TLS algorithm.  Given that TLS supports several algorithms, and even RSA is supported in more than one mode, there needs to be an ALG flag to indicate this.</p>
128
129
130         <h2 id="X509-Chain-Validation">X.509 Chain Validation<a href="#X509-Chain-Validation" class="wiki-anchor">&para;</a></h2>
131
132
133         <p>GnuPG's dirmngr <a href="http://www.gnupg.org/documentation/manuals/dirmngr/Dirmngr-Protocol.html#Dirmngr-Protocol" class="external">has a protocol for doing this</a>, using <a href="http://www.gnupg.org/documentation/manuals/assuan/" class="external">assuan</a>.  Unfortunately, <a href="http://www.gnupg.org/documentation/manuals/assuan/Assuan.html#Assuan" class="external">assuan's design criteria</a> state "no protection against DoS needed".  This might make it unsuitable for a TLS implementation or other online tool.</p>
134
135
136         <p>It is not clear to me whether the trusted CAs should be sent over the IPC, or whether it is something that is assumed to be known by the agent.  The latter seems safer, but the former may be useful in some scenarios.  <em>(what scenarios?)</em> They aren't mutually incompatible, so maybe we can support both.</p>
137
138
139         <p>Thus we need a command to send over a trusted certificate:</p>
140
141
142         <pre><code>TRUSTED [b64pem...]</code></pre>
143
144
145         <p>And also send over untrusted certificates provided by the TLS peer:</p>
146
147
148         <pre><code>UNTRUSTED [b64pem...]</code></pre>
149
150
151         <p>Finally, a request to perform chain validation on a particular certificate is performed using:</p>
152
153
154         <pre><code>VALIDATE [b64pem...]</code></pre>
155
156
157         <h2 id="Generic-Certificate-Validation">Generic Certificate Validation<a href="#Generic-Certificate-Validation" class="wiki-anchor">&para;</a></h2>
158
159
160         <p>It would be nice to be able to hand the agent any kind of certificate (OpenPGP or X.509), or even to be able to hand the agent a raw public key to see if it validates.</p>
161
162
163         <p>The crucial request would be:</p>
164
165
166         <pre><code>VALIDATE {LABEL} {CERTTYPE} {PEERNAME} {CERTIFICATE}</code></pre>
167
168
169         <p>This says "I'm a program called LABEL.  I'm about to send you a certificate of type CERTTYPE.  I want you to tell me whether the specified PEERNAME matches one of the names stored in the certificate, and that the matching name in the certificate is cryptographically valid based on your knowledge of trusted certifiers."</p>
170
171
172         <p>The agent can respond with VALID or INVALID.  We maybe should consider whether INVALID might be implemented as an extensible set of reasons for invalidity (e.g. EXPIRED, NOMATCH, UNTRUSTED, SELFSIGNED, etc): would the potential extensibility from this outweigh the added implementation and semantic complexity?</p>
173
174
175         <p>The possible options for CERTTYPE could be:</p>
176
177
178         <ul>
179         <li>RAWPUBKEY (maybe modelled after <a href="http://tools.ietf.org/html/rfc4253#section-6.6" class="external">ssh-dss and ssh-rsa in RFC 4253</a> ?)</li>
180                 <li>OPENPGP (after <a href="http://tools.ietf.org/html/rfc4880#section-11.1" class="external">section 11.1 of RFC 4880</a> either base-64 encoded or raw)</li>
181                 <li>X509 (after <a href="http://tools.ietf.org/html/rfc5280" class="external">RFC 5280</a>, either PEM or DER encoded)</li>
182         </ul>
183
184
185         <p>This would allow numerous clients and servers to make use of the validation agent.  For example:</p>
186
187
188         <ul>
189         <li><a href="http://www.lysator.liu.se/~nisse/lsh/" class="external">lsh</a> could feed its fetched host keys to the validation agent instead of having to maintain ~/.lsh/host-acls</li>
190                 <li><a href="http://www.openldap.org/doc/admin24/tls.html#Client%20Certificates" class="external">slapd</a> could use the validation agent to identify the DN of the remote client.</li>
191                 <li><a href="http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authn.sslcerts" class="external">subversion</a> could ask the validation agent to ensure that the OpenPGP certificate offered by a remote https server (using <a href="http://www.outoforder.cc/projects/apache/mod_gnutls/" class="external">mod_gnutls</a>) is in fact who it claims to be (and the mod_gnutls could validate the identity of the client in the same way).</li>
192         </ul>
193
194
195         <p>Additionally, it might be nice to have a command to offer intermediate certificates to the certificate store:</p>
196
197
198         <pre><code>UNTRUSTED {LABEL} {CERTTYPE} {CERTIFICATE}</code></pre>
199
200
201         <p>using UNTRUSTED with a RAWPUBKEY certificate wouldn't be a meaningful operation, but it could be used for intermediate X.509 certificates, or for the equivalent OpenPGP certificates (if such things were handy).</p>
202 </div>
203
204
205
206
207
208
209 <p class="other-formats">
210 Also available in:
211 <span><a href="/wiki/gnutls/GnuTLSExternalValidation?export=html&amp;version=9" class="html">HTML</a></span>
212 <span><a href="/wiki/gnutls/GnuTLSExternalValidation?export=txt&amp;version=9" class="text">TXT</a></span>
213 </p>
214
215
216
217
218
219
220
221     </div>
222 </div>
223
224 <div id="ajax-indicator" style="display:none;"><span>Loading...</span></div>
225         
226 <div id="footer">
227     Powered by <a href="http://www.redmine.org/">Redmine</a> &copy; 2006-2008 Jean-Philippe Lang
228 </div>
229 </div>
230
231 </body>
232 </html>