You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by radha rukmani <ra...@yahoo.com> on 2006/01/20 20:35:05 UTC

encrypted password in the properties file

Hi
   
  I am new to ibatis, I want to save only an encrypted password inside the .properties file, 
   
  say for now, my sqlMapConfig.properties file has,
   
    driver=oracle.jdbc.driver.OracleDriver
  url=jdbc:oracle:thin:@xxx
  username=username
  password=password
   
  i want to save an encrypted password instead like
   
  driver=oracle.jdbc.driver.OracleDriver
  url=jdbc:oracle:thin:@xxx
  username=username
  password=&^%df3d
   
  to get the sqlMapClient, i have,
   
     String resource="com\\comp\\app\\sqlMapConfig.xml";
   Reader reader=Resources.getResourceAsReader(resource);
   sqlMap=SqlMapClientBuilder.buildSqlMapClient(reader);
   
  Could any one say how I should be handling this.
  Thanks.


			
---------------------------------
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.

Re: encrypted password in the properties file

Posted by radha rukmani <ra...@yahoo.com>.
Thanks Larry.

Larry Meadors <lm...@apache.org> wrote:  You could create a SqlMapClientBuilder that does that, but honestly,
it would be a waste of time.

If someone can access that file, they can access the bytecode to
decrypt it (because your jdbc driver won't use it encrypted) thus they
own you anyway.

Good file system security is your best bet.

Larry


On 1/20/06, radha rukmani wrote:
> Hi
>
> I am new to ibatis, I want to save only an encrypted password inside the
> .properties file,
>
> say for now, my sqlMapConfig.properties file has,
>
>
> driver=oracle.jdbc.driver.OracleDriver
> url=jdbc:oracle:thin:@xxx
> username=username
> password=password
>
> i want to save an encrypted password instead like
>
> driver=oracle.jdbc.driver.OracleDriver
> url=jdbc:oracle:thin:@xxx
> username=username
> password=&^%df3d
>
> to get the sqlMapClient, i have,
>
> String resource="com\\comp\\app\\sqlMapConfig.xml";
> Reader reader=Resources.getResourceAsReader(resource);
> sqlMap=SqlMapClientBuilder.buildSqlMapClient(reader);
>
> Could any one say how I should be handling this.
> Thanks.
>
> ________________________________
> Yahoo! Photos
> Got holiday prints? See all the ways to get quality prints in your hands
> ASAP.
>
>



		
---------------------------------
 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.

Re: encrypted password in the properties file

Posted by Larry Meadors <lm...@apache.org>.
You could create a SqlMapClientBuilder that does that, but honestly,
it would be a waste of time.

If someone can access that file, they can access the bytecode to
decrypt it (because your jdbc driver won't use it encrypted) thus they
own you anyway.

Good file system security is your best bet.

Larry


On 1/20/06, radha rukmani <ra...@yahoo.com> wrote:
> Hi
>
> I am new to ibatis, I want to save only an encrypted password inside the
> .properties file,
>
> say for now, my sqlMapConfig.properties file has,
>
>
> driver=oracle.jdbc.driver.OracleDriver
> url=jdbc:oracle:thin:@xxx
> username=username
> password=password
>
> i want to save an encrypted password instead like
>
> driver=oracle.jdbc.driver.OracleDriver
> url=jdbc:oracle:thin:@xxx
> username=username
> password=&^%df3d
>
> to get the sqlMapClient, i have,
>
>    String resource="com\\comp\\app\\sqlMapConfig.xml";
>    Reader reader=Resources.getResourceAsReader(resource);
>    sqlMap=SqlMapClientBuilder.buildSqlMapClient(reader);
>
> Could any one say how I should be handling this.
> Thanks.
>
>  ________________________________
> Yahoo! Photos
>  Got holiday prints? See all the ways to get quality prints in your hands
> ASAP.
>
>