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 / June 2005

Tip: Looking for answers? Try searching our database.

validating security token when only username is specified

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MAHESH MANDHARE - 10 Jun 2005 06:24 GMT
Hi,
I am using Custom UsernameTokenManager class in my project
i have overridden authenticatetoken method in username tokenmanager class
and configured this custom tokenmanager in web.config
but when i do not send password in username token. it doesn't call
authenticate method.so i need  to take Soapcontext to check for username
token and hence has to do this at the start of every method.

i want to know is there any way to validate security token in custom token
manager only when only username is specified.
when only username is specified wse skips authenticatetoken method

I am using wse2.0(Sp3).

Signature

Have A Good Day,
Mahesh,
Maheshmandhare@yahoo.co.in

William Stacey [MVP] - 10 Jun 2005 11:10 GMT
You will notice you can set a null or "" empty pw in UT constructor.
However you can pass a " " space or spaces.  It appears, however, that the
either the server side or client side does a Trim() on the SendPlainText pw
(not sure which).  However, it is clear that the server side conciders empty
password string to be invalid and does not attempt to start the
Authenticator.  This was probably a security concern.  Naturally, you have
to wonder what the point of a empty password is to begin with.  However,
Windows accounts allow an empty password, so one would think it should work
the same way for WSE.  Moreover, not sure the Trim() behavior is correct
here as I may indeed what to have leading/trailing spaces in a password for
some reason.  As a workaround, if the client password is really "" empty,
then pass something like "Empty" instead (or some other const string that
both sides agree on).

Signature

William Stacey [MVP]

> Hi,
> I am using Custom UsernameTokenManager class in my project
[quoted text clipped - 9 lines]
>
> I am using wse2.0(Sp3).
William Stacey [MVP] - 10 Jun 2005 11:29 GMT
Another inconsistency is you can, in fact, send a " " space when the
password type is SendHashed and the Authenticator will be called.   Empty
string should probably be allowed across the logic on both sides to at least
make things consistent.

Signature

William Stacey [MVP]

> You will notice you can set a null or "" empty pw in UT constructor.
> However you can pass a " " space or spaces.  It appears, however, that the
[quoted text clipped - 24 lines]
>>
>> I am using wse2.0(Sp3).
Yedu - 17 Jun 2005 01:42 GMT
In WSE 2.0 you can do this by defining a custom security filter class derived
from the 'SecurityInputFilter' class and override the ProcessMessage()
function, in your classes processMessage() function check the SoapEnvelope to
see if the password is not null or empty and then call base.ProcessMessage()
( this will do the Authnetication/Authorization for you), if password is
empty then skip the call to base.processmessage().
Also change web.config to define your CustomFilter.

The filter will be called everytime a call is made to any of the WebMethod
in the WS.

> Hi,
> I am using Custom UsernameTokenManager class in my project
[quoted text clipped - 9 lines]
>
> I am using wse2.0(Sp3).

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.