How to best pass along authentication usernames and passwords

I have a web application that authenticates users against my LDAP.  I would then like to pass that information along to other forms, like our exchange server, our hr servers, etc...  I can programmatically recreate the form that each signin page uses, and that works fine, however, the user user name and password are actually written into the page code, I am looking for a more secure method to implement this pseudo-single sign on.

Thank you, any advice would be greatly appreciated.
shanemayAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amanolaCommented:
On authentication you can store the Username/Password in Session variables. That way they are accessible anywhere in the site without ever being visibile in the code.
0
shanemayAuthor Commented:
Right, I understand that, however, how do I dynamically re-create the forms and auto submit them with the information stored in the session variables.   Now I read the username and password out of the session and write them directly into the code.

Thank you for the reply.  
0
Ted BouskillSenior Software DeveloperCommented:
Is this an intranet application?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

shanemayAuthor Commented:
No, it is not.  It is a public portal of users and staff.    
0
Ted BouskillSenior Software DeveloperCommented:
Hmm sounds dangerous.  True integrationed Windows Authentication uses a one-way hash that protects the user name/password combinations.  You are going to have to use SSL throughout your application and if your front-end server is penetrated any DLLs you create in .NET can be reverse engineered to expose the authentication data.

Have you looked at any articles for using Windows Authentication and Kerberos?
0
shanemayAuthor Commented:
I agree, i do not like the process, and yes I will have SSL throughout the application.  I am basically recreating the forms and submitting them for the user.  The only problem is that when I create the form dynamically, the username and password is rendered with the code.  I really need to find a way to have multiple forms per aspx page.  I really think that would solve the problem.

Thank you for your help.
0
Ted BouskillSenior Software DeveloperCommented:
Hmm, sadly .NET doesn't support multiple forms per page.  You could use impersonation.  In other words when you receive the username password instead of authenticating against LDAP you create an authentication token you can relay to the other sites which could then support Windows Authentication.
http://msdn.microsoft.com/en-us/library/system.security.principal.windowsidentity.impersonate(VS.71).aspx

So just to be clear let's go over the details again.

Scenario #1: Full Windows Authentication
ClientA
WebProxyA: Windows Authentication (The server you are using to relay credentials)
ExchSvrA,HrServerA,...: Windows Authentication

Scenario #1 will fail because windows credentials cannot be related to ExchSrvrA, HrServerA et cetera

Scenario #2: All forms authentication
ClientA
WebProxyA: Forms Authentication
ExchSvrA,HrServerA,...: Forms Authentication

Scenario #2 works but the credentials stored in WebProxyA are vulnerable to snooping (I would store them in session variables)

Scenario #3: Combo of Forms and Windows Authentication
ClientA
WebProxyA: Forms Authentication
ExchSvrA,HrServerA,...: Windows Authentication

Scenario #3 still captures the users login name and password protected by SSL but you generate a user identity when they log in to then relay to the Windows Authentication servers like HrServerA, which means you don't have to store the credentials just the identity token!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
shanemayAuthor Commented:
Sorry for the late reply, Thank you for the outstanding advice and help.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.