db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre" <mcintyr...@gmail.com>
Subject Re: Security in Derby
Date Tue, 20 Feb 2007 19:17:36 GMT
On 2/20/07, Alexander Trauzzi <atrauzzi@gmail.com> wrote:
> Awesome, I'm glad I can collect all these hidden links, but the issue of per
> user authentication, similar to what MySQL and other databases offer is
> still blocking me.

Perhaps the issue here is that the information you are looking for is
not in the Server and Administration guide, but in the Developer's

Have you read through the "Derby and Security" section here:


Specifically, to use Derby's built-in user authentication and create
the users and passwords for a database:


e.g., to create a user 'andrew' with password of 'newderbyuser' you
can call, in ij:

    'derby.user.andrew', 'newderbyuser')

Then to enable the builtin authentication, you need to start the
database with the following properties set:


You can set these properties at the database level by calling the set
database property procedure, e.g. in ij: CALL
'derby.connection.requireAuthentication', 'true' );

and then shutting down the database engine and reconnecting to the
database, as the derby.connection.requireAuthentication property is a
static property. For a discussion of static vs. dynamic properties,
see the Tuning guide, specifically:


If you are connecting to the database over a network, you should
consider using a non-cleartext password security mechanism, discussed
in the server and admin guide here:


Anyway now that all the necessary properties are set, you need to
connect to the database with the user and password you set, since
authentication is enabled, by adding the appropriate user and password
attributes to the JDBC URL, e.g. in ij:

connect 'jdbc:derby:myDB;user=andrew;password=newderbyuser';

Note that this puts the user by default into the schema of their own
username. e.g. if you create a table foo after you log in, it will be
in the ANDREW schema, i.e. ANDREW.FOO.

You can find further details for setting up user authentication in the
PDF that was linked earlier, and in the manuals, but those are the

Did that help?


View raw message