ant-user mailing list archives

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


as you have already your two classes =

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


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

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. for your encrypted file or sqlpassword as
- place some other dummy stuff into the encrypted file to hide the
  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 [] 
Sent: Thursday, March 30, 2006 4:23 PM
Subject: Using encrypted passsword with <sql> task

<This may be a repost>


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?



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message