summaryrefslogtreecommitdiff
path: root/doc/ExternalValidation.html
blob: d17695766bc285f966127782102a6490e9b2a670 (plain)
  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. <!-- page specific tags -->
  25. <link href="/stylesheets/scm.css?1224248241" media="screen" rel="stylesheet" type="text/css" />
  26. </head>
  27. <body>
  28. <div id="wrapper">
  29. <div id="top-menu">
  30. <div id="account">
  31. <ul><li><a href="/login" class="login">Sign in</a></li>
  32. <li><a href="/account/register" class="register">Register</a></li></ul> </div>
  33. <ul><li><a href="/" class="home">Home</a></li>
  34. <li><a href="/projects" class="projects">Projects</a></li>
  35. <li><a href="http://www.redmine.org/guide" class="help">Help</a></li></ul></div>
  36. <div id="header">
  37. <div id="quick-search">
  38. <form action="/search/index/gnutls" method="get">
  39. <a href="/search/index/gnutls" accesskey="4">Search</a>:
  40. <input accesskey="f" class="small" id="q" name="q" size="20" type="text" />
  41. </form>
  42. </div>
  43. <h1>GnuTLS</h1>
  44. <div id="main-menu">
  45. <ul><li><a href="/projects/show/gnutls">Overview</a></li>
  46. <li><a href="/projects/activity/gnutls">Activity</a></li>
  47. <li><a href="/projects/roadmap/gnutls">Roadmap</a></li>
  48. <li><a href="/projects/gnutls/issues">Issues</a></li>
  49. <li><a href="/wiki/gnutls" class="selected">Wiki</a></li>
  50. <li><a href="/repositories/show/gnutls">Repository</a></li></ul>
  51. </div>
  52. </div>
  53. <div class="" id="main">
  54. <div id="sidebar">
  55. <h3>Wiki</h3>
  56. <a href="/wiki/gnutls">Start page</a><br />
  57. <a href="/wiki/gnutls/Page_index/special">Index by title</a><br />
  58. <a href="/wiki/gnutls/Date_index/special">Index by date</a><br />
  59. </div>
  60. <div id="content">
  61. <div class="contextual">
  62. <a href="/wiki/gnutls/GnuTLSExternalValidation/history" class="icon icon-history">History</a>
  63. </div>
  64. <div class="wiki">
  65. <h1 id="GnuTLSExternalValidation">GnuTLSExternalValidation<a href="#GnuTLSExternalValidation" class="wiki-anchor">&para;</a></h1>
  66. <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>
  67. <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>
  68. <ul>
  69. <li>Make it possible to store private keys in a process different from the process that runs the GnuTLS client/server.</li>
  70. <li>Make it possible to perform X.509 chain validation in a different process.</li>
  71. <li>Make it possible to perform OpenPGP key validation in a different process.</li>
  72. </ul>
  73. <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>
  74. <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>
  75. <p>The solution should allow simple integration with GNOME components such as <a href="http://live.gnome.org/Seahorse" class="external">SeaHorse</a>.</p>
  76. <h2 id="Private-key-protocol">Private key protocol<a href="#Private-key-protocol" class="wiki-anchor">&para;</a></h2>
  77. <p>Possible we should re-use GnuPG's external protocol here? What we need is an IPC protocol that does:</p>
  78. <pre><code>SIGN [ALG] [KEY-ID] [TLS-DATA]</code></pre>
  79. <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>
  80. <h2 id="X509-Chain-Validation">X.509 Chain Validation<a href="#X509-Chain-Validation" class="wiki-anchor">&para;</a></h2>
  81. <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>
  82. <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>
  83. <p>Thus we need a command to send over a trusted certificate:</p>
  84. <pre><code>TRUSTED [b64pem...]</code></pre>
  85. <p>And also send over untrusted certificates provided by the TLS peer:</p>
  86. <pre><code>UNTRUSTED [b64pem...]</code></pre>
  87. <p>Finally, a request to perform chain validation on a particular certificate is performed using:</p>
  88. <pre><code>VALIDATE [b64pem...]</code></pre>
  89. <h2 id="Generic-Certificate-Validation">Generic Certificate Validation<a href="#Generic-Certificate-Validation" class="wiki-anchor">&para;</a></h2>
  90. <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>
  91. <p>The crucial request would be:</p>
  92. <pre><code>VALIDATE {LABEL} {CERTTYPE} {PEERNAME} {CERTIFICATE}</code></pre>
  93. <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>
  94. <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>
  95. <p>The possible options for CERTTYPE could be:</p>
  96. <ul>
  97. <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>
  98. <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>
  99. <li>X509 (after <a href="http://tools.ietf.org/html/rfc5280" class="external">RFC 5280</a>, either PEM or DER encoded)</li>
  100. </ul>
  101. <p>This would allow numerous clients and servers to make use of the validation agent. For example:</p>
  102. <ul>
  103. <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>
  104. <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>
  105. <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>
  106. </ul>
  107. <p>Additionally, it might be nice to have a command to offer intermediate certificates to the certificate store:</p>
  108. <pre><code>UNTRUSTED {LABEL} {CERTTYPE} {CERTIFICATE}</code></pre>
  109. <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>
  110. </div>
  111. <p class="other-formats">
  112. Also available in:
  113. <span><a href="/wiki/gnutls/GnuTLSExternalValidation?export=html&amp;version=9" class="html">HTML</a></span>
  114. <span><a href="/wiki/gnutls/GnuTLSExternalValidation?export=txt&amp;version=9" class="text">TXT</a></span>
  115. </p>
  116. </div>
  117. </div>
  118. <div id="ajax-indicator" style="display:none;"><span>Loading...</span></div>
  119. <div id="footer">
  120. Powered by <a href="http://www.redmine.org/">Redmine</a> &copy; 2006-2008 Jean-Philippe Lang
  121. </div>
  122. </div>
  123. </body>
  124. </html>