CodeSign.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="code-signing">
  5. <title><emphasis role="strong">Code Signing, Embedded languages, and
  6. Security</emphasis></title>
  7. <para>Versions of HPCC Systems<superscript>®</superscript> platform prior to
  8. 6.0.0 have always allowed some control over which operations were permitted
  9. in ECL code. This was done, among other reasons, as a way to ensure that
  10. operations like PIPE or embedded C++ could not be used to circumvent access
  11. controls on files by reading them directly from the operating system.</para>
  12. <para>Version 6.0.0 (and above) has two features to provide more flexibility
  13. over the control of these operations.</para>
  14. <itemizedlist>
  15. <listitem>
  16. <para>We now limit which SERVICE functions are called at compile time
  17. using the FOLD attribute. Typically, for security reasons , FOLD should
  18. only be enabled in signed modules.</para>
  19. </listitem>
  20. <listitem>
  21. <para>You can configure the access rights (which control the ability to
  22. use PIPE, embed C++, or restrict the use of a SERVICE) to be dependent
  23. on the code being signed. This means that we can provide signed code in
  24. the ECL Standard Library that makes use of these features, without
  25. opening them up for anyone to call anything.</para>
  26. </listitem>
  27. </itemizedlist>
  28. <sect2 id="ECLCCOptions">
  29. <title>ECLCC Configuration Settings</title>
  30. <para>In Configuration Manager, the ECLCC Server component has a tab named
  31. <emphasis role="bold">Options</emphasis>. This tab allows you to enter
  32. name value pairs for permissions to execute various types of embedded code
  33. or plug-ins.</para>
  34. <para><emphasis role="bold">Name</emphasis></para>
  35. <para><informaltable colsep="1" frame="all" rowsep="1">
  36. <tgroup cols="2">
  37. <colspec colwidth="75.80pt" />
  38. <colspec />
  39. <tbody>
  40. <row>
  41. <entry><emphasis>-allow</emphasis></entry>
  42. <entry>Allow the option specified.</entry>
  43. </row>
  44. <row>
  45. <entry><emphasis>-deny</emphasis></entry>
  46. <entry>Deny the option specified.</entry>
  47. </row>
  48. <row>
  49. <entry><emphasis>-allowsigned</emphasis></entry>
  50. <entry>Allow the option specified if the code has been signed
  51. and the key is present.</entry>
  52. </row>
  53. </tbody>
  54. </tgroup>
  55. </informaltable></para>
  56. <para>Note: Parts of the Standard Library may not function if the use of
  57. C++ and external definitions is denied. In general, <emphasis
  58. role="bold">allowsigned</emphasis> is preferred.</para>
  59. <para><emphasis role="bold">Cluster</emphasis></para>
  60. <para>Specify the cluster for which this rule applies.</para>
  61. <para><emphasis role="bold">Value</emphasis></para>
  62. <informaltable colsep="1" frame="all" rowsep="1">
  63. <tgroup cols="2">
  64. <colspec colwidth="75.80pt" />
  65. <colspec />
  66. <tbody>
  67. <row>
  68. <entry><emphasis>cpp</emphasis></entry>
  69. <entry>Allow/Deny C++ and other embedded languages. For languages
  70. other than C++ and Cassandra, an optional plug-in must also be
  71. installed</entry>
  72. </row>
  73. <row>
  74. <entry><emphasis>pipe</emphasis></entry>
  75. <entry>Allow/Deny using external applications using the PIPE
  76. command.</entry>
  77. </row>
  78. <row>
  79. <entry><emphasis>extern</emphasis></entry>
  80. <entry>Allow/Deny an external function (SERVICE)</entry>
  81. </row>
  82. </tbody>
  83. </tgroup>
  84. </informaltable>
  85. <para></para>
  86. </sect2>
  87. <sect2 id="codesigning">
  88. <title>Code Signing</title>
  89. <para>Code signing is similar to the way that emails can be signed to
  90. prove that they are from who they say they are and they have not been
  91. tampered with, using the standard gpg package.</para>
  92. <para>A file that has been signed will have an attached signature
  93. containing a cryptographic hash of the file contents with the signer’s
  94. private key. Anyone in possession of the signer’s public key can then
  95. verify that the signature is valid and that the content is
  96. unchanged.</para>
  97. <para>We have signed the SERVICE definitions provided by the ECL standard
  98. plug-ins and included the public key in the HPCC platform installation.
  99. Code that tries to use service definitions that are signed will continue
  100. to work as before but, code that tries to call arbitrary library functions
  101. using user-supplied SERVICE definitions will give compile errors, if the
  102. code is unsigned, and the extern setting (see above) is set to deny or
  103. allowsigned.</para>
  104. <para>System administrators can install additional keys on the ECLCC
  105. Server machine, so if you want to use your own service definitions, they
  106. can be signed using a key that has been installed in this way:</para>
  107. <para><programlisting>gpg --output &lt;signed-ecl&gt; --default-key &lt;key-id&gt; --clearsign &lt;ecl-file-to-sign&gt;</programlisting></para>
  108. <para>Using this method, a trusted person can sign code to indicate that
  109. it is acceptable for untrusted people to use, without allowing the
  110. untrusted people to execute arbitrary code.</para>
  111. </sect2>
  112. </sect1>