db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1330) Provide runtime privilege checking for grant/revoke functionality
Date Tue, 18 Jul 2006 16:04:15 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1330?page=all ]

Mamta A. Satoor updated DERBY-1330:

    Attachment: Derby1330setUUIDinDataDictionaryV8diff.txt

Currently, in case of revoke privilege, DataDictionary.addRemovePermissionsDescriptor expects
it's callers to set the permission descriptor's uuid so that DependencyManager can be invoked
by addRemovePermissionsDescriptor to send REVOKE_PRIVILEGE action to permission descriptor's
dependents(sending of REVOKE_PRIVILEGE work has not been finished yet. This patch is in preparation
of that work). In order to set the uuid, the callers have to goto system tables to find the
uuid and then set the permission descriptor's uuid.

It will be less error prone if DataDictionary.addRemovePermissionsDescriptor did the setting
of uuid of permission descriptor, rather than having every caller set the uuid correctly.
DataDictionary.addRemovePermissionsDescriptor method has to goto the permission system tables
anyways and has the uuid information handy and hence it will be more efficient for it to set
the uuid of the permission descriptor. This is inline with the patch that was commited some
time back so that resetting of the uuid happened in addRemovePermissionsDescriptor method
rather than expecting the callers to do that.

In order to do this, I have added an abstract method to PermissionsCatalogRowFactory called
setUUIDOfThePassedDescriptor. This method will set the uuid of the passed permission descriptor
to same value as the row corresponding to the permission system table which is also passed
as a parameter. This method will be called by DataDictionary.addRemovePermissionsDescriptor.

I have run derbyall suite on my Windows XP machine with Sun's jdk14 and there were no new
failures. Can someon please review this patch(Derby1330setUUIDinDataDictionaryV8diff.txt)
and if no comments, can a commiter please commit this patch?

ps There is another patch pending on this JIRA entry(Derby1330MinorCleanupV7diff.txt). Can
a commiter please commit that too?

> Provide runtime privilege checking for grant/revoke functionality
> -----------------------------------------------------------------
>                 Key: DERBY-1330
>                 URL: http://issues.apache.org/jira/browse/DERBY-1330
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions:
>            Reporter: Mamta A. Satoor
>         Assigned To: Mamta A. Satoor
>         Attachments: AuthorizationModelForDerbySQLStandardAuthorization.html, AuthorizationModelForDerbySQLStandardAuthorizationV2.html,
Derby1330MinorCleanupV7diff.txt, Derby1330MinorCleanupV7stat.txt, Derby1330PrivilegeCollectionV2diff.txt,
Derby1330PrivilegeCollectionV2stat.txt, Derby1330PrivilegeCollectionV3diff.txt, Derby1330PrivilegeCollectionV3stat.txt,
Derby1330setUUIDinDataDictionaryV8diff.txt, Derby1330setUUIDinDataDictionaryV8stat.txt, Derby1330uuidIndexForPermsSystemTablesV4diff.txt,
Derby1330uuidIndexForPermsSystemTablesV4stat.txt, Derby1330uuidIndexForPermsSystemTablesV5diff.txt,
Derby1330uuidIndexForPermsSystemTablesV5stat.txt, Derby1330uuidIndexForPermsSystemTablesV6diff.txt,
Derby1330uuidIndexForPermsSystemTablesV6stat.txt, Derby1330ViewPrivilegeCollectionV1diff.txt,
> Additional work needs to be done for grant/revoke to make sure that only users with required
privileges can access various database objects. In order to do that, first we need to collect
the privilege requirements for various database objects and store them in SYS.SYSREQUIREDPERM.
Once we have this information then when a user tries to access an object, the required SYS.SYSREQUIREDPERM
privileges for the object will be checked against the user privileges in SYS.SYSTABLEPERMS,
SYS.SYSCOLPERMS and SYS.SYSROUTINEPERMS. The database object access will succeed only if the
user has the necessary privileges.
work on DERBY-464. But SYS.SYSREQUIREDPERM doesn't have any information in it at this point
and hence no runtime privilege checking is getting done at this point.

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


View raw message