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, 19 Mar 2012 17:23:39 GMT

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

Rick Hillegas commented on DERBY-866:

Private discussions with Dag have suggested an improvement to the functional spec for NATIVE
authentication. This improvement would support the overriding design goals of this feature:

1) Easy to setup.

2) Hard to subvert.

The improvement would eliminate the following weird edge case. The edge case doesn't cause
any correctness problems which we know of. It just doesn't fit well with the design goals.
Here's the edge case:

A) You can store credentials in an unsecured database using the SYSCS_CREATE_USER() system

B) Then you can use the unsecure database as a credentials db by setting a system property
and rebooting the engine:


C) Because the database already exists, Derby won't automatically set derby.authentication.provider=NATIVE::LOCAL
in unsecuredDB. This means that you can later take the database offline and use it without
authentication. It seems odd that the credentials DB itself could be so unsecure.

To eliminate this weird edge case, we propose the following:

NATIVE::LOCAL authentication is on iff the DBO's credentials are stored in SYS.SYSUSERS.

Here's how we would enforce this rule:

i) The first user created by SYSCS_CREATE_USER() must be the DBO.

ii) When the DBO's credentials are stored in SYS.SYSUSERS, Derby will automatically set derby.authentication.provider=NATIVE::LOCAL
in the database.

This change would further the overriding design goals as follows:

1') It would now be even easier to convert a database to use NATIVE authentication. All you
would have to do is store credentials for the DBO. You would no longer need to also set derby.authentication.provider=NATIVE::LOCAL.

2') The new rule would eliminate one more way of subverting Derby security.

> 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:
>            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, UserManagement.html, UserManagement.html,
UserManagement.html, derby-866-01-aa-sysusers.diff, derby-866-01-ab-sysusers.diff, derby-866-02-ag-createDropUser.diff,
derby-866-03-aa-resetModifyPassword.diff, derby-866-03-ab-resetModifyPassword.diff, derby-866-04-aa-fixRolesTest.diff,
derby-866-05-aa-grantRevoke.diff, derby-866-06-aa-upgradeFrom10.1.diff, derby-866-07-aa-removeSQLPassword.diff,
derby-866-08-aa-passwordHasher.diff, derby-866-08-ab-passwordHasher.diff, derby-866-08-ad-passwordHasher.diff,
derby-866-09-ad-nativeAuthenticationService.diff, derby-866-09-ae-nativeAuthenticationServiceWithTests.diff,
derby-866-10-ac-propChanging.diff, derby-866-11-aa-upgradeTest.diff, derby-866-12-ac-passwordExpiration.diff,
derby-866-13-ab-systemWideOperationTests.diff, derby-866-14-ac-badNativeSpec.diff, derby-866-15-ae-dbInJarFileOrOnClasspath.diff,
derby-866-16-aa-credDBViaSubprotocol.diff, derby-866-17-aa-grantRevokeNative.diff, derby-866-18-aa-encryptedCredentialsDB.diff,
derby-866-19-aa-replicationTest.diff, derby-866-20-aa-npeAndUserProbing.diff, derby-866-20-ab-npeAndUserProbing.diff,
derby-866-21-aa-emptyCredentials.diff, derby-866-21-ab-emptyCredentials.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, 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


View raw message