encryption - howto encrypt passwords in configuration files, grails [and java] -


i looking step-by-step how on securing passwords put in configuration files, in grails. means securing passwords in config.groovy , datasource.groovy. there lot of google results contains bits , pieces of answer, no concise guides on how this. can please point me in right direction? thanx

for config.groovy, encrypt password way , put hash in config.groovy, manually. when need use in code, have code decrypt you. doesn't seem hard.

datasource.groovy different animal, however, since fed hibernate api you. did see code on interwebs , seems headed in right direction...

datasource {     pooled = false     driverclassname = "org.hsqldb.jdbcdriver"     username = "sa"     password =  someencryptionapiobject.decrypt(propertyfile.readproperty("mypassword"))  }  

...where encrypt property file containing data need, , decrypt when needed.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -