If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > connect from client to server without specifying password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-06-10, 20:15
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
connect from client to server without specifying password

This questions comes from a DBA:

We have a db2 client instance ( on a stand along AIX ) box , which we use to run some ETL scripts which acess two tables in the remote database server . Let's say there is no data movements involved , we just want to run few SQL statements. When connecting to the remote database from this client instance , we have to provide a password as part of the connect ( CONNECT TO XXX USER YYYY USING zzzzzz) . Since we run a script , this password is in the plain view. This is a security issue. Is there a way in DB2 to connect from the client to the remote database without specifying a password .

So far my ( simple minded ) suggestions were :

1. Define a target instance with authentication client ( Security said no).
2. Replace local "client" instance with the local "server" instance .Create a database containing only federated links to the two tables on the remote server . This way , the scripts will connect to the "local" database without password requirement . ( ETL said no - extra work for them ) .

I think there should be a way ( perhaps some sort of client based DB2 security plug-in or some other method ) to accomplish this . Can you make a suggestion ?
Reply With Quote
  #2 (permalink)  
Old 10-06-10, 23:05
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I believe that setting both AUTHENTICATION and TRUST_CLNTAUTH to CLIENT should do the trick. The downside would be that the configuration is instance-wide, obviously, so all other clients will also authenticate locally.
Reply With Quote
  #3 (permalink)  
Old 10-06-10, 23:29
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
They can't use authentication client. Any other option?
Reply With Quote
  #4 (permalink)  
Old 10-07-10, 11:01
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2girl View Post
They can't use authentication client. Any other option?
Sure. Use AUTHENTICATION SERVER, but then you have to send the username and password to the server, no?
Reply With Quote
  #5 (permalink)  
Old 10-07-10, 14:58
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
If you catalog a type 2 conenction and then define an ODBC data source for it on a Windows machine, a userid and password can be defined as part of the ODBC data source. Obviously this requires that an ODBC connection be used, and note that the password is not encyrpted when stored on the local Windows client.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #6 (permalink)  
Old 10-07-10, 21:11
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Thank you, I forwarded your suggestions.


Some other suggestions provided:

- use something similar to "connect to <db> user <userid> using $1" and then pass it when calling the script

- encrypt script at the OS level

- if using java appl running from WAS then the userid and password (as well as other properties for the appl) could be encrypted: PropFilePasswordEncoder - script that allows to encrypt property file



DBA's feedback:
---------------
Actually , in order not to complicate the situation I had given you a simplified version of the script. We do have a password in the file in the encrypted form. Then we have a home-grown program ( a script ) which decrypts the password and passes it to the script in the manner you had suggested . However, it turns out this is not adequate for the security folks' purposes. One can still dump the scripts output file or rerun the decrypt script against file containing the encrypted passwords to gain access to production.

Your other suggestion regarding WAS is good . We're using it in our WAS application to protect the password . However, the ETL approach is ksh only - so we're looking for an alternate solution.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On