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-2109) System privileges
Date Wed, 06 Jun 2007 15:59:26 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501966

Rick Hillegas commented on DERBY-2109:

Thanks for this impressive patch, Martin. The Principal and Permissions classes look very
polished to me. Hopefully, your next submission will be a little smaller: smaller patches
are easier for the community to digest. I have committed this first increment, with the following
changes, at subversion revision 544870:

1) I commented out what looked like diagnostic scaffolding to me: a System.out.println() in
DatabasePermission.implies(). If this was actually a useful piece of code, please explain.

2) I commented out the running of the SystemPrivilegesPermissionTest in the junit _Suite.
This is because the test has some problems, which I describe below and which  you can address
in a later submission.

With these changes, the regression tests ran cleanly for me.

Here are the problems which I saw in SystemPrivilegesPermissionTest:

A) Right now, the test can only be run against the classtree, not against the jar files. This
is because your Principal and Permissions classes are not pulled into derby.jar yet. They
will be pulled into derby.jar when you actually reference these classes in the engine code.
That is because the jar builder only includes classes that can be reached by following class
references, starting at some distinguished entry points.

B) When I ran this test standalone, I saw the following failure:

Time: 0.425
There was 1 failure:
1) testSystemPrivileges(org.apache.derbyTesting.unitTests.junit.SystemPrivilegesPermissionTest)junit.framework.AssertionFailedError:
expected IOException
	at org.apache.derbyTesting.unitTests.junit.SystemPrivilegesPermissionTest.checkDatabasePermission(SystemPrivilegesPermissionTest.java:295)
	at org.apache.derbyTesting.unitTests.junit.SystemPrivilegesPermissionTest.execute(SystemPrivilegesPermissionTest.java:193)
	at org.apache.derbyTesting.unitTests.junit.SystemPrivilegesPermissionTest.testSystemPrivileges(SystemPrivilegesPermissionTest.java:184)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.extensions.TestSetup.run(TestSetup.java:25)

Tests run: 1,  Failures: 1,  Errors: 0

> System privileges
> -----------------
>                 Key: DERBY-2109
>                 URL: https://issues.apache.org/jira/browse/DERBY-2109
>             Project: Derby
>          Issue Type: New Feature
>          Components: Security
>    Affects Versions:
>            Reporter: Rick Hillegas
>         Attachments: DERBY-2109-02.diff, DERBY-2109-02.stat, systemPrivs.html, systemPrivs.html,
systemPrivs.html, systemPrivs.html
> Add mechanisms for controlling system-level privileges in Derby. See the related email
discussion at http://article.gmane.org/gmane.comp.apache.db.derby.devel/33151.
> The 10.2 GRANT/REVOKE work was a big step forward in making Derby more  secure in a client/server
configuration. I'd like to plug more client/server security holes in 10.3. In particular,
I'd like to focus on  authorization issues which the ANSI spec doesn't address.
> Here are the important issues which came out of the email discussion.
> Missing privileges that are above the level of a single database:
> - Create Database
> - Shutdown all databases
> - Shutdown System
> Missing privileges specific to a particular database:
> - Shutdown that Database
> - Encrypt that database
> - Upgrade database
> - Create (in that Database) Java Plugins (currently  Functions/Procedures, but someday
Aggregates and VTIs)
> Note that 10.2 gave us GRANT/REVOKE control over the following  database-specific issues,
via granting execute privilege to system  procedures:
> Jar Handling
> Backup Routines
> Admin Routines
> Import/Export
> Property Handling
> Check Table
> In addition, since 10.0, the privilege of connecting to a database has been controlled
by two properties (derby.database.fullAccessUsers and derby.database.defaultConnectionMode)
as described in the security section of the Developer's Guide (see http://db.apache.org/derby/docs/10.2/devguide/cdevcsecure865818.html).

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

View raw message