Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 3381 invoked from network); 30 Aug 2007 16:01:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 16:01:04 -0000 Received: (qmail 10316 invoked by uid 500); 30 Aug 2007 16:00:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 10273 invoked by uid 500); 30 Aug 2007 16:00:59 -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 10264 invoked by uid 99); 30 Aug 2007 16:00:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 09:00:59 -0700 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; Thu, 30 Aug 2007 16:01:03 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2BF25714168 for ; Thu, 30 Aug 2007 09:00:40 -0700 (PDT) Message-ID: <32285629.1188489640176.JavaMail.jira@brutus> Date: Thu, 30 Aug 2007 09:00:40 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1632) During revoke privilege, Derby does not look for replacement privilege for the dependent objects and simply drops the dependent objects. This is not SQL compliant and should be fixed. In-Reply-To: <31774343.1154494933869.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-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-1632: --------------------------------- Issue Type: Bug (was: Improvement) Looking at the privileges work when investigating roles, I looked at this issue. I agree with Dan this is a bug, not an improvement. Changing issue type to bug. If you don't agree, feel free to change it back, Mamta :) > During revoke privilege, Derby does not look for replacement privilege for the dependent objects and simply drops the dependent objects. This is not SQL compliant and should be fixed. > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1632 > URL: https://issues.apache.org/jira/browse/DERBY-1632 > Project: Derby > Issue Type: Bug > Components: Documentation, SQL > Affects Versions: 10.2.1.6 > Reporter: Mamta A. Satoor > > Currently, when an object (trigger/constraint/view) is created, it depends on the available required privilege at the user level. If none found, it depends on the available required privilege at PUBLIC level. If none exist both at user level or PUBLIC level, then create object fails. > To reiterate, if the privilege is found say at the user level, the object depends on that privilege. Consider the case, where the privilege also exist at the PUBLIC level. Later, when a revoke privilege is issued at the user level, the dependent object gets a revoke invalidation action and the dependent object drops itself. Instead, the dependent object should make itself depend on the PUBLIC level privilege. This does not happen in Derby at this point and this behavior is not SQL compliant and should be fixed. > eg for the problem at hand > user1 > create table t1 > grant select on t1 to user2, public > user2 > create view v1 as select * from user1.t1 > -- this view will depend on the user level select privilege on table t1 > user1 > revoke select on t1 from user2 > -- this revoke will end up dropping the view. The view could have made itself depend on the PUBLIC level select privilege > -- on t1 but that doesn't happen currently > another eg for the same problem > user1 > create table t1 > grant select on t1 to public > user2 > create view v1 as select * from user1.t1 > -- this view will depend on the PUBLIC level select privilege on table t1 > user1 > grant select on to to user2 > revoke select on t1 from public > -- this revoke ends up dropping the view user2.v1 eventhough there is a user level SELECT privilege availble > -- on user1.t1 > So, in brief, the problem is that when a dependent object gets a revoke invalidation action, it does not check if there is another privilege available to replace the privilege being revoked. Instead, they just go ahead and drop themselves. > Until we fix this behavior, we should document it so the user will know what to expect for same privilege being available at different levels. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.