aspose file tools*
The moose likes Object Relational Mapping and the fly likes How to secure the database credentials Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to secure the database credentials " Watch "How to secure the database credentials " New topic
Author

How to secure the database credentials

IshwarJava Chand
Greenhorn

Joined: Jul 04, 2007
Posts: 3
I do not want to put my database credentials information in properties and hibernate.cfg.xml file.
Can anyone suggest me that it is possible in hibernate to secure that credentials and if yes then how it can be achieved.

Thanks!!!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Why not? Credentials have to go somewhere (not Hibernate's rules - just one of the the basic requirements for connecting to a database).

You could write your application to prompt for these, that way the would not be stored. Or you could swap to a database that support single sign on (DB2 or SQL Server for example).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Or use JNDI, and store them in another different place on the server.

But the basic point is sound--why do you care?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to secure the database credentials
 
Similar Threads
Apache2 as reverse proxy with Tomcat6 and LDAP
Database connectivity in workshop 8.1!
Login page security using Servlet
how to get the database name and credentials from config.xml of application server.
Connecting to a vpn network