ssl.html 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. title: 'SSL',
  3. crumbs: [
  4. { "User's Guide": '../users/' },
  5. ],
  6. }
  7. <h1>Configuring SSL</h1>
  8. <p>GoAhead supports the Secure Sockets Layer (SSL) protocol for authenticating systems and encrypting data.
  9. Use of this protocol enables secure data transmission to and from clients in a standards-based manner.</p>
  10. <p>This document provides step-by-step instructions for configuring SSL in GoAhead. If you are unfamiliar
  11. with SSL, please read the <a href="sslOverview.html">SSL Overview</a> first.</p><a id="sslQuickStart"></a>
  12. <p>Except for the MbedTLS stack which is integrated, GoAhead includes only the interface to the SSL
  13. stack and not the SSL library itself. You need to build your required SSL stack and then configure
  14. GoAhead to use that SSL stack. See
  15. <a href="http://l:5000/start/source.html">Building From Source</a> for details on configuring GoAhead to
  16. use SSL.</p>
  17. <h2 >SSL Quick Start</h2>
  18. <p>The default build of GoAhead will support SSL on port 443 for all network interfaces. You
  19. can immediately test SSL access to documents by using the <b>https://</b> scheme and <b>443</b> as the
  20. port. For example, to access the home page using SSL, use this URL in your browser:</p>
  21. <pre class="ui code segment">
  22. https://127.0.0.1
  23. </pre>
  24. <h2>Self-Signed Certificate</h2>
  25. <p>GoAhead is shipped with a self-signed certificate to identify the web server. This certificate is
  26. suitable for testing purposes only and your browser will issue a warning when you access the server. For
  27. production use, you should obtain your own service certificate from signing authorities such as <a href=
  28. "http://www.verisign.com">Verisign</a>.</p><a id="sslConfigurationDirectives"></a>
  29. <h2 >Build-time SSL Configuration Directives</h2>
  30. <p>GoAhead uses several <i>main.bit</i> configuration directives to control SSL and manage secure access to the
  31. server.
  32. <p>The relevant SSL directives are:</p>
  33. <ul>
  34. <li>key &mdash; SSL public key</li>
  35. <li>certificate &mdash; SSL certificate</li>
  36. <li>ciphers &mdash; Cipher suite to use for openssl</li>
  37. <li>caFile &mdash; File of certificates if verifying client certificates</li>
  38. <li>caPath &mdash; Directory of certificates if verifying client certificates</li>
  39. </ul>
  40. <a id="sslConfigurationExample"></a>
  41. <a id="generatingKeys"></a>
  42. <h2 >Generating Keys and Certificates</h2>
  43. <p>To generate a request file that you can send to a certificate issuing authority such as <a href=
  44. "http://www.verisign.com">Verisign</a>, use the following openssl command or equivalent command from your
  45. SSL provider:</p>
  46. <pre class="ui code segment">
  47. openssl genrsa -des3 -out server.key 1024
  48. openssl req -new -key server.key -out server.csr
  49. </pre>
  50. <p>This will generate a server key in the file "server.key" and will generate a certificate request in the
  51. file "server.csr" that you can send to the issuing authority. The issuing authority will generate a server
  52. certificate for your server and they will sign it with their private key. Subsequently, clients will be
  53. able to use the signing authorities public key to decrypt your server certificate and thus verify the
  54. identity of your server when negotiating a SSL session. When running these commands, you will be prompted
  55. to enter a pass-phrase password to decrypt the server private key. REMEMBER this password.</p>
  56. <p><b>SECURITY WARNING</b>: Safeguard the "server.key" private key jealously. If this falls into malicious
  57. hands, then your server identity may be hijacked by another site.</p>
  58. <h2 >SSL Providers</h2>
  59. <p>GoAhead employs an open architecture SSL Provider interface so that customers can select the ideal SSL
  60. provider for their needs. Different SSL implementations excel in various ways. Some are compact, others are
  61. fast and some are extensive in their cipher support.</p>
  62. <p>The MbedTLS SSL stack and interface are included with GoAhead. Other SSL interfaces are installed using the
  63. <a href="https://embedthis.com/pak/">Pak Package manager</a>.</p>
  64. <ul>
  65. <li>MbedTLS &mdash; designed for embedded use. See
  66. <a href="https://embedthis.com/catalog/#/?keywords=goahead-mbedtls">goahead-mbedtls</a>.
  67. Integrated with GoAhead and enabled by default</em>.</li>
  68. <li>OpenSSL &mdash; large and complete. Designed for enterprise use.
  69. See <a href= "http://www.openssl.org">http://www.openssl.org</a>.</li>
  70. <!--
  71. <li>MatrixSSL &mdash; designed for embedded use. See
  72. <a href="https://embedthis.com/catalog/#/?keywords=goahead-matrixssl">goahead-matrixssl</a>.
  73. Install via <em>pak install goahead-matrixssl</em>.</li>
  74. <li>Mocana NanoSSL &mdash; designed for embedded use. See
  75. <a href="https://embedthis.com/catalog/#/?keywords=goahead-nanossl">goahead-nanossl</a>.
  76. Install via <em>pak install goahead-nanossl</em>.</li>
  77. -->
  78. </ul>