db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r1328459 - in /db/derby/docs/trunk/src: adminguide/ devguide/ ref/
Date Fri, 20 Apr 2012 17:36:42 GMT
Author: chaase3
Date: Fri Apr 20 17:36:42 2012
New Revision: 1328459

URL: http://svn.apache.org/viewvc?rev=1328459&view=rev
Log:
DERBY-5442  Create documentation for restrictive file permissions feature

Added one new topic to Reference Manual and another to Admin Guide; modified one topic each
in Reference Manual, Admin Guide, and Developer's Guide.

Patch: DERBY-5442-2.diff

Added:
    db/derby/docs/trunk/src/adminguide/cadminnetservfileperms.dita   (with props)
    db/derby/docs/trunk/src/ref/rrefproperdefaultfileperms.dita   (with props)
Modified:
    db/derby/docs/trunk/src/adminguide/derbyadmin.ditamap
    db/derby/docs/trunk/src/adminguide/tadmincbdjhhfd.dita
    db/derby/docs/trunk/src/devguide/cdevdvlp27610.dita
    db/derby/docs/trunk/src/ref/crefproper22250.dita
    db/derby/docs/trunk/src/ref/refderby.ditamap

Added: db/derby/docs/trunk/src/adminguide/cadminnetservfileperms.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/adminguide/cadminnetservfileperms.dita?rev=1328459&view=auto
==============================================================================
--- db/derby/docs/trunk/src/adminguide/cadminnetservfileperms.dita (added)
+++ db/derby/docs/trunk/src/adminguide/cadminnetservfileperms.dita Fri Apr 20 17:36:42 2012
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
+ "../dtd/concept.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+   http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<concept id="cadminnetservfileperms" xml:lang="en-us">
+<title>Controlling database file access</title>
+<prolog><metadata>
+<keywords><indexterm>derby.storage.useDefaultFilePermissions property</indexterm>
+<indexterm>database files<indexterm>specifying permissions with Java SE 7 and
up</indexterm></indexterm>
+<indexterm>file permissions<indexterm>specifying with Java SE 7 and up</indexterm></indexterm>
+<indexterm>permissions<indexterm>file, specifying with Java SE 7 and up</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<conbody>
+<p>When <ph conref="../conrefs.dita#prod/productshortname"></ph> creates
new
+files, the visibility of the new file (that is, which users can access it) is
+normally determined by the JVM environment and the file location only (that is,
+by the umask setting on UNIX and Linux systems and by the default file
+permissions on Windows NTFS).</p>
+<p>On Java SE 7 or later,
+<ph conref="../conrefs.dita#prod/productshortname"></ph> may further restrict
+the file permissions to the operating system account that started the Java
+process (that is, to the minimum access needed for operation). This means that
+other operating system accounts will have no access to directories or files
+created by <ph conref="../conrefs.dita#prod/productshortname"></ph>. This
+behavior can be helpful in enhancing default security for database files.</p>
+<p>The exact behavior is determined by two factors: how the
+<ph conref="../conrefs.dita#prod/productshortname"></ph> engine is started, and
+the presence or absence and specified value of the property
+<codeph>derby.storage.useDefaultFilePermissions</codeph>.</p>
+<p>The two tables that follow show how file access works with Java SE 6 and with
+Java SE 7 and later JVMs. In both tables,</p>
+<ul>
+<li>"Environment" means that access is controlled entirely by the JVM
+environment and the file location only (that is, by the umask setting on UNIX
+and Linux systems and by the default file permissions on Windows NTFS).</li>
+<li>"Restricted" means that
+<ph conref="../conrefs.dita#prod/productshortname"></ph> restricts access to
the
+operating system account that started the JVM.</li>
+</ul>
+<p>The following table shows how file access works on Java SE 6 systems.</p>
+<table>
+<title>File access on Java SE 6 systems</title>
+<desc>This table shows how access to <ph conref="../conrefs.dita#prod/productshortname"></ph>
files is controlled on Java SE 6 systems.</desc>
+<tgroup cols="3" colsep="1" rowsep="1">
+<colspec colname="col1" colnum="1" colwidth="20*"/>
+<colspec colname="col2" colnum="2" colwidth="40*"/>
+<colspec colname="col3" colnum="3" colwidth="40*"/>
+<thead>
+<row valign="bottom">
+<entry colname="col1">Property Setting</entry>
+<entry colname="col2">Server Started from Command Line</entry>
+<entry colname="col3">Server Started Programmatically or Embedded</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry colname="col1">Not applicable</entry>
+<entry colname="col2">Environment</entry>
+<entry colname="col3">Environment</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+<p>The following table shows how file access works on Java SE 7 and later
+systems with various settings of the
+<codeph>derby.storage.useDefaultFilePermissions</codeph> property.</p>
+<table>
+<title>File access on Java SE 7 and later systems</title>
+<desc>This table shows how access to <ph conref="../conrefs.dita#prod/productshortname"></ph>
files is controlled on Java SE 7 and later systems.</desc>
+<tgroup cols="3" colsep="1" rowsep="1">
+<colspec colname="col1" colnum="1" colwidth="20*"/>
+<colspec colname="col2" colnum="2" colwidth="40*"/>
+<colspec colname="col3" colnum="3" colwidth="40*"/>
+<thead>
+<row valign="bottom">
+<entry colname="col1">Property Setting</entry>
+<entry colname="col2">Server Started from Command Line</entry>
+<entry colname="col3">Server Started Programmatically or Embedded</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry colname="col1">No property specified</entry>
+<entry colname="col2">Restricted</entry>
+<entry colname="col3">Environment</entry>
+</row>
+<row>
+<entry colname="col1">Property set to true</entry>
+<entry colname="col2">Environment</entry>
+<entry colname="col3">Environment</entry>
+</row>
+<row>
+<entry colname="col1">Property set to false</entry>
+<entry colname="col2">Restricted</entry>
+<entry colname="col3">Restricted</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+<p>For more information, see "derby.storage.useDefaultFilePermissions" in
+the <ph conref="../conrefs.dita#pub/citref"></ph>.</p>
+</conbody>
+</concept>

Propchange: db/derby/docs/trunk/src/adminguide/cadminnetservfileperms.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/adminguide/derbyadmin.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/adminguide/derbyadmin.ditamap?rev=1328459&r1=1328458&r2=1328459&view=diff
==============================================================================
--- db/derby/docs/trunk/src/adminguide/derbyadmin.ditamap (original)
+++ db/derby/docs/trunk/src/adminguide/derbyadmin.ditamap Fri Apr 20 17:36:42 2012
@@ -320,6 +320,8 @@ navtitle="Setting Network Server propert
 <topicref collection-type="family" href="cadminadvtops.dita" navtitle="Derby Network Server
advanced topics">
 <topicref href="cadminnetservsecurity.dita" navtitle="Network Server security">
 </topicref>
+<topicref href="cadminnetservfileperms.dita" navtitle="Controlling database file access">
+</topicref>
 <topicref collection-type="family" href="tadminnetservrun.dita" navtitle="Running the
Network Server under the security manager">
 <topicref href="tadminnetservbasic.dita" navtitle="Basic Network Server security policy"></topicref>
 <topicref href="tadminnetservcustom.dita" navtitle="Customizing the Network Server's security
policy"></topicref>

Modified: db/derby/docs/trunk/src/adminguide/tadmincbdjhhfd.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/adminguide/tadmincbdjhhfd.dita?rev=1328459&r1=1328458&r2=1328459&view=diff
==============================================================================
--- db/derby/docs/trunk/src/adminguide/tadmincbdjhhfd.dita (original)
+++ db/derby/docs/trunk/src/adminguide/tadmincbdjhhfd.dita Fri Apr 20 17:36:42 2012
@@ -40,8 +40,14 @@ authorization, see "Users and authorizat
 authorizations" in the <ph conref="../conrefs.dita#pub/citdevelop"></ph>.
 You are also urged to install a Java security manager with a
 customized security policy. For details on how to do this, see
-<xref href="tadminnetservcustom.dita"></xref>.
-</p>
+<xref href="tadminnetservcustom.dita"></xref>.</p>
+<p>If you are running Java SE 7 or later, and if you start the
+<ph conref="../conrefs.dita#prod/productshortname"></ph> Network Server from
the
+command line as described here, access to databases and to other
+<ph conref="../conrefs.dita#prod/productshortname"></ph> files is by default
+restricted to the operating system account that started the Network Server. It
+is possible to override this default behavior. For more information, see
+<xref href="cadminnetservfileperms.dita#cadminnetservfileperms"></xref>.</p>
 <p>You can start the Network Server in any of the following ways:</p>
 <ul>
 <li><p>If you are relatively new to the Java programming language, follow the


Modified: db/derby/docs/trunk/src/devguide/cdevdvlp27610.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevdvlp27610.dita?rev=1328459&r1=1328458&r2=1328459&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevdvlp27610.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevdvlp27610.dita Fri Apr 20 17:36:42 2012
@@ -57,6 +57,13 @@ href="cdevdvlp25889.dita#cdevdvlp25889">
 has the same name as the database (see <xref href="cdevdvlp21955.dita#cdevdvlp21955"></xref>).</p>
 <p>In addition, if you connect to a database outside the current system, it
 automatically becomes part of the current system.</p>
-<note>In-memory databases do not appear in the system directory.</note>
+<p>When you use the embedded driver,
+<ph conref="../conrefs.dita#prod/productshortname"></ph> database files and log
+files normally have whatever default permissions you specify for your file
+system. If you are running with Java SE 7 or later, however, you can enhance
+security by restricting file access to the user who creates the database. To do
+this, set the system property <i>derby.storage.useDefaultFilePermissions</i>
to
+false. See the <ph conref="../conrefs.dita#pub/citref"></ph> for details.</p>
+<p><note>In-memory databases do not appear in the system directory.</note></p>
 </conbody>
 </concept>

Modified: db/derby/docs/trunk/src/ref/crefproper22250.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/crefproper22250.dita?rev=1328459&r1=1328458&r2=1328459&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/crefproper22250.dita (original)
+++ db/derby/docs/trunk/src/ref/crefproper22250.dita Fri Apr 20 17:36:42 2012
@@ -313,6 +313,11 @@ about when changes to the property are d
 <entry colname="3">Static</entry>
 </row>
 <row>
+<entry colname="1"><i><xref href="rrefproperdefaultfileperms.dita#rrefproperdefaultfileperms">derby.storage.useDefaultFilePermissions</xref></i></entry>
+<entry colname="2">S</entry>
+<entry colname="3">Static</entry>
+</row>
+<row>
 <entry colname="1"><i><xref href="rrefproperextdiagsevlevel.dita#rrefproperextdiagsevlevel">derby.stream.error.extendedDiagSeverityLevel</xref></i></entry>
 <entry colname="2">S</entry>
 <entry colname="3">Static</entry>

Modified: db/derby/docs/trunk/src/ref/refderby.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/refderby.ditamap?rev=1328459&r1=1328458&r2=1328459&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/refderby.ditamap (original)
+++ db/derby/docs/trunk/src/ref/refderby.ditamap Fri Apr 20 17:36:42 2012
@@ -829,6 +829,8 @@ URL syntax"></topicref>
 <topicref href="rrefproperrowlocking.dita" navtitle="derby.storage.rowLocking"></topicref>
 <topicref href="rrefproper34037.dita" navtitle="derby.storage.tempDirectory">
 </topicref>
+<topicref href="rrefproperdefaultfileperms.dita" navtitle="derby.storage.useDefaultFilePermissions">
+</topicref>
 <topicref href="rrefproperextdiagsevlevel.dita" navtitle="derby.stream.error.extendedDiagSeverityLevel">
 </topicref>
 <topicref href="rrefproper33027.dita" navtitle="derby.stream.error.field">

Added: db/derby/docs/trunk/src/ref/rrefproperdefaultfileperms.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefproperdefaultfileperms.dita?rev=1328459&view=auto
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefproperdefaultfileperms.dita (added)
+++ db/derby/docs/trunk/src/ref/rrefproperdefaultfileperms.dita Fri Apr 20 17:36:42 2012
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "../dtd/reference.dtd">
+<reference xml:lang="en-us" id="rrefproperdefaultfileperms">
+<title>derby.storage.useDefaultFilePermissions</title>
+<prolog><metadata>
+<keywords><indexterm>derby.storage.useDefaultFilePermissions</indexterm>
+<indexterm>database files<indexterm>specifying permissions with Java SE 7 and
up</indexterm></indexterm>
+<indexterm>file permissions<indexterm>specifying with Java SE 7 and up</indexterm></indexterm>
+<indexterm>permissions<indexterm>file, specifying with Java SE 7 and up</indexterm></indexterm>
+</keywords>
+</metadata>
+</prolog>
+<refbody>
+<section><title>Function</title>
+<p>If you run with Java SE 7 or later, and if you start the
+<ph conref="../conrefs.dita#prod/productshortname"></ph> Network Server from
the
+command line, access to databases and to other files created by
+<ph conref="../conrefs.dita#prod/productshortname"></ph> is by default
+restricted to the operating system account that started the Network Server. File
+access is not restricted for embedded databases or for databases managed by
+servers that are started programmatically inside application code using the
+<ph conref="../conrefs.dita#prod/productshortname"></ph> API.</p>
+<p>You can override this default behavior by setting the system property
+<i>derby.storage.useDefaultFilePermissions</i> to either true or false:</p>
+<ul>
+<li>If you set the property to true, the Network Server uses whatever default
+file permissions the user has set for their system.</li>
+<li>If you set the property to false, access is limited not only for files
+created by the Network Server when it is started from the command line, but also
+for embedded databases and for databases managed by servers which are started
+programmatically inside application code using the
+<ph conref="../conrefs.dita#prod/productshortname"></ph> API. This enhances
+security for all database files.</li>
+</ul>
+<p>If you use a version of Java SE earlier than Java SE 7, this property is
+ignored, and <ph conref="../conrefs.dita#prod/productshortname"></ph> uses the
+default file permissions the user has set for their system.</p>
+<p>The two tables that follow show how file access works with Java SE 6 and with
+Java SE 7 and later JVMs. In both tables,</p>
+<ul>
+<li>"Environment" means that access is controlled entirely by the JVM
+environment and the file location only (that is, by the umask setting on UNIX
+and Linux systems and by the default file permissions on Windows NTFS).</li>
+<li>"Restricted" means that
+<ph conref="../conrefs.dita#prod/productshortname"></ph> restricts access to
the
+operating system account that started the JVM.</li>
+</ul>
+<p>The following table shows how file access works on Java SE 6 systems.</p>
+<table>
+<title>File access on Java SE 6 systems</title>
+<desc>This table shows how access to <ph conref="../conrefs.dita#prod/productshortname"></ph>
files is controlled on Java SE 6 systems.</desc>
+<tgroup cols="3" colsep="1" rowsep="1">
+<colspec colname="col1" colnum="1" colwidth="20*"/>
+<colspec colname="col2" colnum="2" colwidth="40*"/>
+<colspec colname="col3" colnum="3" colwidth="40*"/>
+<thead>
+<row valign="bottom">
+<entry colname="col1">Property Setting</entry>
+<entry colname="col2">Server Started from Command Line</entry>
+<entry colname="col3">Server Started Programmatically or Embedded</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry colname="col1">Not applicable</entry>
+<entry colname="col2">Environment</entry>
+<entry colname="col3">Environment</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+<p>The following table shows how file access works on Java SE 7 and later
+systems with various settings of the
+<codeph>derby.storage.useDefaultFilePermissions</codeph> property.</p>
+<table>
+<title>File access on Java SE 7 and later systems</title>
+<desc>This table shows how access to <ph conref="../conrefs.dita#prod/productshortname"></ph>
files is controlled on Java SE 7 and later systems.</desc>
+<tgroup cols="3" colsep="1" rowsep="1">
+<colspec colname="col1" colnum="1" colwidth="20*"/>
+<colspec colname="col2" colnum="2" colwidth="40*"/>
+<colspec colname="col3" colnum="3" colwidth="40*"/>
+<thead>
+<row valign="bottom">
+<entry colname="col1">Property Setting</entry>
+<entry colname="col2">Server Started from Command Line</entry>
+<entry colname="col3">Server Started Programmatically or Embedded</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry colname="col1">No property specified</entry>
+<entry colname="col2">Restricted</entry>
+<entry colname="col3">Environment</entry>
+</row>
+<row>
+<entry colname="col1">Property set to true</entry>
+<entry colname="col2">Environment</entry>
+<entry colname="col3">Environment</entry>
+</row>
+<row>
+<entry colname="col1">Property set to false</entry>
+<entry colname="col2">Restricted</entry>
+<entry colname="col3">Restricted</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+<p>For more information, see "Controlling database file access" in the
+<ph conref="../conrefs.dita#pub/citadmin"></ph>.</p>
+</section>
+<section><title>Default</title>
+<p>By default, this property is not set.</p>
+</section>
+<example><title>Example</title>
+<codeblock><b>derby.storage.useDefaultFilePermissions=true</b></codeblock>
+</example>
+<section><title>Scope</title>
+<p><xref href="crefproper51399.dita#crefproper51399/rrefproper41229">system-wide</xref></p>
+</section>
+<section><title>Dynamic or static</title>
+<p>This property is static; if you change it while
+<ph conref="../conrefs.dita#prod/productshortname"></ph> is running, the change
+does not take effect until you reboot.</p>
+</section>
+</refbody>
+</reference>

Propchange: db/derby/docs/trunk/src/ref/rrefproperdefaultfileperms.dita
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message