Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 4 - Automating Security with Policies in Web S...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Automating Security with Policies in Web Services
By: MSDN Virtual Labs
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2006-07-27

    Table of Contents:
  • Automating Security with Policies in Web Services
  • Requiring Security Features with a Policy
  • Adding Security Features with a Policy on the Client
  • Adjusting Policy Details (Encrypting a usernameToken)

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Automating Security with Policies in Web Services - Adjusting Policy Details (Encrypting a usernameToken)


    (Page 4 of 4 )

    In this step, you're going to adjust both policy statements to enforce/require encrypting the UsernameToken that contains the plain text password. 

    1. Open policyCache.config in the PolicyInvoiceClient project.
    2. Locate the first <Confidentiality> element and update the <MessageParts> child element to contain the wse:UsernameToken() message part as illustrated here:

      ...
      <wssp:Confidentiality wsp:Usage="wsp:Required"> 
        <wssp:KeyInfo> 
          <wssp:SecurityToken>
           ... 
          </wssp:SecurityToken>  
        </wssp:KeyInfo> 
        <wssp:MessageParts Dialect= "
      wsp:Body">http://schemas.xmlsoap.org/ 2002/12/wsse#part">wsp:
      Body
      ()
            wse:UsernameToken()</wssp:MessageParts> </wssp:Confidentiality>
      ...

    3. Save policyCache.config.
    4. Run PolicyInvoiceClient and test invoking an operation. Verify that everything works.
    5. Open OutputTrace.webinfo in the PolicyInvoiceClient output directory (bin) and verify that the UsernameToken element is now encrypted. 
    6. Click File | Close Solution.

      Note: by using policies, you've been able to implement the same security features from the first two exercises without having to write any code.

    Please check back next week for the continuation of this article.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · We hope you found this exercise from MSDN Virtual Labs to be educational and...
     

    VISUAL BASIC.NET ARTICLES

    - Creating and Drawing a Game Map in VB.NET
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway