db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Zaun (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2109) System privileges
Date Wed, 19 Mar 2008 18:28:24 GMT

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

Martin Zaun commented on DERBY-2109:
------------------------------------

Not much to add to the description by Dan of the user-visible changes with NetworkServer shutdown
authentication, this is pretty much it.  But to restate and summarize:

1) If running derby server without authentication: no backward compatibility issues.  (The
old command-line usage, APIs, and derby tests continue to work.)

2) If running a derby server with authentication on:
    a)  The command-line usage of NetworkServerControl to shutdown the sever changes:
            java org.apache.derby.drda.NetworkServerControl shutdown
        results in an exception:
            08004:Connection authentication failure occurred.  Reason: Invalid authentication..

        The remedy is to provide credentials:
            java org.apache.derby.drda.NetworkServerControl shutdown -user <user> -password
<password>

    b)  The NetworkServerControl API usage to programatically shutdown a server changes:
            NetworkServerControl nsc = new NetworkServerControl();
            nsc.shutdown();
        results in a java.sql.SQLException: Connection authentication failure occurred.  Reason:
Invalid authentication..

        The remedy is provide credentials to the NetworkServerControl constructor:
            NetworkServerControl nsc = new NetworkServerControl("user", "password");
            nsc.shutdown();

    c) Note that there is an edge case of b), which the current implementation only addresses
poorly:
            NetworkServerControl nsc = new NetworkServerControl();
            nsc.start(console);
            ...
            nsc.shutdown();
        currently fails with above's SQLException.  This is because of an asymmetrie we currently
have: we don't require credentials when bringing up a server but we do require them when shutting
down.

        There is an easy workaround, however:
            NetworkServerControl nsc = new NetworkServerControl();
            nsc.start(console);
            ...
            NetworkServerControl nscauth = new NetworkServerControl("user", "password"); 
            nscauth.shutdown();

    d)  If users have their own tests that use derby's junit test framework, they'll have
to use a test decorator that takes user credential arguments.

    e) I'm not sure if users can programatically use derby's NetworkServerControlImpl (!)
class to shutdown the server, but if so, they'll have to use an instance that has been constructed
with user credential arguments, analog to b).

One more item is a not a backward compatibility issue: When running with authentication on,
I think the server already requires user credential in connection URLs, for example:
    connect 'jdbc:derby://localhost:1527/;shutdown=true';
fails but
    connect 'jdbc:derby://localhost:1527/;shutdown=true;user=user;password=password';
succeeds in 10.3 already.

I don't have a strong opinion whether the shutdown authentication feature should be bundled
with shutdown authorization checks later or not, but it would be nice to have a better solution
for 2c).


> System privileges
> -----------------
>
>                 Key: DERBY-2109
>                 URL: https://issues.apache.org/jira/browse/DERBY-2109
>             Project: Derby
>          Issue Type: New Feature
>          Components: Security
>    Affects Versions: 10.3.1.4
>            Reporter: Rick Hillegas
>         Attachments: DERBY-2109-02.diff, DERBY-2109-02.stat, derby-2109-03-javadoc-see-tags.diff,
DERBY-2109-04.diff, DERBY-2109-04.stat, DERBY-2109-05and06.diff, DERBY-2109-05and06.stat,
DERBY-2109-07.diff, DERBY-2109-07.stat, DERBY-2109-08.diff, DERBY-2109-08.stat, DERBY-2109-08_addendum.diff,
DERBY-2109-08_addendum.stat, DERBY-2109-09.diff, DERBY-2109-09.stat, DERBY-2109-10.diff, DERBY-2109-10.stat,
DERBY-2109-11.diff, DERBY-2109-11.stat, DERBY-2109-12.diff, DERBY-2109-12.stat, SystemPrivilegesBehaviour.html,
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.


Mime
View raw message