Security
  Home arrow Security arrow Page 3 - Safeguarding the Identity and Integrity of XML Messages
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
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? 
Google.com  
SECURITY

Safeguarding the Identity and Integrity of XML Messages
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 7
    2004-09-09


    Table of Contents:
  • Safeguarding the Identity and Integrity of XML Messages
  • XML Signature Fundamentals
  • XML Signature Structure
  • Types of XML Signatures
  • The Signature Element Schema
  • XML Signature Processing
  • XML Signature Validation
  • The XML Signature Elements
  • Canonicalization Actions from Canonical XML Version 1.0
  • The SignatureMethod Element
  • The Reference Element
  • The Transform Element
  • XPath Filtering Transform
  • Enveloped Signature Transform
  • XPath Filter 2.0 Transform
  • The DigestMethod Element
  • The Object Element
  • The Manifest Element
  • The KeyInfo Element
  • Security Strategies for XML Signature
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Safeguarding the Identity and Integrity of XML Messages - XML Signature Structure
    ( Page 3 of 21 )

    In the following sections, we review the XML Signature element's basic structure and discuss its most significant aspects. We stay high level at first and then provide more detail further into the chapter.

    Basic Structure

    Before we delve deeply into the syntax of the Signature element, let's discuss it in concept first. At a very basic level, an XML Signature contains four major items, with the third and fourth being optional:

    1. A set of pointers (references) to things to be signed

    2. The actual signature

    3. (Optional) The key (or a way to look up the key) for verifying the signature

    4. (Optional) An Object tag that can contain miscellaneous items not included in the first three items

    The syntax of the Signature element is shown in Listing 4.1.

    Listing 4.1 The Syntax of the <Signature> Element

    <Signature>
      <SignedInfo>
        (CanonicalizationMethod)
        (SignatureMethod)
        (<Reference (URI=)? >
          (Transforms)?
          (DigestMethod)
          (DigestValue)
        </Reference>)+
      </SignedInfo>
      (SignatureValue)
      (KeyInfo)?
      (Object)*
    </Signature>

    Listing 4.2 is a highly oversimplified XML Signature snippet to give you a feel for what an XML Signature might look like if it is cut down to its bare essence.

    Listing 4.2 A Highly Simplified XML Signature Snippet

    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
     <SignedInfo>
      <Reference URI="
    http://www.foo.com/secureDocument.html" />
     </SignedInfo>
     <SignatureValue>...</SignatureValue>
     <KeyInfo>...
     </KeyInfo>
    </Signature>

    In this example, the three children of the Signature element are the SignedInfo element, the SignatureValue element, and the KeyInfo element. The SignedInfo element contains information about what is being signed, the SignatureValue element contains the actual signature bits, and the KeyInfo element contains information about the public key needed to validate this digital signature. Of course, this example is highly simplified; there is more detail to each of these elements, and there are more elements to discuss. However, these are the most significant three elements within a typical XML Signature.

    Specifying the Items Being Signed

    The set of pointers, represented by the Reference element, can point to an internal resource in the XML document, in which case they point to an XML node, or they can be external. If they are external, they can point to a binary or non-XML file (for example, an image or text document), or they can point to another XML document or even a node within another XML document. We discuss this usage in more depth in the section titled "The Reference Element." The content behind these references is what is being signed.

    Understanding this reference concept is important because it can affect the meaning and usage of XML Signatures substantially. Most descriptions of XML Signature describe three classifications of XML Signatures: Enveloping, Enveloped, and Detached. Each reflects where the Reference element is pointing. Let's go through these three types of XML Signatures and then come back to that point.

    SamsThis chapter is from Securing Web Services Security with WS-Security, by Jothy Rosenberg and David Remy (Sams, 2004, ISBN: 0672326515). Check it out at your favorite bookstore today.

    Buy this book now.



     
     
    >>> More Security Articles          >>> More By Sams Publishing
     

       

    SECURITY ARTICLES

    - Critical Microsoft Visual Studio Security Pa...
    - US Faces Tech Security Expert Deficit
    - LAN Reconnaissance
    - An Epilogue to Cryptography
    - A Sequel to Cryptography
    - An Introduction to Cryptography
    - Security Overview
    - Network Security Assessment
    - Firewalls
    - What’s behind the curtain? Part II
    - What’s behind the curtain? Part I
    - Vectors
    - PKI: Looking at the Risks
    - A Quick Look at Cross Site Scripting
    - PKI Architectures: How to Choose One





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek