ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | enhydra List | September 2005 Index

<--  Date Index  --> <--  Thread Index  -->

encrypt database password in web.xml


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??



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.