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 / October 2006

Tip: Looking for answers? Try searching our database.

Multiple Policies from one Web Service ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Howard Hoffman - 07 Jul 2006 20:55 GMT
I've a WSE3 WebService that, for a particular customer, will be used by two
types of clients -- one that is within the corporate firewall and one that
is outside the corporate firewall.

For the former, we use Kerberos Security, and the latter we are developing
toward UsernameForCertificate.

Is there anyway we could conceivably combine the two in a single web
service?  I think this is the range of options we are looking at:

1) Two separate application installations; one uses KerberosSecurity policy,
one uses UsernameForCertificate policy.
2) Two separate web services within the one single application; one uses
KerberosSecurity policy; one uses UsernameForCertificate policy -- there is
a single wse3policyCache.config file for the application with 2 separate
<policy>elements.  There is a single <extensions> element that contains both
the usernameForCertificateSecurity assertion and the kerberosSecurity
assertion.
3) Use UsernameForCertificate only, install the server's 509 certificate on
all clients.

The additional problem we have is that a released / deployed application
acts as our client for the 'within firewall' case, and it does not create
UsernameToken instances in its code -- it assumes Kerberos.  We almost
certainly cannot re-release / re-deploy that application in time for our
need.

Thanks in advance,

Howard Hoffman
Steven Cheng[MSFT] - 10 Jul 2006 07:41 GMT
Hi Howard,

Thank you for posting in the MSDN newsgroup.

From your description, you're developing an ASP.NET webservice which is
secured through the WSE 3.0 policy assertions. However, since there are
multiple client service consumers which may be authenticated against
different mode(username or kerberos token), you're wonding what is the
better means to applied both the two authentication mechanism into the your
server-side service, correct?

Based on my understanding, WSE policy assertion is statically bound to a
webservice at compilation time(for server-side service) and a single
service(an asmx endpoint)  can only  to configured to use a single
authentication mechanism.  

For your scenario, you have multiple client applications which will use
different security token for authentication(also you mentioned that some
client has already been released and hard to rebuild or redeploy), I think
you can consider creating two separate service endpoints(two asmx ), and
configure them to use different security policy respectively.

Also, since WSE's security feature (authenitcation, encrypting, signing )
is done at message level rather than transport level, it won't rely on the
underlying hosting environment(like IIS...), you can put the two service
endpoints in a single ASP.NET webservice application.

Just some of suggestion. If you have any other consideration or ideas,
please feel free to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead

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

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

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

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

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Howard Hoffman - 10 Jul 2006 13:25 GMT
Thanks Steven.

We're going to explore running 2 seperate web service application
installations.  Our web service has just one endpoint, and it's not possible
for us to add a 2nd endpoint for one customer.

Howard

> Hi Howard,
>
[quoted text clipped - 45 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Steven Cheng[MSFT] - 11 Jul 2006 03:30 GMT
Thanks for your followup Howard,

I understand your decision since you would like to avoid creating a new
service endpiont(asmx) in the application and just reuse the existing
application(redeploy it with a different WSE policy). I do agree that this
is a tidy and clean solution. As always, if you meet any further problem or
there is any thing else we can help, please don't hesitate to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead

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

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

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

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

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Andy Neilson - 17 Jul 2006 14:58 GMT
It is possible to create a policy choice assertion filter that can choose
among several configured policies. It is quite straightforward to implement.
While you can implement it, the lack of official support for such a mechanism
will probably mean a lack of support in tools and related technologies (e.g.,
attempting to exchange that security policy metadata is probably not going to
work using out-of-the-box tools). You can do it, but you'll be swimming
against the tide.

The support for multiple policies at a single endpoint was supported in some
earlier versions of WSE, where the policy description was much more complex,
but it was notably absent from the simplified turnkey security policy
mechanism in WSE 3.0.
Steven L - 02 Aug 2006 23:16 GMT
Howard - how have you got on with this one?

I ran into this tonight and whilst both work great for me independently, i'd
rather just be able to say "if token is KerberosToken ... else if token is
UserToken ..."

I can see you can derive from SecurityPolicyAssertion, so cuold this not be
used to manually do this work depending on the token you are provided with?

Sounds like a heck of a lot of work, but the alernative of having
"internal.asmx" and "external.asmx" just doesn't feel right considering they
are the same "thing".

Sure, at the moment the differentiator is their authentication process, but
who know what other differentiators may come along and it sounds crazy to
create further endpoints to support this.

I'd rather (if possible) have something akin to a polymorphic security
assertion which is smart enough based on some config to use the "provider"
that does the security work (or whatever may come along). Then maybe i'm
missing something.

I'd be real interested in how you are getting/got on.

Regards,
Steven
http://stevenR2.com

> I've a WSE3 WebService that, for a particular customer, will be used by two
> types of clients -- one that is within the corporate firewall and one that
[quoted text clipped - 26 lines]
>
> Howard Hoffman
Arun - 13 Oct 2006 19:28 GMT
> I've a WSE3 WebService that, for a particular customer, will be used by two
> types of clients -- one that is within the corporate firewall and one that
[quoted text clipped - 26 lines]
>
> Howard Hoffman

Hi,
      I am also facing a simlar issue with a single web service that needs to support multiple policies. It would be helpful to know as to how you solved this.
Regrads,
Arun

Posted from http://www.topxml.com/renntp using reNNTP: the website based NNTP reader.

Rate this thread:







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.