Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 42017 invoked from network); 14 Nov 2007 19:21:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2007 19:21:08 -0000 Received: (qmail 61181 invoked by uid 500); 14 Nov 2007 19:20:54 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 61151 invoked by uid 500); 14 Nov 2007 19:20:54 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 61040 invoked by uid 99); 14 Nov 2007 19:20:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 11:20:54 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 19:21:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6EE5F71422B for ; Wed, 14 Nov 2007 11:20:43 -0800 (PST) Message-ID: <22964072.1195068043450.JavaMail.jira@brutus> Date: Wed, 14 Nov 2007 11:20:43 -0800 (PST) From: "Kim Haase (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3200) Developer's Guide: Add examples showing use of SQL authorization with user authentication In-Reply-To: <11025538.1194907370799.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542553 ] Kim Haase commented on DERBY-3200: ---------------------------------- Thanks very much for the help, Dag. That works! I didn't think you could log in as a user that hadn't been created yet -- but apparently you can. I'll start working on topics for this material now. > Developer's Guide: Add examples showing use of SQL authorization with user authentication > ----------------------------------------------------------------------------------------- > > Key: DERBY-3200 > URL: https://issues.apache.org/jira/browse/DERBY-3200 > Project: Derby > Issue Type: Improvement > Components: Documentation > Reporter: Kim Haase > Assignee: Kim Haase > Priority: Minor > Attachments: AuthExampleEmbeddedSQLAuth.java > > > This is the followup to DERBY-1823 that Francois Orsini suggested. > I've been experimenting and reading the Developer's Guide section on SQL authorization (User authorizations, cdevcsecure36595). > It appears that the only use of SQL authorization mode is to restrict user access, not to expand it. > For example, if you set the default connection mode to noAccess, a user with fullAccess can't grant any privileges to a user with noAccess. And presumably if the default connection mode is readOnlyAccess, a user with fullAccess can't grant any privileges beyond SELECT, which the user has anyway. > Only if the default connection mode is fullAccess is SQL authorization mode meaningful. That means that a fullAccess user can use GRANT to restrict another user's privileges on a particular database that the user owns. > I'm running into a problem at the end, though. At the beginning of the program, as nobody in particular, I was able to create several users, some of them with full access. But at the end of the program, it seems that even a user with full access isn't allowed to turn off those database properties: > Message: User 'MARY' does not have execute permission on PROCEDURE 'SYSCS_UTIL'.'SYSCS_SET_DATABASE_PROPERTY'. > This seems a bit extreme. I know that with SQL authorization on, "the ability to read from or write to database objects is further restricted to the owner of the database objects." But the ability to execute built-in system procedures? Can I log in as SYSCS_UTIL? How? > I realize that having access to SYSCS_SET_DATABASE_PROPERTY would allow me to in effect delete myself -- but that's essentially what I do at the end of the program that sets derby.connection.requireAuthentication but not derby.database.sqlAuthorization. > The documentation does say that once you have turned on SQL authorization, you can't turn it off. But it doesn't say that you can't turn anything else off, either! > I'll attach the program I've been using. Most of the stacktraces are expected, but I'm stumped by that last one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.