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 "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2008/06/25 23:14:45 UTC
[jira] Created: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
--------------------------------------------------------------------------------------------------------------------
Key: DERBY-3736
URL: https://issues.apache.org/jira/browse/DERBY-3736
Project: Derby
Issue Type: Bug
Components: Security, SQL
Affects Versions: 10.4.1.3, 10.3.3.0, 10.3.2.1, 10.3.1.4
Reporter: Dag H. Wanvik
When a table level SELECT privilege is revoked, a dependent prepared statement is
invalidated and can no longer be executed, but in the case of a column level privilege
SELECT privilege, the dependent prepared statement can still be executed.
This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-3736:
---------------------------------
Attachment: derby-3736.stat
derby-3736.diff
Enclosing a patch which fixes the issue by adding a
line for the column case in TablePrivilegeInfo:
> dd.getDependencyManager().invalidateFor
(td, DependencyManager.INTERNAL_RECOMPILE_REQUEST, lcc);
There is already such a line for the case when a table level privilege is revoked
and there it carries the following comment:
// When revoking a privilege from a Table we need to
// invalidate all GPSs refering to it. But GPSs aren't
// Dependents of TablePermsDescr, but of the
// TableDescriptor itself, so we must send
// INTERNAL_RECOMPILE_REQUEST to the TableDescriptor's
// Dependents.
The patch adds the test case to GrantRevokeDDLTest uploaded earlier.
It fails without the above change to TablePrivilegeInfo, but works with it.
Running regressions now, ready for review.
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-3736:
---------------------------------
Attachment: derby-3736b.stat
derby-3736b.diff
Updating a new version, derby-3736b which replaces the first version.
This adds the comment Rick asked for plus fixes some whitespace issues.
I will commit this soon if no objects arise.
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3736) Revoking a column level privilege
from a user, a prepared statement relying on that privilege can still be
executed
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609930#action_12609930 ]
Rick Hillegas commented on DERBY-3736:
--------------------------------------
Thanks for the patch, Dag. It looks good. You might want to decorate your one line fix with the comment block which explains why INTERNAL_RECOMPILE_REQUEST is being requested:
// When revoking a privilege from a Table we need to
// invalidate all GPSs refering to it. But GPSs aren't
// Dependents of TablePermsDescr, but of the
// TableDescriptor itself, so we must send
// INTERNAL_RECOMPILE_REQUEST to the TableDescriptor's
// Dependents.
Thanks,
-Rick
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (DERBY-3736) Revoking a column level privilege
from a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik reassigned DERBY-3736:
------------------------------------
Assignee: Dag H. Wanvik
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: column-level.sql, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3736) Revoking a column level privilege
from a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611576#action_12611576 ]
Dag H. Wanvik commented on DERBY-3736:
--------------------------------------
DERBY-2594 explains why this was not an issue in 10.2.
I will backport this fix to the 10.3 and 10.4 branches.
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Fix For: 10.5.0.0
>
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-3736:
---------------------------------
Bug behavior facts: [Regression, Security] (was: [Regression])
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Fix For: 10.4.2.0, 10.5.1.1
>
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-3736:
---------------------------------
Derby Info: [Regression] (was: [Regression, Patch Available])
Fix Version/s: 10.5.0.0
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Fix For: 10.5.0.0
>
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-3736:
---------------------------------
Attachment: GrantRevokeDDLTest.diff
column-level.sql
table-level.sql
Attaching a repro, column-level.sql which shows the issue.
For contrast I attach table-level.sql which fails as expected.
I also attach a diff I made to GrantRevokeDDLTest with a test case
which can be used to reproduce.
I ran the scripts with this incantation
java -Dderby.user.dag=wanvik -Dderby.user.donald=duck -Dderby.connection.requireAuthentication=true -Dderby.database.sqlAuthorization=true -jar derbyrun.jar ij < script
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Attachments: column-level.sql, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-3736:
---------------------------------
Derby Info: [Patch Available, Regression] (was: [Regression])
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3736) Revoking a column level privilege
from a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611569#action_12611569 ]
Dag H. Wanvik commented on DERBY-3736:
--------------------------------------
committed derby-3736b as svn 674808 on trunk.
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Fix For: 10.5.0.0
>
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-3736) Revoking a column level privilege from
a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik closed DERBY-3736.
--------------------------------
Resolution: Fixed
Fix Version/s: 10.4.1.4
10.3.3.1
Merged patch to 10.3 branch as svn 675121 and to 10.4 branch as svn 675116, closing.
The regressions ran OK on 10.3 branch, but I saw several errors and and one fault on the 10.4 branch which
I deem to be unrelated (JMX management beans tests).
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Fix For: 10.3.3.1, 10.4.1.4, 10.5.0.0
>
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3736) Revoking a column level privilege
from a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610157#action_12610157 ]
Dag H. Wanvik commented on DERBY-3736:
--------------------------------------
Thanks for looking at this, Rick. I will add the comment for the
column case as well. Regressions ran ok.
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3736) Revoking a column level privilege
from a user, a prepared statement relying on that privilege can still be
executed
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611953#action_12611953 ]
Dag H. Wanvik commented on DERBY-3736:
--------------------------------------
The errors I saw on the 10.4 branch running regressions were due to running with classes,
not the DERBY jar files in CLASSPATH.
> Revoking a column level privilege from a user, a prepared statement relying on that privilege can still be executed
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3736
> URL: https://issues.apache.org/jira/browse/DERBY-3736
> Project: Derby
> Issue Type: Bug
> Components: Security, SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Fix For: 10.3.3.1, 10.4.1.4, 10.5.0.0
>
> Attachments: column-level.sql, derby-3736.diff, derby-3736.stat, derby-3736b.diff, derby-3736b.stat, GrantRevokeDDLTest.diff, table-level.sql
>
>
> When a table level SELECT privilege is revoked, a dependent prepared statement is
> invalidated and can no longer be executed, but in the case of a column level privilege
> SELECT privilege, the dependent prepared statement can still be executed.
> This works as expected in 10.2, but does not work in all 10.3 and 10.4 releases.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.