CARVIEW |
SOAP Version 1.2 Message Normalization
W3C Working Group Note 8 October 2003
- This version:
- https://www.w3.org/TR/2003/NOTE-soap12-n11n-20031008/
- Latest version:
- https://www.w3.org/TR/soap12-n11n/
- Previous version:
- https://www.w3.org/TR/2003/NOTE-soap12-n11n-20030328/
- Editors:
- Martin Gudgin, Microsoft
- Marc Hadley, Sun Microsystems
Copyright ©2003 W3C®(MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
Abstract
SOAP 1.2 intermediaries have some license when reserializing messages that pass through them. This document defines a transformation algorithm that renders all semantically equivalent SOAP messages identically. The transformation may be used in conjunction with an XML canonicalization algorithm prior to the generation of a message digest in producing XML digital signatures that are sufficiently robust to survive passage through one or more SOAP intermediaries.
Status of this Document
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document is the work of the W3C XML Protocol Working Group, and no more work from this Working Group is currently expected on this document.
The XML Protocol Working Group is part of the Web Services Activity.
Comments on this document should be sent to the publicly archived mailing list xml-dist-app@w3.org
Patent disclosures relevant to this specification may be found on the Working Group's patent disclosure page.
Table of Contents
1. Introduction
1.1 Notational Conventions
2. The Need for SOAP Message Normalization
2.1 A Simple Example
3. Specification of SOAP Message Normalization
4. Use in XML Security
5. References
5.1 Normative References
5.2 Informative References
Appendices
A. XSLT Implementation (Non-Normative)
B. Acknowledgements (Non-Normative)
1. Introduction
SOAP 1.2 [SOAP Part1] intermediaries have some license when reserializing messages that pass through them. Current XML canonicalizations (see [XML C14N] and [EXCL C14N]) do not take into account the transforms that a SOAP intermediary can legally apply to messages passing through it. This document defines a transformation that renders all semantically equivalent SOAP messages identically. This transformation may be used in conjunction with an XML canonicalization algorithm prior to the generation of a message digest in producing XML digital signatures that are sufficiently robust to survive passage through one or more SOAP intermediaries.
1.1 Notational Conventions
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119].
This note uses a number of namespace prefixes throughout; they are listed in Table 1. Note that the choice of any namespace prefix is arbitrary and not semantically significant (see [XML InfoSet]).
Prefix | Namespace | Notes |
---|---|---|
env | "https://www.w3.org/2003/05/soap-envelope" | A normative XML Schema [XML Schema Part1], [XML Schema Part2] document for the "https://www.w3.org/2003/05/soap-envelope" namespace can be found at https://www.w3.org/2003/05/soap-envelope. |
Namespace names of the general form "https://example.org/..." and "https://example.com/..." represent application or context-dependent URIs (see [RFC 2396]).
All parts of this note are normative, with the exception of examples and sections explicitly marked as "Non-Normative".
2. The Need for SOAP Message Normalization
2.1 A Simple Example
As a simple example of the kind of problem a SOAP intermediary can cause for an XML signature, consider the following SOAP message:
<env:Envelope xmlns:env="https://www.w3.org/2003/05/soap-envelope"> <env:Header> <n:alertcontrol env:mustUnderstand="false" xmlns:n="https://example.org/alertcontrol"> <n:priority>1</n:priority> <n:expires>2001-06-22T14:00:00-05:00</n:expires> </n:alertcontrol> </env:Header> <env:Body> <m:alert xmlns:m="https://example.org/alert"> <m:msg>Pick up Mary at school at 2pm</m:msg> </m:alert> </env:Body> </env:Envelope>
A SOAP intermediary is at liberty to remove the
env:mustUnderstand
attribute from SOAP header blocks
when its value is "false" or "0".
If the message included a signature of the header block
generated using XML Canonicalization [XML C14N] or
Exclusive XML Canonicalization [EXCL C14N] then
that signature would be invalidated if the intermediary removed
the mustUnderstand
attribute. There is therefore a
requirement for a transformation that takes into account the
variations that a SOAP intermediary can introduce. SOAP Message
Normalization fulfils this requirement.
3. Specification of SOAP Message Normalization
SOAP Message Normalization is specified as an XML infoset transformation and consists of the following steps:
A SOAP
Header
element information item that has no child element information items is removed.-
If a SOAP
Header
element information item is present then for each child element information item of the SOAPHeader
element information item:If the SOAP
mustUnderstand
attribute information item is present with a value of "0" or "false" then remove themustUnderstand
attribute information item.If the SOAP
mustUnderstand
attribute information item is present with a value of "1" then change its value to "true".If the SOAP
role
attribute information item is present with a value of "https://www.w3.org/2003/05/soap-envelope/role/ ultimateReceiver" or "" then remove therole
attribute information item.If the SOAP
relay
attribute information item is present with a value of "0" or "false" then remove therelay
attribute information item.If the SOAP
relay
attribute information item is present with a value of "1" then change its value to "true".
Processing instruction information items that are children of the SOAP
Envelope
,Header
,Fault
,Code
,Subcode
,Value
,Reason
,Text
,Node
andRole
element information items are removed.Whitespace character information items that are children of the SOAP
Envelope
,Header
,Fault
,Code
,Subcode
,Value
,Reason
,Node
andRole
element information items are removed.
4. Use in XML Security
SOAP Message Normalization may be used as a Transform
algorithm in XML Digital Signature [XML DSig]. Use of
a separate CanonicalizationMethod
such as XML
Canonicalization [XML C14N] or Exclusive XML
Canonicalization [EXCL C14N] is required. SOAP
Message Normalization is identified with the following URI:
"https://www.w3.org/2003/10/soap12-n11n"
5. References
5.1 Normative References
- [SOAP Part1]
- W3C Recommendation "SOAP Version 1.2 Part 1: Messaging Framework", Martin Gudgin, Marc Hadley, Noah Mendelsohn, Jean-Jacques Moreau, Henrik Frystyk Nielsen, 24 June 2003. (See https://www.w3.org/TR/2003/REC-soap12-part1-20030624/.)
- [RFC 2119]
- IETF "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels", S. Bradner, March 1997. (See https://www.ietf.org/rfc/rfc2119.txt.)
- [RFC 2396]
- IETF "RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax", T. Berners-Lee, R. Fielding, L. Masinter, August 1998. (See https://www.ietf.org/rfc/rfc2396.txt.)
- [XML Schema Part1]
- W3C Recommendation "XML Schema Part 1: Structures", Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, 2 May 2001. (See https://www.w3.org/TR/2001/REC-xmlschema-1-20010502/.)
- [XML Schema Part2]
- W3C Recommendation "XML Schema Part 2: Datatypes", Paul V. Biron, Ashok Malhotra, 2 May 2001. (See https://www.w3.org/TR/2001/REC-xmlschema-2-20010502/.)
- [Namespaces in XML]
- W3C Recommendation "Namespaces in XML", Tim Bray, Dave Hollander, Andrew Layman, 14 January 1999. (See https://www.w3.org/TR/1999/REC-xml-names-19990114/.)
- [XML 1.0]
- W3C Recommendation "Extensible Markup Language (XML) 1.0 (Second Edition)", Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, 6 October 2000. (See https://www.w3.org/TR/2000/REC-xml-20001006.)
- [XML InfoSet]
- W3C Recommendation "XML Information Set", John Cowan, Richard Tobin, 24 October 2001. (See https://www.w3.org/TR/2001/REC-xml-infoset-20011024/.)
- [XML C14N]
- W3C Recommendation "Canonical XML", John Boyer, 15 March 2001. (See https://www.w3.org/TR/xml-c14n.)
- [EXCL C14N]
- W3C Recommendation "Exclusive Canonical XML", John Boyer, Donald Eastlake, Joseph Reagle, 18 July 2001. (See https://www.w3.org/TR/xml-exc-c14n/.)
- [XML DSig]
- IETF Draft Standard/W3C Recommendation "XML-Signature Syntax and Processing", D. Eastlake, J. Reagle, and D. Solo, August 2001. (See https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/.)
- [XML Enc]
- W3C Recommendation "XML Encryption Syntax and Processing", Takeshi Imamura, Blair Dillaway, Ed Simon, December 2002. (See https://www.w3.org/TR/xmlenc-core/.)
5.2 Informative References
- [SOAP 1.1]
- W3C Note "Simple Object Access Protocol (SOAP) 1.1", Don Box, David Ehnebuske, Gopal Kakivaya, Andrew Layman, Noah Mendelsohn, Henrik Nielsen, Satish Thatte, Dave Winer, 8 May 2000. (See https://www.w3.org/TR/SOAP/.)