ARTICLE

Secure WS

Posted by Daniel Stefanescu Articles | Visual Basic 2010 May 17, 2004
This code covers the .NET (VB) implementation of the security of webservices using the Microsoft “The Favorites Service” security modified schema.
Download Files:
 
Reader Level:

Description.

This code covers the .NET (VB) implementation of the security of webservices using the Microsoft "The Favorites Service" security modified schema.

Let's explain how "The Favorites Service" security schema (implemented in C++): the user passes the login and the password using SSL to the Logon method and receives a one-hour valid key. After that, each method is called with this one-hour valid key as parameter and with the rest of parameters. To reduce the possibility to overload the traffic between web server and database by flooding the web service with requests with invalid keys, the web service determines if the key is generated by the web service. If the key is ok then the method is served. The only risk to break this security is to somebody sniff the key and to use it in one hour maximum.

The code implements the generation, validation and the usage of the (hashed) keys in VB.NET. Trying to reduce the above security risk I changed the secret with the IP address of the request. So, the "bad guy" must be able to sniff the key in addition to spoof the IP web service's client (or to be behind the same proxy).

A little background (from MSDN): The hash is used as a unique value of fixed size representing a large amount of data. Hashes of two sets of data should match if and only if the corresponding data also matches. Small changes to the data result in.






Unzip the source code file into a folder and make it Virtual directory through Internet Services Manager.

share this article :
post comment
 
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Become a Sponsor