db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-866) Derby User Management Enhancements
Date Mon, 12 Dec 2011 16:13:30 GMT

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

Rick Hillegas commented on DERBY-866:
-------------------------------------

Hi Bryan,

Would the following api be easy enough to satisfy your use-case:

1) At the system level, derby.authentication.provider can be set to the following special
value:

   -Dderby.authentication.provider=NATIVE:$credentialsDB:

2) The extra trailing : tells Derby that the $credentialsDB should only be used for system-wide
authentication. When creating a new database, Derby performs the following steps:

a) Authenticates the user/password combination against $credentialsDB.

b) If that succeeds, creates the new database, stores the user/password in the SYSUSERS catalog
of the new database, then sets derby.authentication.provider=NATIVE:: in the database.

c) Subsequent attempts to connect to the newly created database will be authenticated against
the NATIVE credentials stored in the database itself.

d) However, system-wide operations will continue to be authenticated against $credentialsDB.

At database creation time, the DBO's local credentials (the ones stored in the new database)
start out being the same as the DBO's credentials in $credentialsDB. The DBO has to decide
which of these behaviors is better:

i) Keep $credentialsDB in sync with the local database. That is, whenever the DBO wants to
update her local password, she should remember to update her password in $credentialsDB.

ii) Or let the local password diverge from what's in $credentialsDB.

If the DBO opts for (i), then she will use a single password to connect to her database, restore
her database, and shutdown the engine.

If the DBO opts for (ii), then she will use one password to connect to her database and another
password to shutdown the engine and restore her database. She will trip over the following
speedbump:

When she restores a database, she will supply her system-wide password (stored in $credentialsDB).
The database will be successfully restored. However, she will not have a connection to it.
In fact, she will encounter an authentication error. She will have to get a fresh connection
to the newly restored database, using her password as it is stored in that database.

This odd behavior arises because database restoration causes Derby to verify the supplied
credentials twice: first at the system-level and then at the local level. This is the existing
behavior of Derby today. Currently there is no way to tell Derby to use one set of credentials
for the restoration and a separate set of credentials for the database connection.

Do people think that this extension would be useful/usable? Should this use-case be sanded
down further?

Thanks,
-Rick

                
> Derby User Management Enhancements
> ----------------------------------
>
>                 Key: DERBY-866
>                 URL: https://issues.apache.org/jira/browse/DERBY-866
>             Project: Derby
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 10.2.1.6
>            Reporter: Francois Orsini
>            Assignee: Rick Hillegas
>         Attachments: Derby_User_Enhancement.html, Derby_User_Enhancement_v1.1.html, DummyAuthenticator.java,
UserManagement.html, UserManagement.html, UserManagement.html, derby-866-01-aa-sysusers.diff,
derby-866-01-ab-sysusers.diff, dummyCredentials.properties
>
>
> Proposal to enhance Derby's Built-In DDL User Management. (See proposal spec attached
to the JIRA).
> Abstract:
> This feature aims at improving the way BUILT-IN users are managed in Derby by providing
a more intuitive and familiar DDL interface. Currently (in 10.1.2.1), Built-In users can be
defined at the system and/or database level. Users created at the system level can be defined
via JVM or/and Derby system properties in the derby.properties file. Built-in users created
at the database level are defined via a call to a Derby system procedure (SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY)
which sets a database property.
> Defining a user at the system level is very convenient and practical during the development
phase (EOD) of an application - However, the user's password is not encrypted and consequently
appears in clear in the derby.properties file. Hence, for an application going into production,
whether it is embedded or not, it is preferable to create users at the database level where
the password is encrypted.
> There is no real ANSI SQL standard for managing users in SQL but by providing a more
intuitive and known interface, it will ease Built-In User management at the database level
as well as Derby's adoption.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message