CodeSign.xml 5.7 KB

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