db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3877) SQL roles: build support for dblook
Date Mon, 15 Sep 2008 19:53:46 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dag H. Wanvik updated DERBY-3877:
---------------------------------

    Attachment: derby-3877-1.stat
                derby-3877-1.diff

Ths patch, derby-3877-1, adds the capability to dblook to output role
definition and role grants in two separate sections, headers localized for
English only at this point.

The tests have been modified to run with authentication and
sqlAuthorization so roles can be used in the test. 

Detailed patch comments:

M      java/tools/org/apache/derby/tools/dblook.java

Now also calls DB_Roles.doRoles. Now, also supply user and passwords
in URLs.

A      java/tools/org/apache/derby/impl/tools/dblook/DB_Roles.java

The new class that handles output of role definitions and grants.

M      java/tools/org/apache/derby/impl/tools/dblook/DB_GrantRevoke.java

I noticed that authorization ids were not properly quoted on output.
I added that, since user/role names can also contain quotes and weird
characters. If desired, I can factor this out as a separate
issue/patch.

M      java/tools/org/apache/derby/loc/toolsmessages.properties

English locale text for headers for role definitions and grants.

M      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_makeDB.sql

Modified script to include creation of roles and granting of roles.

M      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java

Added dumping of sys.sysroles to check that recreated databases have
the same schema/DDL as the original ones.  Note the somewhat opaque
logic for creating a unique key for the rows to ensure stable sorting
for master comparison: I chose to concatenate roleid+grantor+grantee
to achieve this, since the existing machinery wasn't sufficient.

M      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test_territory_app.properties
M      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test_app.properties
A      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test_territory_derby.properties
A      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test_derby.properties
A      java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dblook_test_net_territory_derby.properties
M      java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dblook_test_net_territory_app.properties
A      java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dblook_test_net_derby.properties
M      java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dblook_test_net_app.properties

Modifies tests to run with authentiction and sqlAuthorization. Data base owner is
still APP, but a password is now used.

M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dblook_test_net.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dblook_test_net_territory.out
M      java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
M      java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out

Updated master files: dumping of sys.sysroles is the essential difference

Regressions ran ok.



> SQL roles: build support for dblook
> -----------------------------------
>
>                 Key: DERBY-3877
>                 URL: https://issues.apache.org/jira/browse/DERBY-3877
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Tools
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3877-1.diff, derby-3877-1.stat
>
>
> dblook does have support for grant/revoke although I am unsure of its quality, cf, my
questions
> in DERBY-3868. Nevertheless, I choose to build support for roles for dblook.
> Since role creation and the granting of roles is only allowed for the data base owner
in the first basic
> roles implementation, expanding the existing dblook tests to just dump the roles and
roles grants should be easy.
> In general though, the dblook output file, in order to receate a database, must potentially
use several connection, so the objects will be owned by the original owner. [The model for
running the presently generated script run seems to be within one connection.] Setting roles
properly to be able to recreate a view with the correct owner, for example, would be part
of such a more advanced script which would be object owner aware.
> My intention with this issue is just to add support for dumping roles and role grants.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message