[Seasar-user:20305] Re: How to encrypt the USER & PSWD defined in data source file?

Koichi Kobayashi [E-MAIL ADDRESS DELETED]
2010年 11月 2日 (火) 17:00:13 JST


小林 (koichik) です.

Date: Tue, 2 Nov 2010 15:49:26 +0900
From: Bin B Gu <[E-MAIL ADDRESS DELETED]>
Subject: [Seasar-user:20304] How to encrypt the USER & PSWD defined in data source file?

> We have a requirement to encrypt the "USER" & "PASSWORD" or at least
> encrypt the "PASSWORD" in that data source definition .
> 
> Does the system offer the function of that? If possible, please give us a
> demonstration solution of that.

1. When you use the JavaEE server, lookup the DataSource
   from JNDI.

http://s2container.seasar.org/2.4/ja/jdbc.html#GenericApplicationServer

Note, you must use a TransactionManager from the JavaEE server.

http://s2container.seasar.org/2.4/ja/transaction.html


2. Use the OGNL. 

http://s2container.seasar.org/2.4/ja/ognl.html
http://www.opensymphony.com/ognl/

example;

<property name="password">
  @[E-MAIL ADDRESS DELETED](BLOWFISH_CONTEXT, "KFLfwaFXEacFrNo/G1MMwg==", "UTF-8")
</property>


-- 
<component name="koichik">
    <property name="fullName">"Koichi Kobayashi"</property>
    <property name="email">"[E-MAIL ADDRESS DELETED]"</property>
    <property name="blog">"http://d.hatena.ne.jp/koichik"</property>
    <property name="twitter">"http://twitter.com/koichik"</property>
</component>



Seasar-user メーリングリストの案内