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

Tip: Looking for answers? Try searching our database.

I must be Stupid: Cannot get authorization extension to work at all

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Hancock - 30 Mar 2006 21:00 GMT
I must be really stupid or something, because I cannot get this to work at
all.

I have the following in my policy file:

<policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy">

<extensions>

<extension name="authorization"
type="Microsoft.Web.Services3.Design.AuthorizationAssertion,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />

<extension name="compressionAssertion"
type="Evolution.Web.Services.CompressionAssertion, Evolution.Web.Services"/>

<extension name="usernameAssertion"
type="Evolution.Web.Services.UsernameServiceAssertion,
Evolution.Web.Services" />

<extension name="wse3Trace" type="WSETracingFilter.WSEFilterAssertion,
WSETracingFilter, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=aa253a6b9020c4eb"/>

</extensions>

<policy name="RegistrationPolicy">

<authorization>

<allow role="Registration"/>

<deny role="*"/>

</authorization>

<protection>

<request signatureOptions="IncludeAddressing, IncludeTimestamp,

IncludeSoapBody" encryptBody="true" />

<response signatureOptions="IncludeAddressing, IncludeTimestamp,

IncludeSoapBody" encryptBody="true" />

<fault signatureOptions="IncludeAddressing, IncludeTimestamp,

IncludeSoapBody" encryptBody="false" />

</protection>

<requireActionHeader />

<compressionAssertion compressionMode="BZip2" compressionLevel="Maximum"
threshold="128"/>

<usernameAssertion />

</policy>

</policies>

I use my own usernameAssertion that works great so long as the person passes
the assertion with the web service request. However if the person just goes
into their browser and navigates to the web service's page, even with the
stuff at the top for authorization, it merrily allows access and processes
the request no problem.

I really really really need to get this working so that you have to pass
credentials and the documentation is ZERO HELP.  What am I doing wrong? My
security assertion that I wrote simply never gets called in the case where
the user uses their browser for the request.  The authorization stuff in my
policy file does ABSOLUTELY NOTHING as far as I can tell. What gives?

All I want is to force it to use my custom assertion at all times, no matter
what. I don't give a damn about roles or anything like that, all I care is
that the user validates against my login and password table with a
UserNameToken. Nothing else. Even my UserNameTokenManager doesn't get called
at all when the requst is from a web browser.

Are there any samples to getting this stuff working? Any very specific
suggestions on what I'm doing wrong and how to specfically fix it? Anything,
please.  WSE is about as easy as quantum mechanics while you've got a 3.0%
blood alcohol reading. And that's when you're sober, which this stuff makes
you want to go out and drink!

Please help,

James Hancock
Pablo Cibraro - 31 Mar 2006 14:59 GMT
Hi James,

You have to disable some protocols for the web service,

<system.web>
 <webServices>
  <!-- uncomment for production use -->
  <protocols>
   <remove name="HttpGet"/>
   <remove name="HttpPost"/>
   <remove name="Documentation"/>
  </protocols>
 </webServices>
</system.web>

More information about this on the Julie Lerman blog,

http://www.thedatafarm.com/blog/PermaLink.aspx?guid=a564b67f-6162-460a-a8ee-44b9
167938e0


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

>I must be really stupid or something, because I cannot get this to work at
>all.
[quoted text clipped - 88 lines]
>
> James Hancock
James Hancock - 01 Apr 2006 23:56 GMT
Wow, that was easy. Thank you!!!

> Hi James,
>
[quoted text clipped - 112 lines]
>>
>> James Hancock

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.