You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Jose NUNES <jo...@orange.fr> on 2010/12/25 18:55:56 UTC

Derby EmbeddedDriver and password

Hi, sorry for my bad English but I'm French. I'm trying to put a 
password on my data base with properties, but good or wrong password 
passes... How can I do ?

My properties :
dbProperties.put("derby.driver","org.apache.derby.jdbc.EmbeddedDriver");
dbProperties.put("derby.url" ,"jdbc:derby:");
dbProperties.put("user" ,"utilisateur");
dbProperties.put("password","123456");

...

Connection dbConnection = DriverManager.getConnection(dbUrl, dbProperties);

Regards

Re: Derby EmbeddedDriver and password

Posted by Bryan Pendleton <bp...@gmail.com>.
On 12/25/2010 09:55 AM, Jose NUNES wrote:
> I'm trying to put a password on my data base with properties, but good or wrong
> password passes.

You have to do a few more steps. Have a read of the sections under
http://db.apache.org/derby/docs/10.6/devguide/cdevcsecure42374.html

You'll need to define a few additional database properties to enable
user authentication.

You should also consider using a stronger authentication system than
the built-in Derby system, which is really only suitable for development
and testing. An application which goes into production should use
something stronger, see:
http://db.apache.org/derby/docs/10.6/devguide/cdevcsecure37817.html

Here's an overview of the various properties you'll want to configure:
http://db.apache.org/derby/docs/10.6/devguide/rdevcsecure557.html

thanks,

bryan