Mombu the Microsoft Forum

Go Back   Mombu the Microsoft Forum > Microsoft > SECURITY (TECHNET) > Construcing NetworkCredential from WindowsIdentity
User Name
Password
REGISTER NOW!




Reply
 
1 11th August 10:45
nicole calinoiu calinoiu removethis at gmail dot com
External User
 
Posts: 1
Default Construcing NetworkCredential from WindowsIdentity



System.Net.CredentialCache.DefaultCredentials might be what you're looking
for. If you don't think this would help with your scenario, could you
please explain how your code on the client (primary server) is communicating
with the target server?
  Reply With Quote


 


2 11th August 10:46
claus konrad
External User
 
Posts: 1
Default Construcing NetworkCredential from WindowsIdentity



Well - I'm using a WebApp (ASP.NET) as frontend (hosted by primary server).
Here I have full access to my Identity (WindowsIdentity).

Now - the frontend is calling into a business component (BC). This BC is
therefore being called from within ASP.NET and thereby instantiated with the
current identity (that's either ASPNET Machine account or the user
impersonated).

For the business component to acess the Exchange Server in my datatier, I'm
using a component from IndependentSoft (WebDav.NET for Exchange). This
requires my to connect using a ICredential interface. I do NOT have access
the the current uses password, hence I can not create an instance of a
NetworkCredential object.

Therefore my question.
The CredentialCache.DefaultCredentials is empty. Should the frontend be
adding something into the cache here or what..?


Thanks a lot!

/Claus
  Reply With Quote
3 11th August 10:46
joe kaplan mvp - adsi
External User
 
Posts: 1
Default Construcing NetworkCredential from WindowsIdentity


If you have a WindowsIdentity/WindowsPrincipal for the user, you should be
able to impersonate that WindowsIdentity and then use
CredentialCache.DefaultCredentials to get an ICredential. You can use that
for calling the remote resource.

The main issue here is that you will also most likely need Kerberos
delegation in this scenario in order for your credentials to hop to a remote
machine.

http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerberr.mspx
http://msdn.microsoft.com/vstudio/using/building/web/default.aspx?pull=/library/en-us/dnnetsec/html/SecNetHT05.asp?FRAME=true#ImplementKerberos

HTH,

Joe K.
  Reply With Quote
4 11th August 12:15
claus konrad
External User
 
Posts: 1
Default Construcing NetworkCredential from WindowsIdentity


Okay - I'll give it a shot!
Thanks for the info.
  Reply With Quote


 


Reply






Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666