Re: Storing connection strings
From: Ralph (msnews.20.nt_consulting32_at_spamgourmet.com)
Date: 02/27/05
- Next message: Chris: "Re: Where can the "Jet redistribution pack" be downloaded?"
- Previous message: Ralph: "Re: Where can the "Jet redistribution pack" be downloaded?"
- In reply to: LucasC: "Storing connection strings"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 26 Feb 2005 22:49:21 -0600
"LucasC" <msdn@rmya.com.ar> wrote in message
news:DEFB4C3F-DD20-473F-B8F8-7F1CF8D4C977@microsoft.com...
> Hi,
> I'd like to get some information about the different options to store and
> manage connection strings to be used by a VB 6.0 application in a secure
way.
> Any idea or good article?
>
> Thanks a lot
> --
> LucasC
Well this posting should draw a host of opinions <g>
An answer will depend heavily on who you are trying to protect it from, how
the app is distributed, and what OS you are running on. For example, many
exotic, seemly safe, security measures will fail miserably once an attacker
has physical access to the box, like the Encrypted File System on Win2k is
easily defeated, but very secure on an XP box. (To the point you can
actually lock yourself out forever if you are not careful. <g>) However, EFS
is relatively secure from remote or guarded user access.
Googling will turn up a ton of suggestions. To help in your search, the
basic ways, singularly or in combination, are...
1) Using the Data Protection API (DPAPI) provided by your OS. Search for
CryptProtectData and CryptUnProtectData.
[Which brings up the sub-topic - storing your keys on the box (machine
store) or by user (profiles).]
2) Use an .udl file, or .ini or text file, protected by the EFS or ACLs. You
might also encrypt the key value.
3) Use the registry, again perhaps encrypted and the keys protected by ACLs.
4) Using the COM+ catalog, if you are using MTS or other COM+ services.
Search for "COM+ Object Constructor Strings".
5) Don't worry about connection strings and instead require strong
login/authentication to the data server. ie, keep password out of the string
and force a manual login.
Personally I use encrypted strings placed in the Registry. I attach the
private encrypt keys to users profiles/logins, and guard the Registry with
ACLs. I also occasionally use .udl's placed in 'secure' locations.
hth
-ralph
- Next message: Chris: "Re: Where can the "Jet redistribution pack" be downloaded?"
- Previous message: Ralph: "Re: Where can the "Jet redistribution pack" be downloaded?"
- In reply to: LucasC: "Storing connection strings"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|