how to hash impersonated password

M

Mark

We're going to use impersonation in our web.config file to connect via
windows authentication to a SQL Server on the same domain. We'd like to
hash the password rather than store it in plain text in the web.config file
..... suggestions?

<identity impersonate="true" userName="mydomain\myuser" password="mypass"/>

Thanks in advance!

Mark
 
M

Mark

We're on a windows network - we'd like to leverage windows authentication.
We don't have SQL Server authentication turned on at all.

I'm happy to store the hashed/encrypted password some where else, but would
appreciate a bit of guidence on a best practice to follow.

Thanks in advance.

Mark

Adrijan Josic said:
There's no logic in having it hashed in the web.config. If ASP.NET could
login with a hashed password, so could everyone else hence someone could get
the hash from your web.config file and use it to login just as he would with
the original password.
Why not you use standard SQL identification and store your password
somewhere else, perhaps encrypted(not hashed)?
You could probably also deny read/write permission on web.config to
everyone except the neccessary system processes I guess...
 
B

bruce barker

microsoft supplies no secure way to do this. the best you can do is encrypt
the password and store where your like (note: all web sites on the server
will have access to it, if they know where). then your code will have to
impersonate the account before making any calls that require it. due asp.net
to thread agility (threads may switch during page processing), you can not
just do it once at the start of page processing.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top