.net - Passing Windows Token to WCF then from WCF to another server in the AD domain -


this may doozy, have idea how to:

pass users windows token (authenticated domain) wcf service called - service perform action based on users windows credentials made call.

ie: client -> wcf -> 3rd party repository integrates active directory.

i have wcf data tier responsible returning of data - customer makes calls service. service retrieves documents repository. customer accomplish managing of accounts ad sincee repository supports ad integration.

any appreciated - thank :-)

---------- update have followed jezell's article still have issues.

i want use upn opposed spn (so account can locked down , more secure), im not sure i've got wrong.

i have created spn's on ad server (tried every combination, no duplicates)

here code snippet, maybe has idea of im doing wrong.

dim binding new nettcpbinding() binding.security.mode = securitymode.message binding.security.message.algorithmsuite = system.servicemodel.security.securityalgorithmsuite.basic128 binding.security.message.clientcredentialtype = messagecredentialtype.windows  dim upn string = "usertest@testdomain.com"  dim ep new endpointaddress(new uri("net.tcp://server1.testdomain.com:1111/servicetest") _     , endpointidentity.createupnidentity(upn))  dim factory new channelfactory(of credential.interface.icredentialtest)(binding, ep) factory.credentials.windows.allowntlm = false factory.credentials.windows.allowedimpersonationlevel = system.security.principal.tokenimpersonationlevel.delegation  dim iproxy credential.interface.icredentialtest = factory.createchannel() dim co icommunicationobject = ctype(iproxy, icommunicationobject) iproxy.toservice(result) 

now error: 'the identity check failed outgoing message. expected identity is... can find on relates using certificates, im not doing.

thanks :-)

this known delegation. set allowed impersonation level in client configuration "delegation" , disable ntlm authentication on server side. have post more in depth discussion here:

http://www.iserviceoriented.com/blog/post/delegation+-+wcf+gotcha+2.aspx


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -