PageRenderTime 27ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/Database/db-derby-10.11.1.1-bin/docs/html/security/csecembeddedperms.html

https://gitlab.com/bandinipavel/Oauth
HTML | 293 lines | 199 code | 78 blank | 16 comment | 0 complexity | 9e6ee0b85d16f8e6087d7ef85a4f3e27 MD5 | raw file
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
  4. <!--
  5. Licensed to the Apache Software Foundation (ASF) under one or more
  6. contributor license agreements. See the NOTICE file distributed with
  7. this work for additional information regarding copyright ownership.
  8. The ASF licenses this file to You under the Apache License, Version 2.0
  9. (the "License"); you may not use this file except in compliance with
  10. the License. You may obtain a copy of the License at
  11. http://www.apache.org/licenses/LICENSE-2.0
  12. Unless required by applicable law or agreed to in writing, software
  13. distributed under the License is distributed on an "AS IS" BASIS,
  14. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. See the License for the specific language governing permissions and
  16. limitations under the License.
  17. -->
  18. <head>
  19. <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  20. <meta name="copyright" content="(C) Copyright 2005" />
  21. <meta name="DC.rights.owner" content="(C) Copyright 2005" />
  22. <meta content="public" name="security" />
  23. <meta content="index,follow" name="Robots" />
  24. <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
  25. <meta content="concept" name="DC.Type" />
  26. <meta name="DC.Title" content="Running embedded Derby with a security manager" />
  27. <meta name="abstract" content="This section describes the permissions that should be granted to the codebase derby.jar to allow you to run embedded Derby with a security manager." />
  28. <meta name="description" content="This section describes the permissions that should be granted to the codebase derby.jar to allow you to run embedded Derby with a security manager." />
  29. <meta content="permissions, granting to derby.jar" name="DC.subject" />
  30. <meta content="permissions, granting to derby.jar" name="keywords" />
  31. <meta scheme="URI" name="DC.Relation" content="csecjavasecurity.html" />
  32. <meta scheme="URI" name="DC.Relation" content="rsecnetservbasic.html" />
  33. <meta scheme="URI" name="DC.Relation" content="rsecpolicysample.html" />
  34. <meta scheme="URI" name="DC.Relation" content="csecrunpolicy.html" />
  35. <meta scheme="URI" name="DC.Relation" content="tsecnetservrun.html" />
  36. <meta scheme="URI" name="DC.Relation" content="tsecnetservopen.html" />
  37. <meta content="XHTML" name="DC.Format" />
  38. <meta content="csecembeddedperms" name="DC.Identifier" />
  39. <meta content="en-us" name="DC.Language" />
  40. <link href="commonltr.css" type="text/css" rel="stylesheet" />
  41. <title>Running embedded Derby
  42. with a security manager</title>
  43. </head>
  44. <body id="csecembeddedperms"><a name="csecembeddedperms"><!-- --></a>
  45. <h1 class="topictitle1">Running embedded <span>Derby</span>
  46. with a security manager</h1>
  47. <div><p>This section describes the permissions that should be granted to the
  48. codebase <samp class="codeph">derby.jar</samp> to allow you to run embedded <span>Derby</span> with a security
  49. manager.</p>
  50. <p>These permissions are also needed to run the Network Server, but the Network
  51. Server requires additional permissions as well.</p>
  52. <p>These permissions are listed approximately in the order shown in <a href="rsecpolicysample.html">Sample customized Java security policy file</a>. Some of the optional permissions are not
  53. included in <a href="rsecpolicysample.html">Sample customized Java security policy file</a>.</p>
  54. <div class="section"><h2 class="sectiontitle">Mandatory permissions</h2><dl>
  55. <dt class="dlterm">permission java.lang.RuntimePermission "createClassLoader"</dt>
  56. <dd>Mandatory. It allows
  57. <span>Derby</span> to execute SQL queries
  58. and supports loading class files from jar files stored in the database.</dd>
  59. <dt class="dlterm">permission java.util.PropertyPermission "derby.*", "read"</dt>
  60. <dd>Allows <span>Derby</span> to read
  61. individual <span>Derby</span> properties
  62. set in the JVM system properties. If the action is denied, the properties set in
  63. the JVM system properties are ignored.</dd>
  64. </dl>
  65. </div>
  66. <div class="section"><h2 class="sectiontitle">Optional permissions</h2><dl>
  67. <dt class="dlterm">permission java.util.PropertyPermission "user.dir", "read"</dt>
  68. <dd>Permits access to the system directory value if
  69. <samp class="codeph">derby.system.home</samp> is not set or no permission has been granted
  70. to read the <samp class="codeph">derby.system.home</samp> property.</dd>
  71. <dt class="dlterm">permission java.util.PropertyPermission "sun.arch.data.model", "read"</dt>
  72. <dd>If set by the JVM, this is the definite answer to whether the system is
  73. 32-bit or 64-bit.</dd>
  74. <dt class="dlterm">permission java.util.PropertyPermission "os.arch", "read"</dt>
  75. <dd>Used by <span>Derby</span> to
  76. determine if the system is 32-bit or 64-bit, if the system property
  77. <samp class="codeph">sun.arch.data.model</samp> isn't set by the JVM.
  78. <span>Derby</span> has to recognize the
  79. value of <samp class="codeph">os.arch</samp> to determine if the system is 32-bit or
  80. 64-bit, and if the value isn't recognized, a heuristic will be used
  81. instead.</dd>
  82. <dt class="dlterm">permission java.io.FilePermission "${derby.system.home}", "read,write"</dt>
  83. <dd>Allows <span>Derby</span> to determine
  84. the system directory when it is set by <samp class="codeph">derby.system.home</samp> and
  85. create it if needed. If the system directory already exists, only the "read"
  86. permission needs to be granted.</dd>
  87. <dt class="dlterm">permission java.io.FilePermission "${derby.system.home}${/}derby.properties",
  88. "read"</dt>
  89. <dd>Allows <span>Derby</span> to read the
  90. system properties file from the system directory.</dd>
  91. <dt class="dlterm">permission java.io.FilePermission "${derby.system.home}${/}derby.log",
  92. "read,write,delete"</dt>
  93. <dt class="dlterm">permission java.io.FilePermission "${user.dir}${/}derby.log",
  94. "read,write,delete";</dt>
  95. <dd>Only one of these permissions is needed. Permits the application to read,
  96. write, and delete to the
  97. <span>Derby</span> log file, unless the
  98. log has been redirected. (See the <samp class="codeph">derby.stream.error</samp> properties
  99. in the <span><em>Derby Reference Manual</em></span> for more information.) If
  100. one of the requested valid actions is denied, the
  101. <span>Derby</span> log will be
  102. <samp class="codeph">java.lang.System.err</samp>.</dd>
  103. <dt class="dlterm">permission java.security.SecurityPermission "getPolicy"</dt>
  104. <dd>You need this permission if you want to change the security policy on the
  105. fly and reload it into a running system. Given this permission, a System
  106. Administrator can reload the policy file by calling the
  107. <samp class="codeph">SYSCS_UTIL.SYSCS_RELOAD_SECURITY_POLICY</samp> system procedure, which
  108. is described in the <span><em>Derby Reference Manual</em></span>.</dd>
  109. <dt class="dlterm">permission javax.management.MBeanServerPermission "createMBeanServer";</dt>
  110. <dd>Allows <span>Derby</span> to create an
  111. MBean server. If the JVM running
  112. <span>Derby</span> supports the platform
  113. MBean server, <span>Derby</span> will
  114. automatically try to create such a server if it does not already exist. For
  115. details, see "Using Java Management Extensions (JMX) technology" in the
  116. <span><em>Derby Server and Administration Guide</em></span>.</dd>
  117. <dt class="dlterm">permission javax.management.MBeanPermission
  118. "org.apache.derby.*#[org.apache.derby:*]", "registerMBean,unregisterMBean";</dt>
  119. <dd>Allows <span>Derby</span> to register
  120. and unregister its (JMX) MBeans. Such MBeans are associated with the domain
  121. <samp class="codeph">org.apache.derby</samp>, which is also the prefix of the fully
  122. qualified class name of all
  123. <span>Derby</span> MBeans. For more
  124. information about the <span>Derby</span>
  125. MBeans, refer to the public API documentation of the package
  126. <samp class="codeph">org.apache.derby.mbeans</samp> and its subpackages. It is possible to
  127. fine-tune this permission (for example, to allow access only to certain MBeans).
  128. To fine-tune this permission, see the API documentation for
  129. <samp class="codeph">javax.management.MBeanPermission</samp> or the JMX Instrumentation
  130. and Agent Specification.</dd>
  131. <dt class="dlterm">permission javax.management.MBeanTrustPermission "register";</dt>
  132. <dd>Trusts <span>Derby</span> code to be
  133. the source of MBeans and to register these in the MBean server.</dd>
  134. <dt class="dlterm">permission java.lang.RuntimePermission "getProtectionDomain";</dt>
  135. <dd>This permission is needed if you want classpath information to be printed to
  136. <samp class="codeph">derby.log</samp>.</dd>
  137. <dt class="dlterm">permission java.sql.SQLPermission "callAbort";</dt>
  138. <dd>Allows <span>Derby</span> code to call
  139. the <samp class="codeph">java.sql.Connection.abort</samp> method. This permission must be
  140. granted both to the <span>Derby</span>
  141. JDBC driver (by granting it to <samp class="codeph">derby.jar</samp> and
  142. <samp class="codeph">derbyclient.jar</samp>) and to the application code that calls
  143. <samp class="codeph">Connection.abort()</samp>. Do not grant this permission to application
  144. code unless you are certain that only superusers can invoke the code.</dd>
  145. <dt class="dlterm">permission java.lang.RuntimePermission "accessUserInformation";</dt>
  146. <dt class="dlterm">permission java.lang.RuntimePermission "getFileStoreAttributes";</dt>
  147. <dd>These two permissions are needed when you are running with JDK 7 or higher
  148. and when the secure file mask settings are active (that is, when
  149. <samp class="codeph">derby.storage.useDefaultFilePermissions</samp> is set to false, or
  150. when the server has been started from the command line (in which case secure
  151. file mask settings are active by default). See
  152. <a href="csecnetservfileperms.html">Restricting file permissions</a> for details.</dd>
  153. <dt class="dlterm">permission java.net.SocketPermission "localhost:389", "connect,resolve";</dt>
  154. <dd>Allows <span>Derby</span> code to
  155. contact the LDAP server to perform authentication. This permission must be
  156. granted to <samp class="codeph">derby.jar</samp>. Port 389 is the default LDAP port.</dd>
  157. <dt class="dlterm">permission java.lang.RuntimePermission "setContextClassLoader"</dt>
  158. <dd>Allows <span>Derby</span> to set the
  159. context class loader for long running threads to null to avoid potential for
  160. class loader leaks in application server environments when the application
  161. server starts <span>Derby</span> in a
  162. custom class loader.</dd>
  163. <dt class="dlterm">permission java.lang.RuntimePermission "getClassLoader"</dt>
  164. <dd> This permission is also needed when setting the context class loader to
  165. avoid class loader leaks. The class loader for the parent is saved and set to
  166. null before creation of the thread and restored afterwards.</dd>
  167. <dt class="dlterm">permission java.lang.RuntimePermission "getStackTrace";</dt>
  168. <dt class="dlterm">permission java.lang.RuntimePermission "modifyThreadGroup";</dt>
  169. <dd>These two permissions are needed to allow extended diagnostics, specifically
  170. the stack traces of all threads, to be dumped to <samp class="codeph">derby.log</samp> on
  171. severe errors and when the
  172. <samp class="codeph">derby.stream.error.extendedDiagSeverityLevel</samp> property is set.
  173. See the documentation of this property in the
  174. <span><em>Derby Reference Manual</em></span> for details.</dd>
  175. <dt class="dlterm">permission java.sql.SQLPermission "deregisterDriver";</dt>
  176. <dd>Allows <span>Derby</span> to
  177. deregister the driver. This permission is needed for system shutdown only on the
  178. Java SE 8 platform and higher, if system shutdown is invoked without the
  179. <samp class="codeph">deregister=false</samp> connection URL attribute (see the
  180. <span><em>Derby Reference Manual</em></span> for details).</dd>
  181. </dl>
  182. </div>
  183. <div class="section"><h2 class="sectiontitle">Combining permissions</h2>
  184. <div class="p">The <a href="rsecpolicysample.html#rsecpolicysample">Sample customized Java security policy file</a>
  185. combines several <samp class="codeph">derby.system.home</samp> permissions into one
  186. permission as follows:
  187. <pre>permission java.io.FilePermission "${derby.system.home}/-", "read,write,delete";</pre>
  188. This permission allows the
  189. <span>Derby</span> engine complete access
  190. to the system directory and any databases contained in the system directory.
  191. You will probably want to restrict these liberal permissions, which allow the
  192. server to backup/restore and export/import to or from any location in the local
  193. file system.</div>
  194. </div>
  195. </div>
  196. <div>
  197. <div class="familylinks">
  198. <div class="parentlink"><strong>Parent topic:</strong> <a href="csecjavasecurity.html" title="The Java security manager lets you reduce the damage that your application can do.">Configuring Java security</a></div>
  199. </div>
  200. <div class="relconcepts"><strong>Related concepts</strong><br />
  201. <div><a href="csecrunpolicy.html" title="You can bring up the Network Server with a security manager and a customized policy file.">Using a Java security policy file</a></div>
  202. </div>
  203. <div class="reltasks"><strong>Related tasks</strong><br />
  204. <div><a href="tsecnetservrun.html" title="If you start the Network Server without specifying a security manager, the Network Server installs a default Java security manager that enforces a Basic policy.">Running the Network Server with a security manager</a></div>
  205. <div><a href="tsecnetservopen.html" title="You may override the Network Server's default installation of a security manager if, for some reason, you need to run your application outside of the Java security protections.">Running the Network Server without a security manager</a></div>
  206. </div>
  207. <div class="relref"><strong>Related reference</strong><br />
  208. <div><a href="rsecnetservbasic.html" title="If you start the Network Server without specifying a security manager, the Network Server will install a default Java security manager that enforces a basic policy.">Basic security policy template</a></div>
  209. <div><a href="rsecpolicysample.html" title="Here is a sample customized Java security policy file.">Sample customized Java security policy file</a></div>
  210. </div>
  211. </div>
  212. </body>
  213. </html>