db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4191) Lack of SELECT privilege does not prevent SELECT COUNT(*)
Date Fri, 18 Dec 2009 16:51:18 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792528#action_12792528

Rick Hillegas commented on DERBY-4191:

Thanks for the new patch, Mamta. I am seeing some odd behavior around views and deletes. Here's
a script which shows this odd behavior:

connect 'jdbc:derby:memory:dummy;create=true;user=ruth;password=ruthpassword' as ruth_conn;

create table t_ruth( a int, b int );
create view v_ruth( c, d ) as select a, b from t_ruth;

grant update on t_ruth to public;
grant insert on t_ruth to public;
grant delete on t_ruth to public;

connect 'jdbc:derby:memory:dummy;user=alice;password=alicepassword' as alice_conn;

-- misleading error message on these queries
-- complains that User 'ALICE' does not have UPDATE permission on column 'C' of table 'RUTH'.'V_RUTH'.
update ruth.t_ruth set a = ( select max(c) from ruth.v_ruth );
update ruth.t_ruth set a = ( select count(*) from ruth.v_ruth );
update ruth.t_ruth set a = ( select 1 from ruth.v_ruth );

-- fails but should succeed
-- complains that User 'ALICE' does not have SELECT permission on table 'RUTH'.'T_RUTH'.
delete from ruth.t_ruth;

> 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:,
>            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.

View raw message