db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r431680 - /db/derby/docs/trunk/src/devguide/
Date Tue, 15 Aug 2006 19:18:14 GMT
Author: jta
Date: Tue Aug 15 12:18:14 2006
New Revision: 431680

URL: http://svn.apache.org/viewvc?rev=431680&view=rev
Log:
DERBY-1057 (partial): Update the Developer's Guide with info about Grant and 
Revoke. 

Patch (derby1057_devguide4.ddiff) by Laura Stewart <scotsmatrix@gmail.com>.

Did these additional modifications:
 - 'svn del' on the rdevcsecure131.dita and rdevcsecure935.dita files.
 - Removed entries for the deleted files from derbydev.ditamap.
 - Removed Arbortext comments.

Added:
    db/derby/docs/trunk/src/devguide/cdevcsecuregrantrevokeaccess.dita   (with props)
Removed:
    db/derby/docs/trunk/src/devguide/rdevcsecure131.dita
    db/derby/docs/trunk/src/devguide/rdevcsecure935.dita
Modified:
    db/derby/docs/trunk/src/devguide/cdevcsecure36595.dita
    db/derby/docs/trunk/src/devguide/cdevcsecure42374.dita
    db/derby/docs/trunk/src/devguide/cdevcsecure865818.dita
    db/derby/docs/trunk/src/devguide/cdevcsecure865880.dita
    db/derby/docs/trunk/src/devguide/cdevcsecure866060.dita
    db/derby/docs/trunk/src/devguide/derbydev.ditamap
    db/derby/docs/trunk/src/devguide/rdevcsecure190.dita
    db/derby/docs/trunk/src/devguide/rdevcsecure379.dita

Modified: db/derby/docs/trunk/src/devguide/cdevcsecure36595.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevcsecure36595.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevcsecure36595.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevcsecure36595.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
  "../dtd/concept.dtd">
 <!-- 
@@ -19,16 +18,87 @@
 limitations under the License.
 -->
 <concept id="cdevcsecure36595" xml:lang="en-us">
-<title>User authorization</title>
-<shortdesc><ph conref="devconrefs.dita#prod/productshortname"></ph> provides
-user authorization, which is a means of granting users permission to access
-a database (or system).</shortdesc>
+<title>User authorizations</title>
+<shortdesc>When you specify user authorizations, <ph conref="devconrefs.dita#prod/productshortname"></ph> verifies
+that a user has been granted permission to access a system, database, object,
+or SQL action. </shortdesc>
 <prolog><metadata>
-<keywords><indexterm>User authorization</indexterm><indexterm>Authorization</indexterm>
-</keywords>
+<keywords><indexterm>user authorizations<indexterm>overview</indexterm></indexterm>
+<indexterm>authorizations<indexterm>users, overview</indexterm><indexterm>properties<indexterm>derby.database.defaultConnectionMode</indexterm></indexterm
+><indexterm>properties<indexterm>derby.database.sqlAuthorization</indexterm></indexterm><indexterm>properties<indexterm>derby.database.fullAccessUsers</indexterm
+></indexterm><indexterm>properties<indexterm>derby.database.readOnlyAccessUsers</indexterm></indexterm><indexterm>derby.database.defaultConnectionMode
+property<indexterm>description</indexterm></indexterm><indexterm>derby.database.sqlAuthorization
+property<indexterm>description</indexterm></indexterm></indexterm><indexterm>derby.database.fullAccessUsers
+property<indexterm>description</indexterm></indexterm><indexterm>derby.database.readOnlyAccessUsers
+property<indexterm>description</indexterm></indexterm><indexterm>user authorizations<indexterm>changing
+properties</indexterm></indexterm></keywords>
 </metadata></prolog>
 <conbody>
-<p><ph conref="devconrefs.dita#prod/productshortname"></ph> allows you to
-distinguish between full (read-write) access and read-only access.</p>
+<p>There are two types of user authorization in <ph conref="devconrefs.dita#prod/productshortname"></ph>,
+connection authorization and SQL authorization. <term>Connection authorization</term> specifies
+the access that users have to connect to a system or database. <term>SQL authorization</term> controls
+the permissions that users have on database objects or for SQL actions. You
+can set the user authorization properties in <ph conref="devconrefs.dita#prod/productshortname"></ph> as
+system-level properties or database-level properties.</p>
+<p>Set system-level user authorizations when you are developing applications,
+or when you want to specify a secure default authorization for all users to
+connect to all of the databases in the system.</p>
+<p>There are several properties that you can set to control database-level
+user authorizations. Some of the properties are general properties that set
+the access mode for all users. Other properties are user specific properties
+that set the type of access for specific user IDs.</p>
+<p>The properties that affect authorization are:<ul>
+<li> The <codeph>derby.database.defaultConnectionMode</codeph> property controls
+the default access mode. Use the <codeph>derby.database.defaultConnectionMode</codeph> property
+to specify the default connection access that users have when they connect
+to the database. If you do not explicitly set the <codeph>derby.database.defaultConnectionMode</codeph> property,
+the default user authorization for a database is <varname>fullAccess</varname>,
+which is read-write access.</li>
+<li>The <codeph>derby.database.sqlAuthorization</codeph> property enables
+SQL standard authorization. Use the <codeph>derby.database.sqlAuthorization</codeph> property
+to specify if object owners can grant and revoke permission for users to perform
+SQL actions on database objects. The default setting for the <codeph>derby.database.sqlAuthorization</codeph> property
+is <varname>FALSE</varname>. When the <codeph>derby.database.sqlAuthorization</codeph> property
+is set to <varname>TRUE</varname>, object owners can use the GRANT and REVOKE
+SQL statements to set the user permissions for specific database objects or
+for specific SQL actions. </li>
+<li>The <codeph>derby.database.fullAccessUsers</codeph> and <codeph>derby.database.readOnlyAccessUsers</codeph> properties
+are user specific properties. Use these properties to specify the user IDs
+that have read-write access and read-only access to a database.</li>
+</ul></p>
+<p>If you do not specify the user authorizations for a specific user ID, the
+user ID inherits whatever authorization is set as the default user authorization
+for the database.</p>
+<note type="tip">If you set the <codeph>derby.database.defaultConnectionMode</codeph> property
+to <varname>noAccess</varname> or <varname>readOnlyAccess</varname>, you should
+allow at least one user read-write access. Otherwise, depending on the default
+connection authorization you specify, you will configure the database so that
+it cannot be accessed or changed.</note>
+<section><title>How user authorization properties work together</title><p>The <codeph>derby.database.defaultConnectionMode</codeph> property
+and the <codeph>derby.database.sqlAuthorization</codeph> property work together.
+The default settings for these properties allow anyone to access and drop
+the database objects that you create. You can change the default access mode
+by specifying different settings for these properties.<ul>
+<li>When the <codeph>derby.database.sqlAuthorization</codeph> property is <varname>FALSE</varname>,
+the ability to read from or write to database objects is determined by the
+setting for the <codeph>derby.database.defaultConnectionMode</codeph> property.
+If the <codeph>derby.database.defaultConnectionMode</codeph> property is set
+to <varname>readOnlyAccess</varname>, users can access all of the database
+objects but they cannot update or drop the objects. </li>
+<li>When the <codeph>derby.database.sqlAuthorization</codeph> property is <varname>TRUE</varname>,
+the ability to read from or write to database objects is further restricted
+to the owner of the database objects. The owner must grant permission for
+others to access the database objects. No one but the owner of an object or
+the database owner can drop the object. </li>
+<li>The access mode specified for the <codeph>derby.database.defaultConnectionMode</codeph> property
+overrides the permissions that are granted by the owner of a database object.
+For example, if a user is granted INSERT privileges on a table but the user
+only has read-only connection authorization, the user cannot insert data into
+the table.</li>
+</ul></p></section>
+<section><title>Changes to connection authorization settings</title><p>Connection
+authorization properties are fixed for the duration of a connection. If you
+change the connection authorization properties during a connection, those
+changes are not in affect until you establish a new connection.</p></section>
 </conbody>
 </concept>

Modified: db/derby/docs/trunk/src/devguide/cdevcsecure42374.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevcsecure42374.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevcsecure42374.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevcsecure42374.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-
+ 
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
  "../dtd/concept.dtd">
 <!-- 
@@ -21,28 +21,30 @@
 <concept id="cdevcsecure42374" xml:lang="en-us">
 <title>Working with user authentication</title>
 <shortdesc><ph conref="devconrefs.dita#prod/productshortname"></ph> provides
-support for user authentication. <i>User authentication</i> means that <ph
-conref="devconrefs.dita#prod/productshortname"></ph> authenticates a user's
-name and password before allowing that user access to the system.</shortdesc>
+support for user authentication. <term>User authentication</term> means that <ph
+conref="devconrefs.dita#prod/productshortname"></ph> authenticates the name
+and password for a user before allowing that user access to the system.</shortdesc>
 <prolog><metadata>
-<keywords><indexterm>User authentication</indexterm><indexterm>Authentication</indexterm>
+<keywords><indexterm>user authentication<indexterm>overview</indexterm></indexterm>
+<indexterm>authentication<indexterm>users, overview</indexterm></indexterm>
 </keywords>
 </metadata></prolog>
 <conbody>
 <p>When user authentication is enabled (which it is not by default), the user
 requesting a connection must provide a valid name and password, which <ph
 conref="devconrefs.dita#prod/productshortname"></ph> verifies against the
-repository of users defined for the system. Once <ph conref="devconrefs.dita#prod/productshortname"></ph> authenticates
+repository of users defined for the system. After <ph conref="devconrefs.dita#prod/productshortname"></ph> authenticates
 the user, it grants the user access to the <ph conref="devconrefs.dita#prod/productshortname"></ph> system
 but not necessarily access to the database made in the connection request.
 In the <ph conref="devconrefs.dita#prod/productshortname"></ph> system, access
-to a database is determined by <i>user authorization</i>.</p>
-<p><ph conref="devconrefs.dita#prod/productshortname"></ph> allows you to
-provide a repository of users in a number of different ways. For example,
+to a database is determined by <xref href="cdevcsecure36595.dita#cdevcsecure36595">user
+authorization</xref>.</p>
+<p>For user authentication, <ph conref="devconrefs.dita#prod/productshortname"></ph> allows
+you to provide a repository of users in a number of different ways. For example,
 you can hook <ph conref="devconrefs.dita#prod/productshortname"></ph> up to
-an external directory service elsewhere in your enterprise, create your own,
-use <ph conref="devconrefs.dita#prod/productshortname"></ph>'s simple mechanism
-for creating a built-in repository of users.</p>
+an external directory service elsewhere in your enterprise, create your own
+directory service, or use <ph conref="devconrefs.dita#prod/productshortname"></ph>'s
+simple mechanism for creating a built-in repository of users.</p>
 <p>You can define a repository of users for a particular database or for an
 entire system, depending on whether you use system-wide or database-wide properties.</p>
 <p>When <ph conref="devconrefs.dita#prod/productshortname"></ph> user authentication

Modified: db/derby/docs/trunk/src/devguide/cdevcsecure865818.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevcsecure865818.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevcsecure865818.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevcsecure865818.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-
+ 
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
  "../dtd/concept.dtd">
 <!-- 
@@ -19,21 +19,43 @@
 limitations under the License.
 -->
 <concept id="cdevcsecure865818" xml:lang="en-us">
-<title>Setting the default access mode</title>
-<shortdesc>To specify the default access mode for the database, use the <i>derby.database.defaultConnectionMode</i> property.</shortdesc>
+<title>Setting the default connection access mode</title>
+<shortdesc>Use the <codeph>derby.database.defaultConnectionMode</codeph> property
+to specify the default type of access that users have when they connect to
+the database.</shortdesc>
 <prolog><metadata>
-<keywords><indexterm>Databases<indexterm>controlling access to</indexterm></indexterm>
+<keywords><indexterm>databases<indexterm>controlling access to</indexterm></indexterm>
+<indexterm>derby.database.ConnectionMode property</indexterm><indexterm><indexterm>properties</indexterm>defaultConnectionMode</indexterm>
 </keywords>
 </metadata></prolog>
 <conbody>
-<p>You can set the property to the following values:</p>
-<ul>
-<li><i>noAccess</i></li>
-<li><i>readOnlyAccess</i></li>
-<li><i>fullAccess</i> (the default)</li>
-</ul>
-<p><ph conref="devconrefs.dita#prod/productshortname"></ph> validates the
-authorization configuration properties when users set them. It raises an exception
-if a user attempts to set the properties to invalid values. </p>
+<p>The valid settings for the <codeph>derby.database.defaultConnectionMode</codeph> property
+are:<ul>
+<li><varname>noAccess</varname></li>
+<li><varname>readOnlyAccess</varname></li>
+<li><varname>fullAccess</varname></li>
+</ul></p>
+<p>If you do not specify a setting for the <codeph>derby.database.defaultConnectionMode</codeph> property,
+the default access setting is <varname>fullAccess</varname>.</p>
+<p>To set the default connection access mode, specify the access in a CALL
+statement. For example:</p>
+<p>To specify read-write access for the system administrator userID <codeph>sa</codeph> and
+the read-only as the default access for anyone else who connects to the database,
+issue these CALL statements:<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.fullAccessUsers', 'sa')
+
+CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.defaultConnectionMode',
+    'readOnlyAccess')
+</codeblock></p>
+<p>To specify read-write access for the user ID Fred and no access for other
+users, issue these CALL statements:</p>
+<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.fullAccessUsers', 'Fred')
+
+CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.defaultConnectionMode',
+    'noAccess')
+</codeblock>
 </conbody>
 </concept>

Modified: db/derby/docs/trunk/src/devguide/cdevcsecure865880.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevcsecure865880.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevcsecure865880.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevcsecure865880.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-
+ 
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
  "../dtd/concept.dtd">
 <!-- 
@@ -19,29 +19,31 @@
 limitations under the License.
 -->
 <concept id="cdevcsecure865880" xml:lang="en-us">
-<title>Setting the access mode for particular users</title>
-<shortdesc>To specify which particular users have full (read-write) access
-to a database, use the <i>derby.database.fullAccessUsers</i> property.</shortdesc>
+<title>Setting the user authorizations for individual users</title>
+<shortdesc>Use the <codeph>derby.database.fullAccessUsers</codeph> and <codeph>derby.database.readOnlyAccessUsers</codeph> properties
+to specify the user IDs that have read-write access and read-only access to
+a database.</shortdesc>
 <prolog><metadata>
-<keywords><indexterm>Access<indexterm>full (read-write) versus read-only</indexterm></indexterm>
+<keywords><indexterm>databases<indexterm>access for individual users, setting </indexterm></indexterm>
+<indexterm>derby.database.fullAccessUsers property</indexterm><indexterm><indexterm>properties</indexterm>derby.database.fullAccessUsers</indexterm>
+<indexterm>derby.database.readOnlyAccessUsers property</indexterm><indexterm><indexterm>properties</indexterm>derby.database.readOnlyAccessUsers</indexterm>
 </keywords>
 </metadata></prolog>
 <conbody>
-<p>For example:</p>
-<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
-    'derby.database.fullAccessUsers', 'sa,mary')</codeblock>
-<p>To specify which particular users have read-only access to a database,
-use the <i>derby.database.readOnlyAccessUsers</i> property. For example:</p>
-<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
-    'derby.database.readOnlyAccessUsers', 'guest,"Fred!"')</codeblock>
-<p>For these properties, you specify users as a comma-separated list (no spaces
-between the comma and the next user).</p>
-<p>For users not specified with either property the access is specified by
-the <i>derby.database.defaultConnectionMode</i> property.</p>
-<note>It is possible to configure a database so that it cannot be changed
-(or even accessed) using the <i>derby.database.defaultConnectionMode</i> property.
-If you set this property to <codeph><i>noAccess</i></codeph> or <codeph><i>readOnlyAccess</i></codeph>,
-be sure to allow at least one user full access.</note>
-<p>See the Javadoc for the utility for more details.</p>
+<p>You can specify multiple user IDs by using a comma-separated list, with
+no spaces between the comma and the next user ID.</p>
+<p>To set the user authorizations for individual users, specify the access
+in a CALL statement. For example:</p>
+<p>To specify read-write access for the system administrator user ID <codeph>sa</codeph> and
+for the user ID <codeph>maria</codeph>, issue this CALL statement:<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.fullAccessUsers', 'sa,maria')
+</codeblock></p>
+<p>To specify read-only access for a guest user ID and for Fred, issue this
+CALL statement:<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.readOnlyAccessUsers', 'guest,Fred')</codeblock></p>
+<p>To specify read-write access for the user ID "Elena!", use delimited identifiers
+for the user ID. For example: <codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.fullAccessUsers', '"Elena!"')
+</codeblock></p>
 </conbody>
 </concept>

Modified: db/derby/docs/trunk/src/devguide/cdevcsecure866060.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevcsecure866060.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevcsecure866060.dita (original)
+++ db/derby/docs/trunk/src/devguide/cdevcsecure866060.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
  "../dtd/concept.dtd">
 <!-- 
@@ -19,22 +18,38 @@
 limitations under the License.
 -->
 <concept id="cdevcsecure866060" xml:lang="en-us">
-<title>Setting user authorization</title>
-<shortdesc>Typically, you configure user authorization for a particular database.
-However, <ph conref="devconrefs.dita#prod/productshortname"></ph> also allows
-you to configure user authorization for the system, which is useful during
-development and for specifying a secure default access for all databases in
-the system.</shortdesc>
+<title>Setting the SQL standard authorization mode</title>
+<shortdesc>Use the <codeph>derby.database.sqlAuthorization</codeph> property
+to enable SQL standard authorization.</shortdesc>
 <prolog><metadata>
-<keywords><indexterm>User authorization<indexterm>for databases</indexterm></indexterm>
+<keywords><indexterm>databases<indexterm>SQL standard authorization, setting</indexterm></indexterm>
+<indexterm>derby.database.sqlAuthorization property</indexterm><indexterm><indexterm>properties</indexterm>derby.database.sqlAuthorization</indexterm>
 </keywords>
 </metadata></prolog>
 <conbody>
-<p>To control access to a particular database, set database-level properties
-that specify which users have full (read-write) access to the database and
-which users have read-only access to the database. Users not specified by
-either property inherit the default access for the database (none, read-only,
-or full read-write access). When not explicitly set, the default access for
-a database is full (read-write) access.</p>
+<p>The <codeph>derby.database.sqlAuthorization</codeph> property controls
+the ability for object owners to grant and revoke permission for users to
+perform actions on database objects. </p>
+<p>The valid settings for the <codeph>derby.database.sqlAuthorization</codeph> property
+are:<ul>
+<li><varname>TRUE</varname></li>
+<li><varname>FALSE</varname></li>
+</ul>The default setting for the <codeph>derby.database.sqlAuthorization</codeph> property
+is <varname>FALSE</varname>.</p>
+<p>After you set the <codeph>derby.database.sqlAuthorization</codeph> property
+to <varname>TRUE</varname>, you cannot set the property back to <varname>FALSE</varname>.</p>
+<p>You can set the <codeph>derby.database.sqlAuthorization</codeph> property
+as a system property or as a database property. If you set this property as
+a system property before you create the databases, all new databases will
+automatically have SQL authorization enabled. If the databases already exists,
+you can set this property only as a database property.</p>
+<p>To enable SQL standard authorization for the entire system, set the <codeph>derby.database.sqlAuthorization</codeph> property
+as a system property:<codeblock><b>derby.database.sqlAuthorization=true</b></codeblock></p>
+<p>To enable SQL standard authorization for a specific database, set the <codeph>derby.database.sqlAuthorization</codeph> property
+as a database property:</p>
+<codeblock>CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
+    'derby.database.sqlAuthorization',
+    'true')
+</codeblock>
 </conbody>
 </concept>

Added: db/derby/docs/trunk/src/devguide/cdevcsecuregrantrevokeaccess.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevcsecuregrantrevokeaccess.dita?rev=431680&view=auto
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevcsecuregrantrevokeaccess.dita (added)
+++ db/derby/docs/trunk/src/devguide/cdevcsecuregrantrevokeaccess.dita Tue Aug 15 12:18:14 2006
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
+ "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="cdevcsecuregrantrevokeaccess" xml:lang="en-us">
+<title>SQL standard authorization</title>
+<shortdesc>When the SQL standard authorization mode is enabled, object owners
+can use the GRANT and REVOKE SQL statements to set the user permissions for
+specific database objects or for specific SQL actions.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm>user authorizations<indexterm>grant</indexterm></indexterm>
+<indexterm>user authorizations<indexterm>revoke</indexterm></indexterm><indexterm>user
+authorizations<indexterm>PUBLIC</indexterm></indexterm><indexterm>GRANT statement<indexterm>overview</indexterm></indexterm>
+<indexterm>REVOKE statement<indexterm>overview</indexterm></indexterm><indexterm>access
+control system<indexterm>SQL2003</indexterm></indexterm><indexterm>SQL standard
+authorization mode</indexterm></keywords>
+</metadata></prolog>
+<conbody>
+<p>The SQL standard authorization mode is a SQL2003 compatible access control
+system. You enable the SQL standard authorization mode by setting the <codeph>derby.database.sqlAuthorization</codeph> property
+to <codeph>TRUE</codeph>.</p>
+<p>While <ph conref="devconrefs.dita#prod/productshortname"></ph> has a simpler
+database access mode which can be set to provide users with <varname>full</varname>, <varname>read-only</varname>,
+or <varname>no access</varname> authorization, this simpler access mode is
+less appropriate for most client-server database configurations. When users
+or applications issue SQL statements directly against the database, the <ph
+conref="devconrefs.dita#prod/productshortname"></ph> SQL authorization mode
+provides a more precise mechanism to limit the actions that users can take
+on the database.</p>
+<p>The GRANT statement is used to grant specific permissions to users. The
+REVOKE statement is used to revoke permissions. The grant and revoke privileges
+are:<ul>
+<li>DELETE</li>
+<li>EXECUTE</li>
+<li>INSERT</li>
+<li>SELECT</li>
+<li>REFERENCES</li>
+<li>TRIGGER</li>
+<li>UPDATE</li>
+</ul></p>
+<p>When a table, view, function, or procedure is created, the person that
+creates the object is referred to as the <term>owner</term> of the object.
+Only the object owner and the database owner have full privileges on the object.
+No other users have privileges on the object until the object owner grants
+privileges to them.</p>
+<section><title>Public and individual user privileges</title><p>The object
+owner can grant and revoke privileges for specific users or for all users.
+The keyword PUBLIC is used to specify all users. When PUBLIC is specified,
+the privileges affect all current and future users. The privileges granted
+and revoked to PUBLIC and to individual users are independent. For example,
+a SELECT privilege on table <codeph>t</codeph> is granted to both PUBLIC and
+to the user <codeph>harry</codeph>. The SELECT privilege is later revoked
+from <codeph>harry</codeph>, but Harry has access to table <codeph>t</codeph> through
+the PUBLIC privilege.</p><note othertype="Exception" type="other">When you
+create a view, trigger, or constraint, <ph conref="devconrefs.dita#prod/productshortname"></ph> first
+checks to determine if you have the required privileges at the user-level.
+If you have the user-level privileges, the object is created and is dependent
+on that user-level privilege. If you do not have the required privileges at
+the user-level, <ph conref="devconrefs.dita#prod/productshortname"></ph> checks
+to determine if you have the required privileges at the PUBLIC level. If you
+have the PUBLIC level privileges, the object is created and is dependent on
+that PUBLIC level privilege. After the object is created, if the privilege
+on which the object depends on is revoked, the object is automatically dropped. <ph
+conref="devconrefs.dita#prod/productshortname"></ph> does not try to determine
+if you have other privileges that can replace the privileges that are being
+revoked. <dl><dlentry>
+<dt>Example 1</dt>
+<dd>User <codeph>zhi</codeph> creates table <codeph>t1</codeph> and grants
+SELECT privileges to user <codeph>harry</codeph> on table <codeph>t1</codeph>.
+User <codeph>zhi</codeph> grants SELECT privileges to PUBLIC on table <codeph>t1</codeph>.
+User <codeph>harry</codeph> creates view <codeph>v1</codeph> with the statement
+SELECT * from <codeph>zhi.t1</codeph>. The view depends on the user-level
+privilege that user <codeph>harry</codeph> has on <codeph>t1</codeph>. Subsequently,
+user <codeph>zhi</codeph> revokes SELECT privileges from user <codeph>harry</codeph> on
+table <codeph>t1</codeph>. As a result, the view <codeph>harry.v1</codeph> is
+dropped. </dd>
+</dlentry><dlentry>
+<dt>Example 2</dt>
+<dd>User <codeph>anita</codeph> creates table <codeph>t1</codeph> and grants
+SELECT privileges to PUBLIC. User <codeph>harry</codeph> creates view <codeph>v1</codeph> with
+the statement SELECT * from <codeph>anita.t1</codeph>. The view depends on
+the PUBLIC level privilege that user <codeph>harry</codeph> has on <codeph>t1</codeph> since
+user <codeph>harry</codeph> does not have user-level privileges on table <codeph>t1</codeph>.
+Subsequently, user <codeph>anita</codeph> revokes SELECT privileges from PUBLIC
+on table <codeph>t1</codeph>. As a result, the view <codeph>harry.v1</codeph> is
+dropped. </dd>
+</dlentry></dl></note></section>
+<section><title>Permissions on views, triggers, and constraints</title><p>Views,
+triggers, and constraints operate with the permissions of the owner of the
+view, trigger, or constraint. The For example, Anita wants to create a view
+using the following statement:<codeblock>CREATE VIEW s.v(vc1,vc2,vc3)
+	AS SELECT t1.c1,t1.c2,f(t1.c3)
+  FROM t1 JOIN t2 ON t1.c1 = t2.c1 
+	WHERE t2.c2 = 5</codeblock>Anita needs the following permissions to create
+the view:<ul>
+<li>Ownership of the schema <codeph>s</codeph>, so that she can create something
+in the schema</li>
+<li>Ownership of the table <codeph>t1</codeph>, so that she can allow others
+to see columns in the table</li>
+<li>SELECT permission on <codeph>t2.c1</codeph> and <codeph>t2.c2</codeph></li>
+<li>EXECUTE permission on <codeph>f</codeph></li>
+</ul>When the view is created, only Anita has SELECT permission on it. Anita
+can grant SELECT permission on any or all of the columns of view <codeph>s.v</codeph> to
+anyone, even to users who do not have SELECT permission on <codeph>t1</codeph> or <codeph>t2</codeph>,
+or EXECUTE permission on <codeph>f</codeph>. Anita grants SELECT permission
+on view <codeph>s.v</codeph> to Harry. When Harry issues a SELECT statement
+on the view <codeph>s.v</codeph>, <ph conref="devconrefs.dita#prod/productshortname"></ph> checks
+to determine if Harry has SELECT permission on view<codeph>s.v</codeph>. <ph
+conref="devconrefs.dita#prod/productshortname"></ph> does not check to determine
+if Harry has SELECT permission on <codeph>t1</codeph>, or <codeph>t2</codeph>,
+or EXECUTE permission on <codeph>f</codeph>. </p><p>Permissions on triggers
+and constraints work the same way as permissions on views. When a view, trigger,
+or constraint is created, <ph conref="devconrefs.dita#prod/productshortname"></ph> checks
+that the owner has the required permissions. Other users do not need to have
+those permissions to perform actions on a view, trigger, or constraint. </p><p>If
+the required permissions are revoked from the owner of a view, trigger, or
+constraint, the object is dropped as part of the REVOKE statement.</p><p>See
+the <cite><ph conref="devconrefs.dita#pub/citref"></ph></cite> for more information
+on the GRANT and REVOKE statements.</p></section>
+</conbody>
+</concept>

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

Modified: db/derby/docs/trunk/src/devguide/derbydev.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/derbydev.ditamap?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/derbydev.ditamap (original)
+++ db/derby/docs/trunk/src/devguide/derbydev.ditamap Tue Aug 15 12:18:14 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
  "map.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.
@@ -865,7 +865,8 @@
 </topicref>
 </relcell>
 <relcell>
-<topicref href="cdevconcepts28351.dita" navtitle="Updatable result sets"></topicref>
+<topicref href="cdevconcepts28351.dita" navtitle="Updatable result sets">
+</topicref>
 <topicref href="cdevconcepts23987.dita" navtitle="Result sets and auto-commit">
 </topicref>
 <topicref href="cdevconcepts22641.dita" navtitle="Scrollable result sets">
@@ -876,7 +877,8 @@
 </relrow>
 <relrow>
 <relcell>
-<topicref href="cdevconcepts28351.dita" navtitle="Updatable result sets"></topicref>
+<topicref href="cdevconcepts28351.dita" navtitle="Updatable result sets">
+</topicref>
 </relcell>
 <relcell>
 <topicref href="cdevconcepts23987.dita" navtitle="Result sets and auto-commit">
@@ -1173,7 +1175,7 @@
 </topicref>
 <topicref href="cdevcsecure37241.dita" navtitle="Users and authorization identifiers">
 </topicref>
-<topicref href="cdevcsecure36595.dita" navtitle="User authorization"></topicref>
+<topicref href="cdevcsecure36595.dita" navtitle="User authorizations"></topicref>
 <topicref href="cdevcsecure24366.dita" navtitle="Encrypting databases on disk">
 </topicref>
 <topicref href="cdevcsecure90988.dita" navtitle="Signed jar files"></topicref>
@@ -1195,7 +1197,7 @@
 <relcell>
 <topicref href="cdevcsecure42374.dita" navtitle="Working with user authentication">
 </topicref>
-<topicref href="cdevcsecure36595.dita" navtitle="User authorization"></topicref>
+<topicref href="cdevcsecure36595.dita" navtitle="User authorizations"></topicref>
 </relcell>
 </relrow>
 <relrow>
@@ -1206,7 +1208,7 @@
 <relcell>
 <topicref href="cdevcsecure37241.dita" navtitle="Users and authorization identifiers">
 </topicref>
-<topicref href="cdevcsecure36595.dita" navtitle="User authorization"></topicref>
+<topicref href="cdevcsecure36595.dita" navtitle="User authorizations"></topicref>
 <topicref href="cdevcsecure24366.dita" navtitle="Encrypting databases on disk">
 </topicref>
 <topicref href="cdevcsecure90988.dita" navtitle="Signed jar files"></topicref>
@@ -1224,21 +1226,19 @@
 </topicref>
 </relcell>
 <relcell>
-<topicref href="cdevcsecure36595.dita" navtitle="User authorization"></topicref>
+<topicref href="cdevcsecure36595.dita" navtitle="User authorizations"></topicref>
 <topicref href="cdevcsecure24366.dita" navtitle="Encrypting databases on disk">
 </topicref>
 <topicref href="cdevcsecure90988.dita" navtitle="Signed jar files"></topicref>
 <topicref href="cdevcsecure10983.dita" navtitle="Notes on the Derby security features">
 </topicref>
-<topicref href="cdevcsecure51876.dita" navtitle="User authentication and authorization examples">
-</topicref>
 <topicref href="cdevcbabejdfj.dita" navtitle="Running Derby under a security manager">
 </topicref>
 </relcell>
 </relrow>
 <relrow>
 <relcell>
-<topicref href="cdevcsecure36595.dita" navtitle="User authorization"></topicref>
+<topicref href="cdevcsecure36595.dita" navtitle="User authorizations"></topicref>
 </relcell>
 <relcell>
 <topicref href="cdevcsecure24366.dita" navtitle="Encrypting databases on disk">
@@ -1246,8 +1246,6 @@
 <topicref href="cdevcsecure90988.dita" navtitle="Signed jar files"></topicref>
 <topicref href="cdevcsecure10983.dita" navtitle="Notes on the Derby security features">
 </topicref>
-<topicref href="cdevcsecure51876.dita" navtitle="User authentication and authorization examples">
-</topicref>
 <topicref href="cdevcbabejdfj.dita" navtitle="Running Derby under a security manager">
 </topicref>
 </relcell>
@@ -1509,13 +1507,15 @@
 </relrow>
 <relrow>
 <relcell>
-<topicref href="cdevcsecure865818.dita" navtitle="Setting the default access mode">
+<topicref href="cdevcsecure865818.dita" navtitle="Setting the default connection access mode">
 </topicref>
 </relcell>
 <relcell>
-<topicref href="cdevcsecure865880.dita" navtitle="Setting the access mode for particular users">
+<topicref href="cdevcsecure865880.dita" navtitle="Setting the user authorizations for individual users">
 </topicref>
-<topicref href="rdevcsecure935.dita" navtitle="Notes on user authorization">
+<topicref href="cdevcsecure865880.dita" navtitle="Setting the user authorizations for individual users">
+</topicref>
+<topicref href="cdevcsecuregrantrevokeaccess.dita" navtitle="SQL standard authorization">
 </topicref>
 <topicref href="rdevcsecure379.dita" navtitle="User authorization exceptions">
 </topicref>
@@ -1523,49 +1523,49 @@
 </relrow>
 <relrow>
 <relcell>
-<topicref href="cdevcsecure865880.dita" navtitle="Setting the access mode for particular users">
+<topicref href="cdevcsecure865880.dita" navtitle="Setting the user authorizations for individual users">
 </topicref>
 </relcell>
 <relcell>
-<topicref href="rdevcsecure935.dita" navtitle="Notes on user authorization">
+<topicref href="cdevcsecure865818.dita" navtitle="Setting the default connection access mode">
 </topicref>
-<topicref href="rdevcsecure379.dita" navtitle="User authorization exceptions">
+<topicref href="cdevcsecure865880.dita" navtitle="Setting the user authorizations for individual users">
 </topicref>
-<topicref href="rdevcsecure131.dita" navtitle="Examples of user authorization">
+<topicref href="rdevcsecure379.dita" navtitle="User authorization exceptions">
 </topicref>
 </relcell>
 </relrow>
 <relrow>
 <relcell>
-<topicref href="rdevcsecure935.dita" navtitle="Notes on user authorization">
+<topicref href="cdevcsecure866060.dita" navtitle="Setting the SQL standard authorization mode">
 </topicref>
 </relcell>
 <relcell>
-<topicref href="rdevcsecure379.dita" navtitle="User authorization exceptions">
+<topicref href="cdevcsecuregrantrevokeaccess.dita" navtitle="SQL standard authorization">
 </topicref>
-<topicref href="cdevcsecure37241.dita" navtitle="Users and authorization identifiers">
+<topicref href="rdevcsecure190.dita" navtitle="Read-only and full access permissions">
+</topicref>
+<topicref href="rdevcsecure379.dita" navtitle="User authorization exceptions">
 </topicref>
 </relcell>
 </relrow>
 <relrow>
 <relcell>
-<topicref href="cdevcsecure866060.dita" navtitle="Setting user authorization">
+<topicref href="rdevcsecure190.dita" navtitle="Read-only and full access permissions">
 </topicref>
 </relcell>
 <relcell>
-<topicref href="rdevcsecure190.dita" navtitle="Read-only and full access permissions">
-</topicref>
-<topicref href="rdevcsecure131.dita" navtitle="Examples of user authorization">
+<topicref href="cdevcsecuregrantrevokeaccess.dita" navtitle="SQL standard authorization">
 </topicref>
 </relcell>
 </relrow>
 <relrow>
 <relcell>
-<topicref href="rdevcsecure190.dita" navtitle="Read-only and full access permissions">
+<topicref href="cdevcsecuregrantrevokeaccess.dita" navtitle="SQL standard authorization">
 </topicref>
 </relcell>
 <relcell>
-<topicref href="rdevcsecure131.dita" navtitle="Examples of user authorization">
+<topicref href="cdevcsecure866060.dita" navtitle="Setting the SQL standard authorization mode">
 </topicref>
 </relcell>
 </relrow>
@@ -2194,10 +2194,12 @@
 <topicref href="cdevconcepts28351.dita" navtitle="Updatable result sets">
 <topicref href="cdevconcepts30811.dita" navtitle="Requirements for updatable result sets">
 </topicref>
-<topicref href="rdevconceptsfor.dita" navtitle="Forward only updatable result sets"> </topicref>
-<topicref href="rdevconceptssur.dita" navtitle="Scrollable updatable result sets"> </topicref>
+<topicref href="rdevconceptsfor.dita" navtitle="Forward only updatable result sets">
+</topicref>
+<topicref href="rdevconceptssur.dita" navtitle="Scrollable updatable result sets">
+</topicref>
 <topicref href="rdevconceptsinsertrow.dita" navtitle="Inserting rows
-with updatable result sets"> </topicref>
+with updatable result sets"></topicref>
 <topicref href="tdevconcepts41704.dita" navtitle="Naming or accessing the name of a cursor">
 </topicref>
 <topicref href="rdevconcepts38274.dita" navtitle="Extended updatable result set example">
@@ -2329,17 +2331,15 @@
 <topicref href="cdevcsecure36595.dita" navtitle="User authorization">
 <topicref href="cdevcsecure866060.dita" navtitle="Setting user authorization">
 <topicref href="cdevcsecure865818.dita" navtitle="Setting the default access mode">
-</topicref>
 <topicref href="cdevcsecure865880.dita" navtitle="Setting the access mode for particular users">
 </topicref>
-<topicref href="rdevcsecure935.dita" navtitle="Notes on user authorization">
+</topicref>
+<topicref href="cdevcsecuregrantrevokeaccess.dita" navtitle="Grant and revoke access control">
 </topicref>
 <topicref href="rdevcsecure379.dita" navtitle="User authorization exceptions">
 </topicref>
 </topicref>
 <topicref href="rdevcsecure190.dita" navtitle="Read-only and full access permissions">
-</topicref>
-<topicref href="rdevcsecure131.dita" navtitle="Examples of user authorization">
 </topicref>
 </topicref>
 <topicref href="cdevcsecure24366.dita" navtitle="Encrypting databases on disk">

Modified: db/derby/docs/trunk/src/devguide/rdevcsecure190.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/rdevcsecure190.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/rdevcsecure190.dita (original)
+++ db/derby/docs/trunk/src/devguide/rdevcsecure190.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-
+ 
 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
  "../dtd/reference.dtd">
 <!-- 
@@ -20,23 +20,26 @@
 -->
 <reference id="rdevcsecure190" xml:lang="en-us">
 <title>Read-only and full access permissions</title>
-<shortdesc>This table shows which actions read-only and full-access users
-are permitted to perform on regular or source databases and on target databases.</shortdesc>
+<shortdesc>The actions that users can perform on a Derby database is determined
+by the type of access that users have to the database objects.</shortdesc>
 <prolog><metadata>
-<keywords><indexterm>Permissions</indexterm><indexterm>Read-only access<indexterm>definition</indexterm></indexterm>
-<indexterm>Full access<indexterm>definition</indexterm></indexterm></keywords>
+<keywords><indexterm>permissions<indexterm>read-only access</indexterm></indexterm>
+<indexterm>permissions<indexterm>full access</indexterm></indexterm></keywords>
 </metadata></prolog>
 <refbody>
-<table frame="all" id="cdevcsecure20486"><title>Permissions for Read-Only
-and Full-Access Users</title>
+<section>The following table lists the actions that users can perform based
+on the type of access that a user is granted on a database. These actions
+apply to regular databases, source databases, and target databases.</section>
+<table frame="all" id="cdevcsecure20486"><title>Actions that are authorized
+by type of access</title>
 <tgroup cols="3" colsep="1" rowsep="1"><colspec colname="1" colnum="1" colwidth="37*"/>
 <colspec colname="2" colnum="2" colwidth="21*"/><colspec colname="3" colnum="3"
 colwidth="36*"/>
 <thead>
 <row>
 <entry align="left" colname="1" valign="bottom">Action</entry>
-<entry align="left" colname="2" valign="bottom">Read-Only Users</entry>
-<entry align="left" colname="3" valign="bottom">Full-Access Users</entry>
+<entry align="left" colname="2" valign="bottom">Read-only access</entry>
+<entry align="left" colname="3" valign="bottom">Full access </entry>
 </row>
 </thead>
 <tbody>

Modified: db/derby/docs/trunk/src/devguide/rdevcsecure379.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/rdevcsecure379.dita?rev=431680&r1=431679&r2=431680&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/rdevcsecure379.dita (original)
+++ db/derby/docs/trunk/src/devguide/rdevcsecure379.dita Tue Aug 15 12:18:14 2006
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
  "../dtd/reference.dtd">
 <!-- 
@@ -20,11 +19,21 @@
 -->
 <reference id="rdevcsecure379" xml:lang="en-us">
 <title>User authorization exceptions</title>
-<shortdesc>If a user is not authorized to connect to the database specified
-in the connection request, <i>SQLException</i> 04501 is raised.</shortdesc>
-<prolog></prolog>
+<shortdesc>SQL exceptions are returned when errors occur with user authorizations.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm>SQL exceptions<indexterm>user authorizations</indexterm></indexterm>
+<indexterm>user authorizations<indexterm>SQL exceptions</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
 <refbody>
-<section><p>If a user with <i>readOnlyAccess</i> attempts to write to a database, <i>SQLException</i> 08004 <codeph><i>-
-connection refused</i></codeph> is raised.</p></section>
+<section><p><ph conref="devconrefs.dita#prod/productshortname"></ph> validates
+the database properties when you set the properties. An exception is returned
+if you specify an invalid value when you set these properties. </p><p>After
+you set the <codeph>derby.database.sqlAuthorization</codeph> property to <varname>TRUE</varname>,
+you cannot set the property back to <varname>FALSE</varname>.</p><p>If a user
+attempts to connect to a database but is not authorized to connect to that
+database, the SQLException 04501 is returned. </p><p>If a user with read-only
+access attempts to write to a database, the SQLException 08004 <codeph>- connection
+refused</codeph> is returned.</p></section>
 </refbody>
 </reference>



Mime
View raw message