You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Yip Ng (JIRA)" <de...@db.apache.org> on 2006/08/21 19:28:13 UTC
[jira] Created: (DERBY-1738) An user is able to grant select
privilege on a view but the underlying object is not own by the user.
An user is able to grant select privilege on a view but the underlying object is not own by the user.
------------------------------------------------------------------------------------------------------
Key: DERBY-1738
URL: http://issues.apache.org/jira/browse/DERBY-1738
Project: Derby
Issue Type: Bug
Components: SQL
Affects Versions: 10.2.1.0
Environment: Sun JDK 1.4.2
Reporter: Yip Ng
An user is able to grant select privilege on a view but the underlying object is not own by the user. The grant statement should fail since the user does not have privilege to grant. i.e.:
ij version 10.3
ij> connect 'jdbc:derby:wombat;create=true' user 'user1' as user1;
WARNING 01J01: Database 'wombat' not created, connection made to existing database instead.
WARNING 01J14: SQL authorization is being used without first enabling authentication.
ij> create table t1 (i int);
ERROR X0Y32: Table/View 'T1' already exists in Schema 'USER1'.
ij> insert into t1 values 1,2,3;
3 rows inserted/updated/deleted
ij> grant select on t1 to user2;
0 rows inserted/updated/deleted
ij> connect 'jdbc:derby:wombat' user 'user2' as user2;
WARNING 01J14: SQL authorization is being used without first enabling authentication.
ij(USER2)> -- ok
create view v1 as select * from user1.t1;
ERROR X0Y32: Table/View 'V1' already exists in Schema 'USER2'.
ij(USER2)> -- attempt to grant this view to others, should fail since user2
-- does not have grant privilege on object user1.t1
grant select on user1.t1 to user3;
ERROR 2850C: User 'USER2' is not the owner of Table/View 'USER1'.'T1'.
ij(USER2)> -- expect error
grant select on v1 to user3;
0 rows inserted/updated/deleted
ij(USER2)>
------------------ Java Information ------------------
Java Version: 1.4.2_12
Java Vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\j2re1.4.2_12
Java classpath: classes;.
OS name: Windows XP
OS architecture: x86
OS version: 5.1
Java user name: Yip
Java user home: C:\Documents and Settings\Yip
Java user dir: C:\work3\derby\trunk
java.specification.name: Java Platform API Specification
java.specification.version: 1.4
--------- Derby Information --------
JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
[C:\work3\derby\trunk\classes] 10.3.0.0 alpha - (1)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale : [English/United States [en_US]]
Found support for locale: [de_DE]
version: 10.3.0.0 alpha - (1)
Found support for locale: [es]
version: 10.3.0.0 alpha - (1)
Found support for locale: [fr]
version: 10.3.0.0 alpha - (1)
Found support for locale: [it]
version: 10.3.0.0 alpha - (1)
Found support for locale: [ja_JP]
version: 10.3.0.0 alpha - (1)
Found support for locale: [ko_KR]
version: 10.3.0.0 alpha - (1)
Found support for locale: [pt_BR]
version: 10.3.0.0 alpha - (1)
Found support for locale: [zh_CN]
version: 10.3.0.0 alpha - (1)
Found support for locale: [zh_TW]
version: 10.3.0.0 alpha - (1)
------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-1738) An user is able to grant select
privilege on a view but the underlying object is not own by the user.
Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1738?page=comments#action_12429488 ]
Satheesh Bandaram commented on DERBY-1738:
------------------------------------------
This is a duplicate of the issue Rajesh has already filed. I think that is DERBY-1686.
> An user is able to grant select privilege on a view but the underlying object is not own by the user.
> -----------------------------------------------------------------------------------------------------
>
> Key: DERBY-1738
> URL: http://issues.apache.org/jira/browse/DERBY-1738
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.0
> Environment: Sun JDK 1.4.2
> Reporter: Yip Ng
>
> An user is able to grant select privilege on a view but the underlying object is not own by the user. The grant statement should fail since the user does not have privilege to grant. i.e.:
> ij version 10.3
> ij> connect 'jdbc:derby:wombat;create=true' user 'user1' as user1;
> WARNING 01J01: Database 'wombat' not created, connection made to existing database instead.
> WARNING 01J14: SQL authorization is being used without first enabling authentication.
> ij> create table t1 (i int);
> ERROR X0Y32: Table/View 'T1' already exists in Schema 'USER1'.
> ij> insert into t1 values 1,2,3;
> 3 rows inserted/updated/deleted
> ij> grant select on t1 to user2;
> 0 rows inserted/updated/deleted
> ij> connect 'jdbc:derby:wombat' user 'user2' as user2;
> WARNING 01J14: SQL authorization is being used without first enabling authentication.
> ij(USER2)> -- ok
> create view v1 as select * from user1.t1;
> ERROR X0Y32: Table/View 'V1' already exists in Schema 'USER2'.
> ij(USER2)> -- attempt to grant this view to others, should fail since user2
> -- does not have grant privilege on object user1.t1
> grant select on user1.t1 to user3;
> ERROR 2850C: User 'USER2' is not the owner of Table/View 'USER1'.'T1'.
> ij(USER2)> -- expect error
> grant select on v1 to user3;
> 0 rows inserted/updated/deleted
> ij(USER2)>
> ------------------ Java Information ------------------
> Java Version: 1.4.2_12
> Java Vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\j2re1.4.2_12
> Java classpath: classes;.
> OS name: Windows XP
> OS architecture: x86
> OS version: 5.1
> Java user name: Yip
> Java user home: C:\Documents and Settings\Yip
> Java user dir: C:\work3\derby\trunk
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.4
> --------- Derby Information --------
> JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
> [C:\work3\derby\trunk\classes] 10.3.0.0 alpha - (1)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale : [English/United States [en_US]]
> Found support for locale: [de_DE]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [es]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [fr]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [it]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [ja_JP]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [ko_KR]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [pt_BR]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [zh_CN]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [zh_TW]
> version: 10.3.0.0 alpha - (1)
> ------------------------------------------------------
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-1738) An user is able to grant select
privilege on a view but the underlying object is not own by the user.
Posted by "Yip Ng (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-1738?page=all ]
Yip Ng closed DERBY-1738.
-------------------------
Resolution: Duplicate
Duplicate to DERBY-1686, link DERBY-1686 to DERBY-1330.
> An user is able to grant select privilege on a view but the underlying object is not own by the user.
> -----------------------------------------------------------------------------------------------------
>
> Key: DERBY-1738
> URL: http://issues.apache.org/jira/browse/DERBY-1738
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.0
> Environment: Sun JDK 1.4.2
> Reporter: Yip Ng
>
> An user is able to grant select privilege on a view but the underlying object is not own by the user. The grant statement should fail since the user does not have privilege to grant. i.e.:
> ij version 10.3
> ij> connect 'jdbc:derby:wombat;create=true' user 'user1' as user1;
> WARNING 01J01: Database 'wombat' not created, connection made to existing database instead.
> WARNING 01J14: SQL authorization is being used without first enabling authentication.
> ij> create table t1 (i int);
> ERROR X0Y32: Table/View 'T1' already exists in Schema 'USER1'.
> ij> insert into t1 values 1,2,3;
> 3 rows inserted/updated/deleted
> ij> grant select on t1 to user2;
> 0 rows inserted/updated/deleted
> ij> connect 'jdbc:derby:wombat' user 'user2' as user2;
> WARNING 01J14: SQL authorization is being used without first enabling authentication.
> ij(USER2)> -- ok
> create view v1 as select * from user1.t1;
> ERROR X0Y32: Table/View 'V1' already exists in Schema 'USER2'.
> ij(USER2)> -- attempt to grant this view to others, should fail since user2
> -- does not have grant privilege on object user1.t1
> grant select on user1.t1 to user3;
> ERROR 2850C: User 'USER2' is not the owner of Table/View 'USER1'.'T1'.
> ij(USER2)> -- expect error
> grant select on v1 to user3;
> 0 rows inserted/updated/deleted
> ij(USER2)>
> ------------------ Java Information ------------------
> Java Version: 1.4.2_12
> Java Vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\j2re1.4.2_12
> Java classpath: classes;.
> OS name: Windows XP
> OS architecture: x86
> OS version: 5.1
> Java user name: Yip
> Java user home: C:\Documents and Settings\Yip
> Java user dir: C:\work3\derby\trunk
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.4
> --------- Derby Information --------
> JRE - JDBC: J2SE 1.4.2 - JDBC 3.0
> [C:\work3\derby\trunk\classes] 10.3.0.0 alpha - (1)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale : [English/United States [en_US]]
> Found support for locale: [de_DE]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [es]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [fr]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [it]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [ja_JP]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [ko_KR]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [pt_BR]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [zh_CN]
> version: 10.3.0.0 alpha - (1)
> Found support for locale: [zh_TW]
> version: 10.3.0.0 alpha - (1)
> ------------------------------------------------------
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira