Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / January 2007

Tip: Looking for answers? Try searching our database.

Propagating caller identity across applications from a bare ASMX Service method to a WSE3 Service method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Howard Hoffman - 09 Jan 2007 23:12 GMT
We've a set of WSE3 / ASMX Services in an application.  Currently, the
application is configured to use KerberosSecurity.
We've now got a new customer that is only running .NET 1.1.  For purposes of
discussion, our WSE3 / ASMX application is closed for interface changes or
extension (e.g. I cannot add a new ASMX into it that does not use WSE3).

Since .NET 1.1 cannot directly call a WSE3 Web Service, our thought is to
create a Shim ASMX web service (separate application) on .NET 2.0 that
forwards calls from the .NET 1.1 clients over to the WSE3 / ASMX Service
application.

So, there are multiple hops involved:

Browser client to .NET 1.1 app (Windows authorization, <identity impersonate
= "true" />)
.NET 1.1 app to shim .NET 2.0  ASMX (Windows authorization, <identity
impersonate = "true" />).
shim .NET 2.0 ASMX to WSE3 / ASMX Service (Windows authorization,
KerberosSecurity).

For this test, all applications are running on the same computer (W2K3).
Both .NET 2.0 applications are running in the same non-default App Pool,
which uses a Domain Account for which we've run the SETSPN utility to set up
the Service Principal correctly.  The .NET 1.1 application is running in a
different non-default App Pool, but is using the same Domain Account for its
identity.

Basically, it get the dreaded WSE594 error trying to call the WSE3 / ASMX
Service.

My goal is to be able to perform authorization checks on the user running
the browser at each hop.  Is this possible given the .NET 1.1 / .NET 2.0 mix
I've got?

Thanks in advance,

Howard Hoffman
Steven Cheng[MSFT] - 10 Jan 2007 07:07 GMT
Hello Howard,

Glad to see you again.

Seems you're still struggling with the multi-tier webservice authentication
issue.  As you described here, your original architecture is

client browser <---> web application <---> end webservice  (windows
authentication)

and currently, due to some asp.net web application is using .NET 1.1(can
not afford wse 3.0). You adjust the architecture as below:

client browser <---> web application<-->proxy webservice<--->end  
webservice (windows authentication).

I think forwarding the windows security identity from client browse to the
end webservice(accross all the intermediate services) is quite difficult.
To do this, all the computers (from client to end services and intermeidate
server) should be in the same local domain or trusted domain. And they need
to be configured so as to use kerberos delegation. Configuring kerberos
delegation including configrue all the possible client accounts and all the
server account and machines which will peform delegation. Just the same as
configuring double hop scenario for ASP.NET application.

#How to configure an ASP.NET application for a delegation scenario
http://support.microsoft.com/kb/810572/en-us

Have all the application and services in your scenario been configured for
kerberos delegation? For configuration specific problem, there is a
document for troubleshooting kerberos delegation

#Kerberos authentication and troubleshooting delegation issues
http://support.microsoft.com/kb/907272/en-us

And as you mentioned, currently you put all the services on the server
machine, is this also the topology in production enviroment?  If not, I
suggest you make other serivces on a separate machine with the ASP.NET web
application. Because if they're on the same machine, the windows identity
in ASP.NET web application can be forwarded to other services on the same
machine without using kerberos delegation.

In addition, I'm not sure whether using kerberos delegation and windows
authentication across all the hops is a must-to-use approach for your
scenario. For windows 2003 domain, there has provided a constrained
delegation and S4U type token that can help the server generate a windows
security token(the windowsIdentity class in .net framework) without
password(only the user principal name is necessary).  Thus, it opens a way
for N-TIER application which need flow security identity/context across
multi application/services. Here are some MSDN reference describing on
this, I think this is also an option you can consider.

#How To: Use Protocol Transition and Constrained Delegation in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998355.aspx

#Exploring S4U Kerberos Extensions in Windows Server 2003
http://msdn.microsoft.com/msdnmag/issues/03/04/SecurityBriefs/default.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
Howard Hoffman - 10 Jan 2007 15:24 GMT
Steven -

Thanks for the quick reply.  I'm familiar with the articles you mention, but
I'll re-read them to see if I've missed something (probably have missed a
few things).

In production, I will be able to have the Proxy Web service on the same
computer as the End Web Service.  We control that configuration.  Our
understanding is that all the client accounts will be in the same Active
Directory Domain as the server computer and the server App Pool run-as
account.

Unfortunately, the 'edge' web application is not controlled by us -- its a
customer authored application -- and it sits on a different computer.  That
computer and its App Pool run-as account (which is probably Network Service)
are not controlled by us.

I'll have to check whether the customer is running Active Directory in
Windows 2003 Server mode -- they may be in Windows 2000 mixed mode.

Howard

> Hello Howard,
>
[quoted text clipped - 88 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Steven Cheng[MSFT] - 12 Jan 2007 02:46 GMT
Thanks for your reply Howard,

Yes, some of the articles I've ever refered in some previous threads. For
the S4U/constrained delegation, you can consider using it in your own
service-side(can won't affect the edge service on your partner's side).
That means, you can let your partner call your service and pass windows
identity in your first proxy service, you no longer need to pass the full
identity/credentials. Just pass the user principal name and at your backend
service, just generate a windowsIdentity through the user principal name(as
described in the constrained delegation reference).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.