Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to secure the database credentials

 
IshwarJava Chand
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or use JNDI, and store them in another different place on the server.

But the basic point is sound--why do you care?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic