Re: Custom UsernameTokenManager for different webservices



Hi Damian,

You have two workarounds to that problem,

1. You can host the set of web services in a different virtual directory
with a different configuration
2. You can use the addressing headers to determine the URL for the target
service, and use a different authentication mechanism according to that.

For example

protected override string AuthenticateToken( UsernameToken token )
{
if(SoapContext.Current.Addressing.To.Value == http://service1.asmx)
//Authenticate the user against a database
else if(SoapContext.Current.Addressing.To.Value ==
http://service2.asmx)
//Authenticate the user against windows
}

Other solution is to use the brokered authentication pattern:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/WSS_Ch1_BrokAuthSTS.asp

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

"Damian" <damian.gonsalves@xxxxxxxxx> wrote in message
news:1144756906.358073.4120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi There

Is it possible to specifiy which custom usernametokenmanager to use for
individual webservices?

I currently have some webservices that are consumed by a smartclient,
for which i use a custom usernameTokenManager to autheticated against
our uses db. This works wonderfully at the moment!
But now i have another system which needs to consume a different set of
webservices in my application but i need to authenticate against
another source.

Any ideas?

Thanks very much
Damian



.



Relevant Pages

  • Re: Windows Authentication, Single sign on and Active Directory
    ... your web server is probably a workgroup mode machine. ... Co-author of "The .NET Developer's Guide to Directory Services ... web service proxy client fails to connect due to authentication failure ... Windows authentication on the web services. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Windows Authentication, Single sign on and Active Directory
    ... web service proxy client fails to connect due to authentication failure ... the web services anyway, as it is generally important to protect any ... web server is also a member of the domain). ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Architecture Advice
    ... WSE3 is only a framework that adds WS-* support to the Web services stack. ... WS-Federation with SAML has the following benefits over Kerberos: ... Could you point out the benefits of sts over Kerberos authentication in ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Trying to determine best strategy for web service security
    ... I would check out the Hands On Labs for WSE 2.0. ... > I have a group of web services which provide a facade for a COM+ ... The only clients of the web services will be ASP.NET ... > What I would like to have is an authentication web service that would ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Windows Authentication, Single sign on and Active Directory
    ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... your web server is probably a workgroup mode machine. ... web service proxy client fails to connect due to authentication failure ... Windows authentication on the web services. ...
    (microsoft.public.dotnet.framework.aspnet.security)