[
https://issues.apache.org/jira/browse/DERBY-866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Hillegas updated DERBY-866:
--------------------------------
Attachment: derby-866-01-aa-sysusers.diff
Attaching derby-866-01-aa-sysusers.diff. This first patch adds the SYSUSERS
table. I will add upgrade tests in a follow-on patch. I am running regression
tests now.
This patch makes the following changes:
1) Creates the SYSUSERS table and a unique index on its USERNAME column. This
happens in newly created 10.9 databases and in databases which have been
hard-upgraded to 10.9.
2) When SQL authorization is enabled, lets only the DBO view SYSUSERS and
prevents even the DBO from viewing the PASSWORD column.
This patch touches a lot of files for these reasons:
i) Adding a new catalog involves touching several data dictionary files.
ii) Many of our tests have canonized the results of selects from SYSTABLES. We
should consider adjusting these tests so that they will not break the next time
we add a catalog. This might be a good task for a newcomer or GSoC student.
iii) A couple other files had to be touched because SYSUSERS is a special table
with restricted access.
Touches the following files:
------------
M java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
A java/engine/org/apache/derby/impl/sql/catalog/SYSUSERSRowFactory.java
M java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
A java/engine/org/apache/derby/iapi/sql/dictionary/UserDescriptor.java
M java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
M
java/engine/org/apache/derby/iapi/sql/dictionary/DataDescriptorGenerator.java
Adds the SYSUSERS table to the DataDictionary.
------------
M java/engine/org/apache/derby/iapi/types/SQLChar.java
M java/engine/org/apache/derby/iapi/types/SQLVarchar.java
Special logic to allow us to wrap a SQLVarchar around the char[] used to hold a
password. This is not intended as general support for representing Strings as
char[].
------------
M java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
M java/engine/org/apache/derby/loc/messages.xml
M java/shared/org/apache/derby/shared/common/reference/SQLState.java
New check to prevent unauthorized viewing of SYSUSERS.
------------
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBOAccessTest.java
New test case to verify that Derby prevents unauthorized viewing of SYSUSERS.
------------
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/AlterTableTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/ViewsTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/PrimaryKeyTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/SystemCatalogTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DMDBugsTest.java
M java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
M
java/testing/org/apache/derbyTesting/functionTests/master/compressTable.out
Additional tests which had to be changed because a new catalog appears when you
select from SYSTABLES.
> 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, 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