ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Using encrypted passsword with <sql> task
Date Fri, 31 Mar 2006 07:25:37 GMT

Hi,

as you have already your two classes =

1. put your password in a property file, and (optionally) hide
    it between some other dummy stuff  :

thequickbrownfox
bla=foobar
sql=myverysecretpassword
jumpsover
thelazydog
theanswer=42

2. let your encrypt routine run over the file

3. delete the unencrypted file, so only the encrypted
    file stays in file system

4. when running your ant file, follow these steps :

 - run your decrypt routine on the encrypted file ,let
   it create the unencrypted original file
- load the original file as property file
- delete the original file right after that in the next line

5. Now you have the sql password in memory and can
    use it as ${sqlp} or whatever it's name may be in the
    sqltask

I use it that way for non interactive ftp transfers.

Keep in mind =

- place the encrypted file into a restricted area of filesystem, where
  not anybody has access to
- don't use names that make it easy to follow your steps, i.e.
  sqlpassword.property for your encrypted file or sqlpassword as
propertyname
- place some other dummy stuff into the encrypted file to hide the
sqlproperty
  between other lines

and finally  !!! don't forget >>> if you run your ant script in debug
mode, the
unencrypted property is printed to stdout or to log (when using ant with
a logger ...), so 
everybody can read it.

Regards, Gilbert

 

-----Original Message-----
From: Laurent Duperval [mailto:Laurent.Duperval@fleetmind.com] 
Sent: Thursday, March 30, 2006 4:23 PM
To: user@ant.apache.org
Subject: Using encrypted passsword with <sql> task

<This may be a repost>

Hi,

Is it possible to use an encrypted password in a SQL task? If so, how
can I do that? I'm using Blowfish to encrypt/decrypt the password and I
have a routine that does it for me already. How can I tell the ant <sql>
task that I am using an encrypted password?

Thanks,

L


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message