Curretnly there is no way to hide data and database structure in embedded derby from the end user.
One way to accomplish the above requirement is as follows:
1. Create encrypted database so data is protected
2. Enable authentication and sql authorization in database
3. Create two users, dbUser and dbOwner
4. Store application logic as stored procedure in the databse so dbUser does not know what tables are accecced by the application logic, thus hiding table structure
5. Revoke select permission from dbUser so he cannot describe tables thus protecting table structures
6. Give only Execute permissions on stored procedures to dbUser
The above steps will ensure that data and data structure is hidden when application is delivered to end user.
The problem is, if user does not have select permission, the stored procedures will not execute. So I am requesting the following enhancement to Derby:
If dbOwner has given Execure permission to stored procecure to a dbUser, then allow stored procedure to execute even if the dbUser has no select permission.
In otherwords, When dbUser calls stored procedure, database will use dbOwners authorization to execute stored procedure rather than dbUsers.
This may be implemented by creating new permission called RunAsDbOwner.
DbOwner can then grant permission to dbUser to execute a stored procedure with RunAsDbOwner.
If this is implemented, applications can be created which will truely hide the database structure and data from end users. Database will behave as a blackbox with only in/out data exposed in stored procedures.
|Field||Original Value||New Value|
|Summary||Allow database user to execute stored procedures with same permissions as database owner||Allow database user to execute stored procedures with same permissions as database owner and/or routine definer|
|Component/s||SQL [ 11408 ]|
|Assignee||Dag H. Wanvik [ dagw ]|
|Attachment||derby-4551-1.txt [ 12445212 ]|
|Affects Version/s||10.6.1.0 [ 12313727 ]|
|Affects Version/s||10.5.2.0 [ 12314116 ]|
|Affects Version/s||10.5.1.1 [ 12313771 ]|
|Affects Version/s||10.4.2.0 [ 12313345 ]|
|Affects Version/s||10.4.1.3 [ 12313111 ]|
|Affects Version/s||10.3.3.0 [ 12313142 ]|
|Affects Version/s||10.3.2.1 [ 12312876 ]|
|Affects Version/s||10.3.1.4 [ 12312590 ]|
|Affects Version/s||10.2.2.0 [ 12312027 ]|
|Affects Version/s||10.2.1.6 [ 11187 ]|
|Affects Version/s||10.1.3.1 [ 12311953 ]|
|Affects Version/s||10.1.2.1 [ 12310615 ]|
|Affects Version/s||10.1.1.0 [ 10993 ]|
|Affects Version/s||10.0.2.1 [ 10991 ]|
|Affects Version/s||10.0.2.0 [ 10920 ]|
|Fix Version/s||10.7.0.0 [ 12314971 ]|
|Issue & fix info||[Patch Available]|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Comment||[ Cf. current plans here: http://wiki.apache.org/db-derby/DerbyTenSevenOneRelease ]|
|Fix Version/s||10.7.1.1 [ 12315564 ]|
|Fix Version/s||10.7.1.0 [ 12314971 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Workflow||jira [ 12499209 ]||Default workflow, editable Closed status [ 12802737 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|219d 16h 23m||1||Dag H. Wanvik||24/Sep/10 20:36|
|996d 13h 42m||1||Knut Anders Hatlen||17/Jun/13 10:19|