Re: [jetty-user] Encrypted passwords in .xml files

[email protected]
Newsgroups gmane.comp.java.jetty.support
Message-ID <OF29CF8328.F2784DF7-ONC12577C8.002492DF-C12577C8.0024F4DE@toyota-europe.com>
Peter,

This looks fine, but I like to use this for datasource 

ex.

    <New id=DB" class="org.mortbay.jetty.plus.naming.Resource">
        <Arg>jdbc/DB</Arg>
        <Arg>
                <New class="com.ibm.db2.jcc.DB2SimpleDataSource">
                        <Set name="DatabaseName">database/Set>
                        <Set name="User">user</Set>
                        <Set name="Password">password</Set>
                        <Set name="ServerName">server</Set>
                        <Set name="PortNumber">nnn</Set>
                </New>
        </Arg>
    </New>

java -cp lib/jetty-6.1.24.jar:lib/jetty-util-6.1.24.jar 
org.mortbay.jetty.security.Password user password 
password
OBF:1v2j1uum1xtv1zej1zer1xtn1uvk1v1v
MD5:5f4dcc3b5aa765d61d8327deb882cf99
CRYPT:usjRS48E8ZADM

I adapt to :

    <New id=DB" class="org.mortbay.jetty.plus.naming.Resource">
        <Arg>jdbc/DB</Arg>
        <Arg>
                <New class="com.ibm.db2.jcc.DB2SimpleDataSource">
                        <Set name="DatabaseName">database/Set>
                        <Set name="User">user</Set>
                        <Set name="Password">CRYPT:usjRS48E8ZADM</Set>
                        <Set name="ServerName">server</Set>
                        <Set name="PortNumber">nnn</Set>
                </New>
        </Arg>
    </New>

But when starting the server, exception on invalid password. 

Walter









Peter Ondru?ka <[email protected]> 
25/10/2010 20:23
Please respond to
[email protected]

To
[email protected]
cc

Subject
Re: [jetty-user] Encrypted passwords in .xml files






http://docs.codehaus.org/display/JETTY/Securing+Passwords

On Mon, Oct 25, 2010 at 4:00 PM,  <[email protected]> 
wrote:
>
> Hi,
>
> We are using the jetty.xml file for our application and inside this file 
we
> declare some datasources. One of the properties of this configurarion is 
a
> password to be used for the database connection, which is readable 
inside
> the jetty.xml file.  Are there some ways to have these kind of 
properties
> encrypted?
>
> Walter
>



-- 
Peter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.