Re: protecting login information

From: Mike Labosh (mlabosh_at_hotmail.com)
Date: 10/27/04


Date: Wed, 27 Oct 2004 10:42:32 -0400


> Right now in order to protect SQL Server login information I have it
> hard-coded into my application. I don't exactly like that, but I can't
> figure out a way to store it elsewhere since the application itself has to
> go find it, with the users credentials. So I was thinking about creating a
> little utility to cypher the login and password and store it in a plain
> text
> file; the app would be able to decrypt it and use it but users wouldn't be
> able to decode it at all. Is this a good way to protect login info? I
> don't
> want to reinvent the wheel, so I ask here.

Sure, you could do that. For example, America Online Instant Messenger
stores passwords for auto-login in the registry as a cyphered string.

You could also store your cypher as a key in your App.config file next to
your connection string key and use
System.Configuration.ConfigurationSettings.AppSettings to get the password
cypher, uncypher it and append it to your connection string at runtime.

If you can use Windows Authentication with your SQL Server, I think that's a
lot better, because then you don't have to worry about it.

-- 
Peace & happy computing,
Mike Labosh, MCSD
"I have no choice but to believe in free will." 


Relevant Pages

  • Re: Unexpected Login Screen When Accessing SQL Data Via .NET Intra
    ... >> data and the SQL Server is on the same server. ... >> My problem is that one user has started getting a login popup ... >> right in via Windows Authentication like everyone else and like they ...
    (microsoft.public.sqlserver.connect)
  • Re: cannot acees two databases as owner
    ... it does not matter you are a member of the ... the sysadmin fixed server role or if there is no any other Login which is ... group if it's a domain) and you can login to your SQL Server with, ...
    (microsoft.public.sqlserver.setup)
  • Re: Database security design with ASP.net and form-based authentication
    ... Since you already have forms-based security, why not use a single SQL login ... for all database access? ... data entry, guest/view only, admin, report viewer. ... so I'm using SQL Server authentication. ...
    (microsoft.public.sqlserver.security)
  • Re: Credentials not being passed with remote access
    ... allowed windows authentication to work, ... I had assumed johnx was a domain user rather than a local Windows account. ... johnx was set up as a local login on sql server. ...
    (microsoft.public.sqlserver.security)
  • Re: No db access after publishing web site
    ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
    (microsoft.public.dotnet.framework.aspnet)