[enhydra] encrypt database password in web.xml
[email protected] Tue, 13 Sep 2005 16:04:15 +0200
| Newsgroups | gmane.comp.java.enhydra.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format...
------------=_1126620261-18282-80
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I could like to encrypt the database login password defined in web.xml. I tried to overwrite the value in config object before I call to allocate connection. Please see the following code experiment
// the password is encrypted, need to decrypted before
// calling to do the allocation
Config dbConfig = Enhydra.getDatabaseManager().getConfig();
if(dbConfig != null){
Config dbConfig1 = (Config)dbConfig.getSection("DB.myDatabase.Connection");
if((dbConfig1 != null) &&
(dbConfig1.containsKey("Password"))){
dbConfig1.set("Password", "clear");
System.out.println("setting password");
}
}
conDB = Enhydra.getDatabaseManager().allocateConnection(currentDBName);
I found out this did not work since the password at this time is already read in and store away.
Then I tried to extends the com.lutris.appserver.server.sql.StandardDatabaseManager, and in the constructor overwrite the password value. Still did not work.
I looked up information using google and found some xsd file by enhydra that talked about putting in encrypted value in the web.xm. Would someone please give me some hints on how to tackle this problem
thanks in advance....
Where is the knowledge base??
------------=_1126620261-18282-80
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
------------=_1126620261-18282-80--