[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-06-28 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Fix Version/s: 10.3.3.1

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.3.3.1, 10.4.2.1, 10.5.3.1, 10.6.1.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> releaseNote.html, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-06-27 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Fix Version/s: 10.4.2.1

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.4.2.1, 10.5.3.1, 10.6.1.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> releaseNote.html, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-06-26 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Fix Version/s: 10.5.3.1

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.5.3.1, 10.6.1.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> releaseNote.html, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-04-20 Thread Rick Hillegas (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-4191:
-

Attachment: releaseNote.html

Attaching a new version of the release note. This version:

1) Simplifies the summary so that the 10.6 release notes are more readable.

2) Moves explanatory material out of html comments into the relevant release 
note subsections.

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.6.0.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> releaseNote.html, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-01-22 Thread Kim Haase (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kim Haase updated DERBY-4191:
-

Component/s: (was: Documentation)

Since DERBY-4518 doesn't actually require any changes to the SELECT statement 
topic (I think), I've created a separate documentation issue for this 
(DERBY-4522). 

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.6.0.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-01-19 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Component/s: Documentation

I am wondering if we should put anything in our docs about minimum select 
requirement when the query is not referencing any specific column from the 
tables in the FROM list. Already attached a release note for it.

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: Documentation, SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.6.0.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-01-18 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: releaseNote.html

Attaching release notes since this jira is going to change the Derby behavior 
by catching privilege violation which were incorrectly allowed earlier.

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.6.0.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, releaseNote.html, 
> repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-01-13 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Issue & fix info: [Release Note Needed]  (was: [Release Note Needed, Patch 
Available])
   Fix Version/s: 10.6.0.0

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Fix For: 10.6.0.0
>
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-01-13 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Issue & fix info: [Patch Available, Release Note Needed]  (was: [Patch 
Available])

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2010-01-06 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: 
DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt

DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt

Attaching another patch, 
DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt. I have made 
couple changes in this patch compared to the previous Both the patches require 
that user had minimum select privileges on all the tables in the select list. 
But the earlier patch made that check in SelectNode whereas this patch makes 
that check in CursorNode. The reason for this is for a simple DMLlike 
following, delete from ruth.t_ruth, a SelectNode is generated. But that 
SelectNode is to generate the resultset needed for delete. From my research, I 
believe CursorNode is the correct node where the minimum select privilege 
requirement should go. I have added test cases mentioned by Rick for the 
earlier patch and those test cases along with all the existing tests run with 
no problem with this patch. Another change in this patch compared to earlier 
one is the select privilege requirement for subquery now happens around the 
entire bind time code in SubqueryNode rather than just aroiund 
resultSet.bindExpressions. Would appreciate if someone can review this patch 
for me to see if they see any problems with it.

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_diff_patch6.txt, 
> DERBY4191_miniumSelectPriv_CursorNode_And_Subquery_stat_patch6.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-12-16 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: 
DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt

DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt

I have another patch, 
DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt. The 
difference in this patch compared to earlier patches is it now collects the 
select privilege requirement for a subquery involved in a DML. eg of subquery 
are as follows
update dbo.t set a = ( select max(a1) + 2 from dbo.t1 )
update dbo.t set a = ( select max(b1) + 2 from dbo.t2 )
For the queries above, we were not collecting any select privileges for the 
subquery. Instead we were requiring update privileges on columns inside the 
subquery. I have made changes in SubqueryNode to require the select privileges 
for the query it is working with. I have added tests for this subquery change 
in this patch. 

In addition to the above changes, I have added tests for testing privileges 
available through roles. These tests were missing from earlier patch for a 
query like 
select c1 from user1.t1, user1.t2

Please review the patch and let me know of any issues you may see with it.


> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_diff_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_And_Subquery_stat_patch5.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-12-11 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt
DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt

I have added another patch 
DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt which is same as the 
previous one except that SubqueryNode during it's bind phase now requires 
minimum select privilege on all it's table. It fixes the test case you provided 
Rick. I have fired the derbyall and will run junit suite after that. In the 
mean time, I will work on adding a test case for this subquery scenario and 
will add test case for roles (as Rick pointed out in his last review).

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch4.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch4.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-12-10 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt
DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt

I am attaching a new patch 
(DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt) which now adds a 
minimum select privilege requirement for all the tables in a SELECT query and 
if such a requirement is already getting satisfied with already existing select 
privilege requirement on the table(s), then we will not add the redundant 
minimum select privilege requirement. eg
select c1 from t1
For the query above, we do not require a minimum select privilege on t1 because 
we have already select privilege requirement on t1.c1 
Now consider the following query
select 1 from t1
For the query above, we DO want to add a minumum select privilege on t1 because 
there is no other select privilege requirement on table t1 or any of it's 
columns.

The code had to be intelligent enough to not require minimum select privilege 
for following query
update t1 set c1=1
for this query, we have a SelectNode which provides the resultset for update. 
But for this SelectNode, we do not want any minimum select privileges on t1. 
Code for recognizing such a query is added into SelectNode.

I have run all the junit and derbyall tests and only ran into known jira issue 
DERBY-4463. Prior run of junit with the patch gave me some upgrade test 
failures which I occassionally run into on my machine and I do not think those 
upgrade test failures are related to my patch. I will greatly appreciate if 
someone can run the junit tests for me with the patch to make sure they run 
fine.

Please let me know if anyone has any feedback on the patch. I will plan on 
committing it early next week. Thanks

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-12-10 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Issue & fix info: [Patch Available]

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_diff_patch3.txt, 
> DERBY4191_miniumSelectPrivOnAllTables_stat_patch3.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-12-04 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt
DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt

I am attaching a patch 
(DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt)  is same as 
the previous patch EXCEPT that the minimum select privilege requirement is 
enforced in StatementColumnPermission rather than StatementTablePermission thus 
eliminating the need to duplicate the code. 

I ran derbyall and junit tests and even with this patch, I continue to get the 
failure CheckToursDBTest:embeddedjunit.framework.AssertionFailedError: 
org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif
In addition, I got one more failure, 
testReplication_Encrypted_1_miniLoad_negative(org.apache.derbyTesting.functio
nTests.tests.replicationTests.ReplicationRun_Local_Encrypted_1)junit.framework.ComparisonFailure:
 Unexpected SQL state. expected:<...0> but was:<...1>

I reran the replication suite and didn't get the above failure when running 
this way.
$ java  -Dderby.tests.trace=true  -Xmx256M -XX:MaxPermSize=128M 
junit.textui.TestRunner 
org.apache.derbyTesting.functionTests.tests.replicationTests.Replication.Suite

If anyone has cycles at all, if they can run the junit suite with the patch I 
am attaching, I will appreciate it. I want to be sure that nothing in my 
changes has broken the 2 failures I am seeing(may be they are specific to my 
computer).  

Rick, thanks for reviwing my earlier patch. I agree with your comments about 
not trying to selective handle specific select queries. As a next step, I will 
work on your suggestion of requiring minimum select privilege on all the tables 
in the select query rather than trying to handpick the ones based on select 
constant or select count(*) or select count(constant) because this approach 
does not cover a query like select t1.c1 from anotheruser.t1, anotheruser.t2

I will post that patch once it is ready. 

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
>Assignee: Mamta A. Satoor
> Attachments: 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_diff_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentColumnPerm_stat_patch2.txt, 
> DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt, 
> DERBY4191_countStar_privilege_diff_patch1.txt, repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-12-03 Thread Mamta A. Satoor (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mamta A. Satoor updated DERBY-4191:
---

Attachment: DERBY4191_countStar_privilege_diff_patch1.txt
DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt

I am attaching a 
patch(DERBY4191_ColumnLevelCheckInStatmentTablePerm_diff_patch1.txt)  which 
resolves this jira's issue(the patch is not ready for commit yet). 

I have piggybacked on first and third bullet items of Rick's suggestion. At 
this point, I am not planning on optimizing the code by checking if there is 
already a SELECT privilege requirement on table or a column in the table, and 
if yes, then drop the MINIMAL_SELECT_PRIVILEGE requirement on that same table. 

The logic is as follows. At the bind time, The compile time changes went into 
SelectNode and AggregateNode to see if we need to add MINIMAL_SELECT_PRIVILEGE 
requirement. 
a)I check in the SelectNode if all the columns in the select list are 
constants. If yes, then I add MINIMAL_SELECT_PRIVILEGE requirement for all the 
tables involved in the select. A new method was added for doing the column 
constant check. That method went in ResultColumnList.java 
b)In the AggregateNode, I check if the aggregate is of the kind count(*) or 
count(constant), then we should require MINIMAL_SELECT_PRIVILEGE for all the 
tables involved in the select. 
c)Then at execute time, in StatementTablePermission, if I don't find a table 
level select privilege, then I check if there is atleast one column level 
select privilege if we are working with MINIMAL_SELECT_PRIVILEGE requirement. 
For this, I had to add a new method, called 
checkForAtleastOneSelectColumnPrivilege. The majority of this code is copied 
from StatementColumnPermission and this the reason I don't want this patch to 
be committed yet. I want to see if I can change the MINIMAL_SELECT_PRIVILEGE 
requirement to be at the column level rather than table level. That way, I 
might be able to use the existing code in StatementColumnPermission rather than 
copying majority of it in StatementTablePermission as a new method. 
d)I have added new tests to RolesConferredPrivilegesTest and 
GrantRevokeDDLTest. 
e)As a next step, I want to focus on utilizing most of existing code in 
StatementColumnPermission. Once I have that ready, I will post another patch. I 
will appreciate though if someone can review the patch and the logic to see if 
I may have missed anything.

The files impacted by the change are as follows
svn stat -q
M   java\engine\org\apache\derby\impl\sql\compile\SelectNode.java
M   java\engine\org\apache\derby\impl\sql\compile\AggregateNode.java
M   java\engine\org\apache\derby\impl\sql\compile\ResultColumnList.java
M   java\engine\org\apache\derby\impl\sql\catalog\DataDictionaryImpl.java
M   java\engine\org\apache\derby\iapi\sql\conn\Authorizer.java
M   
java\engine\org\apache\derby\iapi\sql\dictionary\StatementTablePermission.java
M   
java\testing\org\apache\derbyTesting\functionTests\tests\lang\RolesConferredPrivilegesTest.java
M   
java\testing\org\apache\derbyTesting\functionTests\tests\lang\GrantRevokeDDLTest.java

I ran all the tests and ran into following failure. I do not think it is 
related to my changes but not sure why this error is showing up. I can 
consistently reproduce this eror. There was reference to this kind of failure 
once on derby-dev list with thread titled "[jira] Issue Comment Edited: 
(DERBY-3451) Remove dependency between StandardException class and 
org.apache.derby.impl.jdbc classes". I do not think there was any resolution to 
that failure.
There were 2 failures:
1) CheckToursDBTest:embeddedjunit.framework.AssertionFailedError: 
org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif
at 
org.apache.derbyTesting.junit.SupportFilesSetup.copyFiles(SupportFilesSetup.java:174)
at 
org.apache.derbyTesting.junit.SupportFilesSetup.access$000(SupportFilesSetup.java:64)
at 
org.apache.derbyTesting.junit.SupportFilesSetup$1.run(SupportFilesSetup.java:139)
at 
java.security.AccessController.doPrivileged(AccessController.java:251)
at 
org.apache.derbyTesting.junit.SupportFilesSetup.privCopyFiles(SupportFilesSetup.java:135)
at 
org.apache.derbyTesting.junit.SupportFilesSetup.setUp(SupportFilesSetup.java:120)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.extensions.TestSetup.run(TestSetup.java:23)
2) CheckToursDBTest:clientjunit.framework.AssertionFailedError: 
org/apache/derbyTesting/functionTests/tests/demo/cupisle.gif
at 
org.apache.derbyTesting.junit.SupportFilesSetup.copyFiles(SupportFilesSetup.java:174)
at 
org.apache.derbyTesting.junit.SupportFilesSetup.access$000(SupportFilesSetup.java:64)
at 
org.apache.derbyTesting.junit.SupportFilesSetup$1.run(SupportFilesSetup.java:139)
at

[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-07-02 Thread Rick Hillegas (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-4191:
-

   Urgency: Normal
Bug behavior facts: [Security, Wrong query result]

Triaged July 2, 2009: Checked Security and WrongQueryResult boxes. Assiged 
normal urgency.

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
> Attachments: repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)

2009-04-27 Thread Knut Anders Hatlen (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-4191:
--

Attachment: repro.sql

Attached is a repro script showing that count(x) is disallowed and count(*) is 
allowed for a non-privileged user.

$ java -Dderby.database.sqlAuthorization=true -jar lib/derbyrun.jar ij repro.sql
ij version 10.5
ij> connect 'jdbc:derby:db;user=root;create=true';
WARNING 01J14: SQL authorization is being used without first enabling 
authentication.
ij> create table t (x int);
0 rows inserted/updated/deleted
ij> insert into t values 1,2,3;
3 rows inserted/updated/deleted
ij> connect 'jdbc:derby:db;user=kah';
WARNING 01J14: SQL authorization is being used without first enabling 
authentication.
ij(CONNECTION1)> select count(x) from root.t;
ERROR 42502: User 'KAH' does not have SELECT permission on column 'X' of table 
'ROOT'.'T'.
ij(CONNECTION1)> select count(*) from root.t;
1  
---
3  

1 row selected
ij(CONNECTION1)>

> Lack of SELECT privilege does not prevent SELECT COUNT(*)
> -
>
> Key: DERBY-4191
> URL: https://issues.apache.org/jira/browse/DERBY-4191
> Project: Derby
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 10.4.2.0, 10.5.1.1
>Reporter: Knut Anders Hatlen
> Attachments: repro.sql
>
>
> A user that does not have SELECT privilege on a table can still perform a 
> SELECT COUNT(*) on that table. Counting a specific column (e.g., SELECT 
> COUNT(X)) is prevented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.