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 Tue, 03 Jan 2012 15:24:39 GMT

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

Rick Hillegas commented on DERBY-866:

Thanks for looking at the patch, Knut. I'm not understanding the problem you have found with
it. I tried to separate the hashed result from the inputs to the hashing algorithm. For BUILTIN
passwords, the inputs continue to be concatenated with the hashed password. However, for NATIVE
authentication, the inputs are stored in SYSUSERS.HASHINGSCHEME and the hashed result is stored
in SYSUSERS.PASSWORD. The inputs should not be concatenated to the result in SYSUSERS.PASSWORD.
If they are, I have indeed made a mistake. The idea is that when verifying a NATIVE password,
we will perform the following steps:

1) The connecting user supplies a username and password.

2) Derby keys into SYSUSERS using the supplied username and looks up the corresponding HASHINGSCHEME
inputs and PASSWORD result.

3) Derby constructs a PasswordHasher from the inputs encoded in HASHINGSCHEME.

4) Then Derby runs the supplied username and password through the PasswordHasher to produce
a candidate hashed password.

5) Derby compares the candidate hashed password to the PASSWORD retrieved in step (2). If
they are identical, then authentication succeeds.

The following script output seems to verify to me that the NATIVE hashed PASSWORD does not
contain the inputs to the hashing algorithm, unlike the BUILTIN analog. Does this help clear
up the confusion or do you still see a problem here? Thanks.

ij> connect 'jdbc:derby:memory:db;create=true;user=test_dbo;password=test_dbopassword';
ij> call syscs_util.syscs_create_user( 'TEST_DBO', 'test_dbopassword' );
0 rows inserted/updated/deleted
ij> call syscs_util.syscs_set_database_property( 'derby.user.TEST_DBO', 'test_dbopassword'
0 rows inserted/updated/deleted
ij> select hashingscheme, password from sys.sysusers;

1 row selected
ij> values syscs_util.syscs_get_database_property( 'derby.user.TEST_DBO' );

1 row selected
ij> select length( hashingscheme ), length( password ) from sys.sysusers;
1          |2          
50         |64         

1 row selected
ij> values length( syscs_util.syscs_get_database_property( 'derby.user.TEST_DBO' ) );

1 row selected

> 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, 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, 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