<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: ws-policy-guidelines-20061109.xml,v 1.1 2006/11/20 03:29:01 avedamut Exp $ -->
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.10//EN" "xmlspec.dtd" [
<!ENTITY % entities SYSTEM "entities.dtd" >
%entities;
<!ENTITY status SYSTEM "status-guidelines.xml">
<!ENTITY document.status "Editors' copy $Date: 2006/11/20 03:29:01 $">
<!ENTITY prevloc "">
<!ENTITY hellip "&#8230;">
]>
<?xml-stylesheet type='text/xsl' href='xmlspec-policy.xsl'?>
<spec w3c-doctype="wd" role="&document.role;">
  <header>
    <title>&guideline.title;</title>
    <w3c-designation>&w3c-designation-guidelines;</w3c-designation>
    <w3c-doctype>&document.status;</w3c-doctype>
    <pubdate>
      <day>&draft.day;</day>
      <month>&draft.month;</month>
      <year>&draft.year;</year>
    </pubdate>
    <publoc>
      <loc href="&w3c-designation-guidelines;">&w3c-designation-guidelines;</loc>
    </publoc> &altlocs;
    <!--
	<prevlocs>
            <loc href="&prevloc;">&prevloc;</loc>
        </prevlocs>
-->
    <latestloc>
      <loc href="&guidelines.latest;">&guidelines.latest;</loc>
    </latestloc>
    <authlist>
      <author role="editor">
        <name>Maryann Hondo</name>
        <affiliation>IBM Corporation</affiliation>
      </author>
      <author role="editor">
        <name>Umit Yalcinalp</name>
        <affiliation>SAP AG.</affiliation>
      </author>
    </authlist>
    <abstract>
      <p>
        <emph>&guideline.title;</emph> is a guideline for assertion
        authors that will work with the &framework.title; [<bibref
        ref="WS-Policy"/>] and &attachment.title; [<bibref
        ref="WS-PolicyAttachment"/>] specifications to create domain
        specific assertions. The focus of this document is to provide
        best practices and patterns to follow as well as illustrate
        the care needed in using WS-Policy to achieve the best
        possible results for interoperability. It is a complementary
        guide to using the specifications. </p>
    
    </abstract> &status; 

     <langusage>
      <language id="en-US">English</language>
    </langusage>
    <revisiondesc>
      <p>Last Modified: $Date: 2006/11/20 03:29:01 $</p>
    </revisiondesc>
  </header>
  <body>
    <div1 id="introduction">
      <head>Introduction</head>
      
      <p>WS-Policy specification defines a policy to be a collection
      of policy alternatives, where each policy alternative is a
      collection of policy assertions. <emph>&guideline.title;</emph>
      is a resource primarily for assertion authors that provides
      guidelines on the use of &framework.title; and
      &attachment.title; specifications to create and use domain specific
      assertions to enable interoperability.</p>
			<p>WS-Policy Assertions are XML expressions
      that communicate the requirements and capabilities of a web
      service by adhering to the specification, WS-Policy Framework. It
      was recognized that in order to enable interoperability of web
      services, different sets of WS-Policy Assertions needed to be
      defined by different communities based upon the requirements of
      the web service.
      </p>
			<p>Some policy assertions specify traditional
      requirements and capabilities that will ultimately manifest on
      the wire (e.g., authentication scheme, transport protocol
      selection). Other policy assertions have no wire manifestation
      yet are critical to proper service selection and usage (e.g.,
      privacy policy, QoS characteristics). WS-Policy provides a
      single policy grammar to allow both kinds of assertions to be
      reasoned about in a consistent manner.
      </p>
			<p>The focus of these guidelines is to capture best practices
      and usage patterns for practitioners to follow. It is a
      complementary guide to the Framework and Attachments
      specifications and primer. It is intended to provide
      non-normative guidelines for:
      </p>
			<ulist>
				<item>
					<p>WS-Policy expression authors who need to understand the
          syntax of the language and understand how to build
          consistent policy expressions,
	  </p>
				</item>
				<item>
					<p>WS-Policy assertion authors who need to know the features
          of the language and understand the requirements for
          describing policy assertions.
          </p>
				</item>
				<item>
					<p>Consumers of policy expressions who need to understand
        the requirements contained in policy assertions,
          </p>
				</item>
				<item>
					<p>Providers of policy expressions who need to understand
          how to use the assertions authored by policy assertion
          authors
          </p>
				</item>
			</ulist>
			<p>This document assumes a basic understanding of XML 1.0,
        Namespaces in XML, WSDL 1.1 and SOAP.</p>
			<p>This is a non-normative document and does
        not provide a definitive specification of the Web Services
        Policy framework. <specref ref="xml-namespaces"/> lists all
        the namespace prefixes that are used in this document. (XML
        elements without a namespace prefix are from the Web Services
        Policy XML Namespace.)</p> </div1> <div1 id="Assertions">
        <head>Basic Concepts: What is an Assertion</head>
			<p>An assertion is a piece of metadata that describes a
      capability of a specific WS-Policy domain. Sets of assertions
      are typically defined in a dedicated specification that describe
      their semantics, applicability and scoping requirements as well
      as their data type definition using XML Schema. </p>
			<p>There are already many examples in the industry that adhere
      to this practice, such as <bibref ref="WS-RM-Policy"/>
      and <bibref ref="WS-SecurityPolicy"/>.
      </p>
			<p>Some common characteristics from these documents may be
      considered as <emph>best practices</emph> for new assertion authors:
      </p>
			<ulist>
				<item>
					<p>Specify both the syntax and the semantics of the assertions
               </p>
				</item>
				<item>
					<p>If nested or parameterized assertions are defined,
        be clear about their usage
               </p>
				</item>
				<item>
					<p> Describe the policy subjects the assertions can be
        attached to. 
               </p>
				</item>
			</ulist>
			<p>In this document we will explain why these practices should
      be followed so that the assertion developers defining such a
      specification will be well informed and able to adequately
      specify assertions for their domain.
      </p>
			<p>It is expected that consumers of the metadata specified by
      the assertion authors will also benefit from understanding these
      practices as it will help them utilize the assertions in the
      context of the WS-Policy framework. A result of following the
      best practices will be an assertion specification that describes
      a contract for the consumers and providers of the capabilities
      and constraints of the domain.
      </p>
			<div2 id="assertion-roles">
				<head>Roles and Responsibilities in Utilizing Policy Assertions</head>
				<p>In order for the policy framework to enable communities to
	express their own domain knowledge, it is necessary to provide basic
	functionality that all domains could exploit and then allow
	points of extension where authors of the various WS-Policy
	expressions for a particular domain can provide additional
	semantics.
        </p>
				<p>Below we capture some of the characteristics of the roles
        and responsibilities for the authors, consumers and providers.
        </p>
				<div3 id="domain-owners">
					<head> WS-Policy Authors</head>
					<p> WS-Policy Domain owners or WS-Policy authors are defined
        by the WS-Policy Framework to be a community that chooses to
        exploit the WS-Policy Framework by creating their own
        specification to define a set of assertions that express the
        capabilities and constraints of that target domain. The
        WS-Policy Framework is based on a declarative model, meaning
        that it is incumbent on the WS-Policy authors to define both the semantics of 
        the assertions as well as the
        scope of their target domain in their specification. The set
        of metadata for any particular domain will vary in the granularity of assertion
        specification required.  It is the intent of
        this document to help communities utilize the framework in such
        a way that multiple WS-Policy domains can co-exist and
        consumers and providers can utilize the framework consistently
        across domains.
	</p>
			<p>In order to take advantage of the WS-Policy Framework, any
        domain author attempting to define new WS-Policy assertions
        must adhere to the MUST's and SHOULD's in the specifications
        and should review the conformance section of the
        specification. </p>
        <p>WS-Policy Domain authors must also specify how to associate
	the assertions they have defined with the policy subjects
	identified by the WS-PolicyAttachment specification</p>
        		<p>An example of a domain specification that
        includes these properties can be seen in the WS-SecurityPolicy
        specification [<bibref ref="WS-SecurityPolicy"/>]. The
        WS-SecurityPolicy authors have defined their scope as follows:</p>
					<p>
						<emph>"This document [WS-SecurityPolicy] defines a set of
        security policy assertions for use with the WS-Policy
        framework with respect to security features provided in WSS:
        SOAP Message Security, WS-Trust and
        WS-SecureConversation. This document takes the approach of
        defining a base set of assertions that describe how messages
        are to be secured. Flexibility with respect to token types,
        cryptographic algorithms and mechanisms used, including using
        transport level security is part of the design and allows for
        evolution over time. The intent is to provide enough
        information for compatibility and interoperability to be
        determined by web service participants along with all
        information necessary to actually enable a participant to
        engage in a secure exchange of messages." </emph>
					</p>
					
					<p>An example of scoping individual assertions to policy subjects is also provided by the WS-Security
	Policy specification in Appendix A.</p>
				</div3>
				<div3 id="consumers">
					<head>Consumers</head>
					<p>A consumer of WS-Policy
	Assertions can be any entity that is capable of parsing a
	WS-Policy xml element, and selecting one alternative from the
	policy, that it then uses to govern the creation of a message
	to send to the subject to which the policy alternative was
	attached.  The WS-Policy Attachment specification defines a
	set of attachment models for use with common web service
	subjects: WSDL definitions [<bibref ref="WSDL11" />, <bibref
	ref="WSDL20" />], UDDI directory entries [<bibref
	ref="UDDIAPI20" />, <bibref ref="UDDIDataStructure20" />,
	<bibref ref="UDDI30" />], and WS-Addressing Endpoint
	References (EPR) [<bibref ref="WS-Addressing"/>].
        </p>
					<p> 
	In the degenerate case, a human could read the xml and
	determine if a message could be constructed conformant to the
	advertised policy.
        </p>
					<p>It is expected that consumers of WS-Policy will include a
        wide range of client configurations, from stand alone client
        applications to "active" web service requestors that are
        capable of adapting to the constraints and capabilities
        expressed in a WS-Policy document and modifying their own
        configurations dynamically.
        </p>
				</div3>
				<div3 id="providers">
					<head>Providers</head>
					<p>A provider of WS-Policy
	   Assertions can be any web service implementation that can
	   specify its' on-the-wire message behavior as an XML
	   expression that conforms to the WS-PolicyFramework and
	   WS-Policy Attachment specifications. The
	   WS-PolicyAttachment specification has defined a set of
	   subjects and an extensible mechanism for attaching policies
	   to web services subjects. When a web service provider
	   chooses to make its capabilities and constraints available,
	   it may also need to conform to requirements of other policy
	   specifications it utilizes ( i.e., WS-SecurityPolicy).
           </p>
					<p>When deploying services
           with policies it is uesful for providers to anticipate how
           to evolve their services capabilities over time.  If
           forward compatibility is a concern in order to accommodate
           compatibility with different and potentially new clients,
           providers should refer to <specref ref="lifecycle"/> and
           <bibref ref="WS-Policy-Primer"/> that describes service and
           policy assertion evolution.
	   </p>
				</div3>
			</div2>
		</div1>
		<div1 id="general-guidelines">
			<head>General Guidelines for WS-Policy Assertion Authors</head>
			<div2 id="assertion-target">
				<head>Assertions and Their Target Use</head>
				<p>WS-Policy authors need to have some definition of what the goal is for the assertions
				they author. WS-Policy authors should also understand the
           functionality the WS-Policy framework provides and apply the
           knowledge of framework processing when defining the set of
           assertions. 
           </p>
				<p>Assertions can be simple or they can be complex. WS-Policy authors may choose to specify one or two
           assertions or they may choose to specify many assertion
           elements that require parameters or other nested
           assertions. There are advantages to simplifying the set of
           assertions. The ultimate goal of policy assertions is to
           enable interoperability and assertions that define behavior
           for consumers and providers that can be clearly understood
           will most likely be consumed by a broad audience.
           </p>
				<p>If a domain has a wide range of behaviors, the ability
           to combine individual assertions may also need to be
           considered.
	   </p>
				<p>The number of different subjects to which an assertion
           can be attached is also a factor when defining an
           assertion. Determining the appropriate policy subjects can sometimes
           involve understanding the requirements of  wide range of client configurations, from
           stand alone client applications to "active" web service
           requestors that are capable of modifying their own configurations
           dynamically.
	   </p>
				<p> Once the range of policy subjects
		are identified, there are choices for ways of
		attaching multiple instances of a simple policy
		assertion to multiple subjects. One way is to utilize
		the referencing mechanism that is present in the
		framework. By defining the assertion once and using it
		in different policies (e.g. with different
		alternatives) via reference, a policy assertion may be
		associated with different alternatives and subjects. A
		referencing mechanism is very useful in a tooling
		environment; when creating a domain specific
		attachment in multiple WSDL files or Endpoint
		References in which the same set of policies are
		expected to be applied. 
	   </p>
				<p>In summary, WS-Policy domain authors should consider the following
	   factors when composing the set of domain assertions as it
	   may make sense to factor out some assertions that can be
	   used by multiple subjects:
           </p>
				<ulist>
					<item>
						<p>
							<emph>The definition of the
            assertion</emph>. Does the assertion pertain to a specific
            behavior that is tied to a context or is the behavior
            different in each possible context? For example an
            assertion that may have different semantics for a single
            message exchange or for all message exchanges that pertain
            to an endpoint would probably be represented by separate
            assertions.
	    </p>
					</item>
					<item>
						<p>
							<emph>Scoping of the assertion</emph>. Where
            does the assertion apply? Is the assertion about a
            specific description in WSDL? Is the assertion about a
            specific aspect of protocol? Is the assertion about a
            specific coordination between parties? Determination of
            the subject of an assertion is helpful in specifying the
            different scopes and subjects that it applies to.
 
            </p>
					</item>
					<item>
						<p>
							<emph>Composition</emph>. If the assertion is
            used with other assertions in a context, it is necessary
            to consider how the assertion may or may not affect
            the composition. For example, if an assertion applies to
            the SOAP protocol, it would be necessary to consider how
            its presence must interact with other policy assertions
            that are defined for security.
             </p>
					</item>
				</ulist>
				<p>
        We will cover these aspects in more detail with respect to the
        type of assertions being used in the subsequent sections. 
        </p>
			</div2>
		</div1>
		<div1 id="compact-full">
			<head>Authoring Styles </head>
			<p> WS-Policy supports 2 different authoring styles.  A compact
	   form is one in which an expression consists of three
	   constructs: an attribute to decorate an assertion (to
	   indicate whether it is required or optional), semantics for
	   recursively nested policy operators, and a policy
	   reference/inclusion mechanism.
      </p>
			<example>
				<eg xml:space="preserve">&lt;wsp:Policy xmlns:wsp='&nsuri;'   xmlns:sp='http://schemas.xmlsoap.org/ws/2005/07/securitypolicy' 
                   xmlns:wsrmp='http://docs.oasis-open.org/ws-rx/wsrmp/200608'&gt;
 &lt;wsrmp:RMAssertion wsp:Optional="true"/&gt;
 &lt;wsp:ExactlyOne&gt; 
  &lt;wsp:All&gt;
   &lt;sp:TransportBinding&gt;
    &lt;wsp:Policy&gt;
     &lt;sp:TransportToken&gt;
      &lt;wsp:Policy&gt;
       &lt;sp:HttpsToken RequireClientCertificate='xs:boolean' /&gt;
      &lt;/wsp:Policy&gt;
     &lt;/sp:TransportToken&gt;
   &lt;/sp:TransportBinding&gt;
  &lt;/wsp:All&gt;
 &lt;/wsp:ExactlyOne&gt;
&lt;/wsp:Policy&gt;</eg>
			</example>
			<p>An alternative style is a "normal form" in which the
           optional attribute is replaced by the expression of the
           alternatives allowed by the set of policy assertions. 
      </p>
			<example>
				<eg xml:space="preserve">&lt;wsp:Policy xmlns:wsp='&nsuri;'   xmlns:sp='http://schemas.xmlsoap.org/ws/2005/07/securitypolicy' 
 xmlns:wsrmp='http://docs.oasis-open.org/ws-rx/wsrmp/200608'&gt;
 &lt;wsp:ExactlyOne&gt; 
  &lt;wsp:All&gt;

   &lt;wsrmp:RMAssertion&gt;
      &lt;sp:TransportBinding&gt;
       &lt;wsp:Policy&gt;
          &lt;sp:TransportToken&gt;
            &lt;wsp:Policy&gt;
                  &lt;sp:HttpsToken RequireClientCertificate='true' /&gt;
            &lt;/wsp:Policy&gt;
          &lt;/sp:TransportToken&gt;

 &lt;/wsp:Policy&gt;
     &lt;/sp:TransportBinding&gt;
  &lt;/wsp:All&gt;

  &lt;wsp:All&gt;
      &lt;sp:TransportBinding&gt;
       &lt;wsp:Policy&gt;
          &lt;sp:TransportToken&gt;
            &lt;wsp:Policy&gt;
                  &lt;sp:HttpsToken RequireClientCertificate='true' /&gt;
            &lt;/wsp:Policy&gt;
          &lt;/sp:TransportToken&gt;
       &lt;/wsp:Policy&gt;
      &lt;/sp:TransportBinding&gt;
  &lt;/wsp:All&gt;
 &lt;/wsp:ExactlyOne&gt;
&lt;/wsp:Policy&gt;</eg>
			</example>
			<p> Note that both authoring styles are equivalent, however
           there may be reasons to choose one form over another
           depending on the use. For example, when multiple alternatives are present
           in a policy, the normal form may express the choices more explicitly.
           On the other hand, the compact form is more
           readable for humans when an assertion is marked as optional
           using the <code>@optional</code> attribute as our example
           illustrates above. 
      </p>
		</div1>
		<div1 id="modeling-guidelines">
			<head>Guidelines for Modeling New Assertions</head>
			
			<div2 id="new-domains">
				<head>New Policy Domains</head>
				<p>When creating a new policy domain, it is important to
         understand how policy expressions are used by the
         framework. Some WS-Policy domains represent infrastructure
         efforts like WS-SecurityPolicy and WS-RM Policy. We also
         anticipate that individual web services applications and
         deployments may wish to reuse the WS-Policy framework in
         order to enable dynamic negotiation of business requirements
         and capabilities at runtime.
         </p>
				<p>New policy authors should not try to overload
         assertions. A single assertion indicates a single
         behavior. Sets of assertions can by grouped by an operator
         "all". This indicates that there is a relationship between
         the assertions and they now constitute a policy
         alternative. Choices between alternatives can be indicated by
         an "exactly one" operator. This basic set of operators allows
         authors a wide range of options for expressing the possible
         combinations of assertions within their domain.
         </p>
				<p>It requires a good deal of effort to evaluate the
         capabilities of a domain and capture them in a way that
         reflects the options of the domain if the domain has a lot of
         assertions to define.  Interoperability testing of new policy
         domains is recommended to ensure that consumers and providers
         are able to use the new domain assertions.
         </p>
				<p>New authors are encouraged to look
         at <bibref ref="WS-RM-Policy"/> to see an example of a
         relatively simple domain that has defined 3
         assertions. Domain authors are encouraged to look at <bibref
         ref="WS-SecurityPolicy"/> to see an example of a complex
         domain that has been decomposed into a set of policy
         expressions.
         </p>
			</div2>
			<div2 id="single-domains">
				<head>Single Domains</head>
				<p>When considering the creation of a
        new domain of policy assertions, it is important to identify
        whether or not the domain is self-contained or at least if a
        subset of the domain can be well defined.  A domain that
        expresses a broad set of capabilities will also need to have
        community supporting implementations to provide value to the
        consumers.  Ultimately it is the consumers and providers that
        will determine whether a particular set of assertions
        correctly characterize a domain.  A new community should avoid
        duplicating assertions that have already been defined as this
        will create ambiguity not clarification. New WS-Policy authors
        should focus on creating assertions for those specific
        constraints and capabilities that do not overlap with other
        domains but that communicate new functionality. </p>
				<p>The model advocated for new
		assertion development is a cooperative marketplace
		[some might say its an "opt-in" model]. The providers
		of services need to find value in the set of
		assertions or they will not include the assertions in
		their service descriptions. </p>
				<p>A review by a broad community is
        the best way to ensure that the granularity of a set of domain
        assertions is appropriate. </p> 
                        </div2>
			<div2 id="comparison">
				<head>Comparison of Nested and Parameterized Assertions</head>
				<p>There are two different ways to
				provide additional information in an
				assertion beyond its type. We cover
				these two cases below followed by a
				comparison of these approaches
				targeting when to use either of the
				approach.  </p>

				<div3 id="parameterized-assertions">
				<head>Assertions with Parameters</head>
				<p>The framework allows WS-Policy
        domain authors to define name value pairs, for example, to
        qualify an assertion.  For some domains it will be appropriate
        to specify these parameters instead of nesting assertion elements. </p>
				<p> Note that parameters of assertions include the following:</p>
				<ulist>
					<item>
						<p> Complex elements
					with element children
					that cannot be policy
					assertions.  </p> </item>
					<item>
						<p> Elements that have attributes </p>
					</item>
				</ulist>
				<p>In the example below,
            <code>sp:Body</code> and <code>sp:Header</code> elements
            are the two assertion parameters of the
            <code>sp:SignedParts</code> policy assertion (this
            assertion requires the parts of a message to be
            protected). </p>

	<example> <head>Policy Assertion with Assertion Parameters</head>
            <eg xml:space="preserve">&lt;Policy&gt;
  &lt;sp:SignedParts&gt;
    &lt;sp:Body /&gt;
    &lt;sp:Header /&gt;
  &lt;/sp:SignedParts&gt;
&lt;/Policy&gt;</eg>
          </example>
			</div3>

			<div3 id="nested-assertions"> <head>Nested Assertions</head>
				<p>The framework provides the ability
        to "nest" policy assertions. For domains with a complex set of
        options, nesting provides one way to indicate dependent
        elements within a behavior. The granularity of assertions is
        determined by the authors and it is recommended that care be
        taken when defining nested policies to ensure that the options
        provided appropriately specify policy alternatives within a
        specific behavior.
        </p>
				<p>We will use the WS-SecurityPolicy
        to illustrate the use of nested assertions.
        </p>
				<p>Securing messages is a complex
        usage scenario. The WS-SecurityPolicy authors have defined the
        <code>sp:TransportBinding</code> policy assertion to indicate
        the use of transport-level security for protecting
        messages. Just indicating the use of transport-level security
        for protecting messages is not sufficient. To successfully
        interact with a Web service, the consumer must know not only
        that transport-level security is required, but also the
        transport token to use, the secure transport to use, the
        algorithm suite to use for performing cryptographic
        operations, etc. The <code>sp:TransportBinding</code> policy
        assertion can represent these dependent behaviors.
        </p>
				<p>A policy assertion like the <code>sp:TransportBinding</code>
        identifies a visible behavior that is a requirement. A nested
        policy expression can be used to enumerate the dependent
        behaviors on the Transport binding. A nested policy expression
        is a policy expression that is a child element of another
        policy assertion element. A nested policy expression further
        qualifies the behavior of its parent policy assertion.
        </p>
				<p>In the example below, the child Policy element is a nested
        policy expression and further qualifies the behavior of the
        <code>sp:TransportBinding</code> policy assertion. The
        <code>sp:TransportToken</code> is a nested policy assertion of
        the <code>sp:TransportBinding</code> policy assertion. The
        <code>sp:TransportToken</code> assertion requires the use of a
        specific transport token and further qualifies the behavior of
        the <code>sp:TransportBinding</code> policy assertion (which
        already requires the use of transport-level security for
        protecting messages).
        </p>
				<example>
					<head>Transport Security Policy Assertion</head>
					<eg xml:space="preserve">&lt;sp:TransportBinding&gt;
  &lt;Policy&gt;
    &lt;sp:TransportToken&gt;
      &lt;Policy&gt;
        &lt;sp:HttpsToken RequireClientCertificate="false" /&gt;
      &lt;/Policy&gt;
    &lt;/sp:TransportToken&gt;
    &lt;sp:AlgorithmSuite&gt;
      &lt;Policy&gt;
        &lt;sp:Basic256Rsa15/&gt;
      &lt;/Policy&gt;
    &lt;/sp:AlgorithmSuite&gt;
  &lt;/Policy&gt;
&lt;/sp:TransportBinding&gt;</eg>
				</example>
				<p>The <code>sp:AlgorithmSuite</code> is a nested policy assertion of
            the <code>sp:TransportBinding</code> policy assertion. The<code>sp:AlgorithmSuite</code>
          assertion requires the use of the algorithm suite identified by its nested policy
          assertion (<code>sp:Basic256Rsa15</code>
					<emph>in the example above</emph>) and further qualifies the behavior of the
            <code>sp:TransportBinding</code> policy assertion.</p>
				<p>Setting aside the details of using transport-level
        security,, a policy-aware client that recognizes this policy
        assertion can engage transport-level security and its
        dependent behaviors automatically. That is, the complexity of
        security usage is absorbed by a policy-aware client and hidden
        from these Web service developers.
        </p>
			</div3>
			<div3 id="which-one-to-use">
                        <head>Considerations for choosing parameters vs nesting</head>
			<p>The main consideration for selecting parameters or nesting
	of assertions, is that <emph>the framework intersection
	algorithm processes nested alternatives, but does not consider
	parameters in its algorithm</emph>. </p>
				<p>Domain authors should recognize that the framework can
        yield multiple assertions of the same type. The <emph>QName</emph>
        of the assertion is the only vehicle for the framework to
        match a specific assertion, NOT the contents of the
        element. If the assertion is a parameterized assertion the
        authors must understand that this type of assertion will
        require additional processing by consumers in order to
        disambiguate the assertions or to understand the semantics of
        the name value pairs, complex content, attribute values
        contribution to the processing. Therefore, if the domain
        authors want to delegate the processing to the framework,
        utilizing nesting should be considered. Otherwise, domain
        specific comparison algorithms would need to be devised and be
        delegated to the specific domain handlers that are not visible
        to the WS-Policy framework. The tradeoff is the generality
        vs. the flexibility and complexity of the comparison expected
        for a domain. </p>

		        </div3>
			</div2>
			<div2 id="self-describing">
				<head> Self Describing Messages </head>
				<p> WS-Policy is intended to
     communicate the requirements, capabilities, preferences and
     behaviors of nodes that provide the message's path, not
     specifically to declare properties of the message semantics. One
     of the advantages of Web services is that an XML message can be
     stored and later examined (e.g. as a record of a business
     transaction) or interpreted by an intermediary; however, if
     information that is necessary to understand a message is not
     available, these capabilities suffer.
     </p>
                                <p>Policy assertions should not be
     used to express the semantics of a message. Rather, if a property is
     required to understand a message, it should be communicated in
     the message, or be made available by some other means (e.g., being
     referenced by a URI in the message) instead of being communicated as a
     policy element.
     </p>
				<p>For example, if the details of a
     message's encryption ( e.g., the cipher used, etc) are expressed
     in policy that isn't attached to the message, it isn't possible
     to later decipher it. This is very different from expressing, in
     policy, what ciphers (and so forth) are supported by a particular
     endpoint, or those that are required in a particular message; the
     latter are the intended uses of the WS-Policy framework.
     </p>
				<p>As a result, the assertion authors
     should take into account that the following important concepts
     when designing assertions and documenting the semantics of the
     assertion types. Firstly, an assertion type indicates a
     <emph>runtime</emph> behavior.  Secondly, an assertion should
     also indicate how the assertion type can be inferred or indicated
     from a message at runtime.  If there is a need for the behavior
     to be represented in a persistent way or if there is a need for
     additional data or metadata that is present in a message to be
     persisted, it should be incorporated into the assertion design or
     in the message itself. In essence, the assertion authors should
     consider how to make messages self describing when utilizing
     their assertions by specifying additional properties, headers,
     etc. that must be present in a message as part of their assertion
     design.
     </p>
				
				<p>If the messages could not be made
    self describing by utilizing additional properties present in the
    message as required by the assertion, it would be necessary to
    determine the behaviors engaged at runtime by additional means. A
    general protocol that aids in determining such behaviors may be
    utilized, however a standard protocol for this purpose is
    currently not available to ensure interoperability. Thus, a
    private protocol should be used with care. </p>
                                 <p>Another approach is to use of the
    assertion to selectively apply to subjects. For example, a
    dedicated endpoint may be allocated to ensure the engagement of a
    behavior that is expressed by a policy assertion. This approach
    can be considered when messages can not be self describing. 
     </p>
			</div2>
			<div2 id="optional-policy-assertion">
				<head>Policy Assertions Designating Optional Behaviors</head>
				<p>Optional behaviors represent
        behaviors which may be engaged by a consumer. When using the
        compact authoring form for assertions, behaviors are marked by
        using <code>wsp:optional</code> attribute that has a value,
        "true". During the process of normalization, the runtime
        behavior is indicated by two policy alternatives, one with and
        one without containing the assertion. In a consumer/provider
        scenario, the choice of engaging the runtime behavior is upon
        the consumer although the provider is capable of engaging the
        runtime behavior. In order to simplify reference to such
        assertions, we just use the term optional assertions in this section. </p>

				<p>The <bibref ref="WS-Policy-Primer"/> document contains an
        example that proposes the use of <bibref ref="MTOM"/> as an
        optional behavior that can be engaged by a consumer. The
        primer proposes that an assertion that identifies the use of
        MIME Multipart/Related serialization (see <bibref ref="MTOM"/>,
        <bibref ref="XOP"/> for messages to enable a Policy-aware
        clients to recognize the policy assertion and if they select
        an alternative with this assertion, they engage Optimized MIME
        Serialization for messages. </p>
				<p>The semantics of this assertion declare that the behavior
        is reflected in messages: they use an optimized wire format
        (MIME Multipart/Related serialization). Note that in order for
        an optional behaviors to be engaged, the wire message that
        would utilize the specific assertion must be self
        describing. For example, an inbound message to a web service
        that asserts MTOM, must evaluate, the protocol format of the
        message to determine whether the incoming message adheres to
        the Optimized MIME Serialization. By examining the message,
        the provider can determine whether the policy alternate that
        contains the MTOM assertion is being selected.</p>
				<p>Assertion authors should be aware that optional behaviors,
          like utilizing optional support for Optimized MIME
          Serialization require some care considering the scoping of the assertion that is applicable. </p>
				<ulist>
					<item>
						<p>Since optional behaviors indicate optionality for
          both the provider and the consumer, behaviors that must
          always be engaged by a consumer must not be marked as
          "optional" with a value "true" since presence of two
          alternatives due to normalization enables a consumer to
          choose the alternative that does not contain the assertion,
          and thus making the behavior not being engaged in an
          interaction.
          </p>
					</item>
					<item>
						<p>As demonstrated in
          the MIME optimization behavior, behaviors must be engaged
          with respect to messages that are targeted to the provider
          so that the provider can determine that the optional
          behavior is engaged. In other words, the requirement of self
          describing nature of messages [<specref
          ref="self-describing"/>] in order to engage behaviors must
          not be forgotten with regard to the client's ability to
          detect and select the alternative if it is to participate in
          the exchange. </p> </item> <item>
	                                        <p> The target scope
          of an optional assertion is an important factor for
          assertion authors to consider as it determines the
          <emph>granularity</emph> where the behavior is optionally
          engaged. For example, if the assertion is targeted for an
          endpoint policy subject, it is expected to govern all the
          messages that are indicated by the specific endpoint when
          optional behavior is <emph> engaged </emph>. Since the
          behavior would be applicable to policy subject that is
          designated, it is important for the policy assertion authors
          to choose the appropriate level of granularity for optional
          behaviors, to consider whether a specific message or all
          messages, etc.  are targeted. </p>

	                          <ulist>
                                        <item> <p> Attaching optional
          assertions to outbound-messages using message policy subject
          require some care. An explicit, out of band mechanism may be
          necessary  to enable a client to indicate that
          the optional behavior is engaged. Currently such a mechanism
          is outside the scope of WS-Policy Framework.  </p> </item>
          
	                                 <item>
						<p>When optional
            behaviors are indicated by attaching assertions with only
            one side of an interaction, such as an inbound message of
            a request-response, the engagement of the rest of the
            interaction will be <emph>undefined</emph>. For example,
            if a request-response interaction only specified MTOM
            optimization for an inbound message, it would not be clear
            whether the outbound message from the provider could also
            utilize the behavior. Therefore, the assertion authors are
            encouraged to consider how the attachment on a message
            policy subject on a response message should be treated
            when optional behaviors are specified for message
            exchanges within a request response for response messages,
            using message policy subject. Leaving the semantics
            undescribed may result in providers making assumptions
            (i.e. if the incoming message utilized the optimization,
            the response will be returned utilizing the MTOM
            serialization). Similarly, if engagement of a behavior is
            only specified for an outbound message, the policy
            assertion authors should consider to describe the
            semantics if the incoming messages also utilized the
            behavior. This is especially important if the assertion is
            applicable to more than one specific policy subject. One
            approach that is currently taken by WS-RM Policy [<bibref
            ref="WS-RM-Policy"/>] is to introduce both message and endpoint
            policy subjects for one of its assertions and require the
            use of endpoint policy subject when message policy subject
            is used via attachment. </p> </item> 
                                 </ulist> </item>

                                        <item>
						<p>Optional assertion authors should explicitly state
          how the behavior that is enabled by the assertion would be
          engaged when they are designing their assertion, whether by
          specific headers or some other means. See also <specref ref="self-describing"/>.</p>
					</item>
				</ulist>
			</div2>
			<div2 id="considerations-for-intersection">
				<head> Considerations for Intersection and Merging </head>
			</div2>
			<div2 id="typing-assertions">
				<head>Typing Assertions</head>
				<p>Since a <emph>QName</emph> is the central mechanism for
	  identifying a policy assertion, assertion authors should be
	  aware of the possible evolution of their assertions and how
	  this would impact the semantics overtime. A namespace
	  associated with the assertion may be used to indicate a
	  specific version of an assertion.
          </p>
				<p>WS-PolicyAttachment provides a means of associating an
          assertion with arbitrary subjects, regardless of their
          nature. This flexibility can lead to ambiguity in the
          interpretation of policy; for example, if one attaches an
          assertion with the semantic "must be encrypted" to a SOAP
          endpoint, it's unclear what must be encrypted.
          </p>
				<p>To avoid this confusion, assertion definitions should be
          precise about their semantics and include information that
          restricts their set of permissible policy subjects
          appropriately and indicates which Qnames are associated with
          which subjects. One way to do this is to generally determine
          if an assertion is specific to a policy attachment
          mechanism. An example could be identifying whether the
          assertion expressed is associated with behaviors
          (endpoints) or artifacts ( messages) and then constraining
          the use of an assertion to one of these subjects.
          </p>
				<p>Thus our example encryption assertion would have a
          subject of "message", and could only be attached to
          messages, where the assertion is valid. However, authors
          need to be aware that <emph>policy attachment subjects are
          not limited to the subjects defined in WSDL</emph>.  The
          external attachment model in WS-PolicyAttachment allows for
          the definition of other domain expressions to be policy
          subjects. More of this topic is covered in the <bibref ref="WS-Policy-Primer"/>
				</p>
				<example><p>EXAMPLE</p></example>
			</div2>
			
			<div2 id="levels-of-abstraction">
				<head>Levels of Abstraction in WSDL </head>
				<p>A behavior identified by a policy assertion applies to the
        associated policy subject. If a policy assertion is to be used
        within WSDL, policy assertion authors must specify a WSDL
        policy subject. The policy subject is determined with respect
        to a behavior as follows:
        </p>
				<ulist>
					<item>
						<p>If the behavior applies to any message exchange
          using any of the endpoints offered by a service then the
          subject is the service policy subject. </p>
					</item>
					<item>
						<p>If the behavior applies to any message exchange
          made using an endpoint then the subject is the endpoint
          policy subject. </p>
					</item>
					<item>
						<p>If the behavior applies to any message exchange
	  defined by an operation then the subject is the operation
	  policy subject. </p>
					</item>
					<item>
						<p>If the behavior applies to an input message then
	  the subject is the message policy subject - similarly for
	  output and fault message policy subjects.</p>
					</item>
				</ulist>
				<p>WS-Policy authors that wish to utilize WSDL policy subjects need to understand how the assertions will be
	processed in intersection and merging and the implications of
	the processing for considering a specific attachment point and
	policy subject. This topic is considered in detail in <bibref ref="WS-Policy-Primer"/>
				</p>
				<p>The current set of subjects as mapped to the WSDL 1.1
        elements, can also constrain the assertion constructs. For Example, In WS-RM,
        the domain authors chose to support certain capabilities at
        the endpoint level. This resulted in the finer granularity of
        the assertion to apply at the message policy subject, but the
        assertion semantics also indicates that the if the senders
        choose to engage RM semantics (although not specified via
        attachment in WSDL at incoming messages), the providers will
        honor the engagement of RM. This is illustrative of how the
        assertion author can specify additional constraints and
        assumptions for attachment and engagement of behavior.
        </p>
				<p>If the capability is not really suitable and may imply
        different semantics with respect to attachment points, the
        assertion authors should consider the following</p>
				<ulist>
					<item>
						<p> Decompose the semantics with several assertions
           </p>
					</item>
					<item>
						<p> Rewrite a single assertion targeting
           a specific subject. </p>
					</item>
				</ulist>
				<p> For a given WSDL policy subject, there may be several
        attachment points. For example, there are three attachment
        points for the endpoint policy subject: the port, binding and
        portType element. Policy assertion authors should identify the
        relevant attachment point when defining a new assertion. To
        determine the relevant attachment points, authors should
        consider the scope of the attachment point. For example, an
        assertion should only be allowed in the portType element if
        the assertion reasonably applies to any endpoint that ever
        references that portType. Most of the known policy assertions
        are designed for the endpoint, operation or message policy
        subject. </p>
				<p> In using WSDL attachment, it should be noted that the
        service policy subject is a collection of endpoint policy
        subjects. The endpoint policy subject is a collection of
        operation policy subjects and etc. As a result, the WSDL
        policy subjects compose naturally. It is quite tempting to
        associate the identified behavior to a broader policy subject
        than to a fine granular policy subject. For instance, it is
        convenient to attach a supporting token assertion (defined by
        the Web Services Security Policy specification) to an endpoint
        policy subject instead of a message policy subject. Similarly,
        for authoring convenience, an assertion author may allow the
        association of an assertion to multiple policy subjects. If an
        assertion is allowed to be associated with multiple policy
        subjects then <emph>the assertion author has the burden to
        describe the semantics of multiple instances of the same
        assertion attached to multiple policy subjects at the same
        time in order to avoid conflicting behavior. </emph>
				</p>
				<p>One approach is to specify a policy subject, choose the
	most granular policy subject that the behavior applies to and
	specify a preferred attachment point in WSDL. However, this
	approach only works if the policy subject is a true WSDL
	construct other than some other protocol concept that is
	layered over WSDL message exchanges. For example, the WS-RM
	Policy is a capability that governs a target endpoints
	capability to accept sequences that is beyond single message
	exchanges. Therefore, its semantics encompasses the cases when
	message level policy subjects may be used as attachment but
	considers when sequences are present. In addition, when the
	policy assertions do not target wire-level behaviors but
	rather abstract requirements, this technique does not
	apply. </p>
			</div2>
			<div2 id="lifecycle">
				<head>Lifecycle of Assertions</head>
				<p>WS-Policy authors need to consider not just the expression of the current set of requirements but
				how they anticipate new assertions being added to the set.  There are three aspects that govern an assertions lifecycle:</p>
				<ulist>
					<item>
						<p> Assertion Extensibility </p>
					</item>
					<item>
						<p> Policy Language Extensibility </p>
					</item>
					<item>
						<p> Subject attachment Extensibility </p>
					</item>
				</ulist>
				<div3 id="Referencing_Policy_Expressions">
					<head>Referencing Policy Expressions</head>
					<p>The <bibref ref="WS-Policy-Primer"/> illustrates how
					providers can 
        utilize the identification mechanism  defined in the Policy specification
        to expose a complex policy expression as a reusable building block for
        other policy expressions by reference. Domain assertion
        authors, especially those defining complex assertions that
        include nesting or complex types should consider specifying or recommending
        naming conventions in order to promote reuse. Reuse through
        referencing allows a policy expression to be utilized not only
        within another expression but also allows specification of
        additional policy subjects and their association to common
        policy expressions that are identified. It also promotes
        manageability of the expressions as they are uniquely
        identified.
        </p>
				</div3>
				<div3 id="extending-assertions">
					<head> Factors in Extending Assertions within a Domain </head>
					<p> Extensibility affects the policy subjects and attachment semantics. </p>
				</div3>
				<div3 id="assertion-evolution">
					<head>Evolution of Assertions (Versioning and Compatibility)</head>
					<p>4.4.7. Over time, there may
           be multiple equivalent behaviors emerging in the Web
           Service interaction space. Examples of such multiple
           equivalent behaviors are WSS: SOAP Message Security 1.0
           vs. 1.1 and WS-Addressing
           August 2004 version vs. WS-Addressing W3C Recommendation
           [<bibref ref="WS-Addressing"/>]. These equivalent behaviors
           are mutually exclusive for an interaction. Such equivalent
           behaviors can be modeled as independent assertions. The
           policy expression in the example below requires the use of
           WSS: SOAP Message Security 1.0. </p> <example>
           <head>Example 4-2. Message-level Security and WSS: SOAP
           Message Security 1.0 </head>
						<p>ADD THE EXAMPLE HERE </p>
					</example>
					<p>The policy expression in the example below requires the
           use of WSS: SOAP Message Security 1.1. These are multiple
           equivalent behaviors and are represented using distinct
           policy assertions. </p>
					<example>
						<head>Example 4-3. Message-level Security and WSS: SOAP Message Security 1.1</head>
						<p>ADD THE EXAMPLE HERE </p>
					</example>
					<p>Best practice: use independent assertions for modeling
	   multiple equivalent behaviors. </p>
					<!-- EDS TO DO REconcile from Primer. GET THE REST FROM DAVE and Umit -->
				</div3>
			</div2>
		</div1>
		<div1 id="inter-policy">
			<head>Inter-domain Policy and Composition Issues</head>
			<p>Domain authors must be aware of the interactions between their
			domain and other domains. For example, security assertions interact
         with other protocol assertions in a composition. Although
         modeling protocol assertions may appear to be an independent behavior,
         protocol assertions and security assertions affect transport
         bindings and their interactions must be considered. For
         example, utilization of WS-Security Policy with other
         protocols affect transport binding and would result in nested
         policy assertions when additional protocols are composed with
         <bibref ref="WS-Security2004"/>. Thus, domain authors should
         be aware of the compositional semantics with other related
         domains. The protocol assertions that require composition
         with WS-Security should be particularly aware of the nesting
         requirements on top of transport level security. </p>
			<!-- EDS TO DO: MORE/SIMPLIFY the previous paragraph -->
		</div1>
		<div1 id="best-practices-attachment">
			<head>Applying Best Practices for  Policy Attachment</head>
			<div2 id="context-free-policies">
				<head>Appropriate Attachment: Preserving Context-Free Policies</head>
				<p>Policy attachment should not affect the interpretation of
         Policy alternatives. If it did, each policy assertion would
         need to be written with different (and possibly unknown)
         attachment mechanisms in mind. In particular, the timing of a
         policy attachment or the role that a party who attaches
         policy should have no bearing on the evaluation of the policy
         assertion </p>
				<!-- EDS TO DO: [CLARIFY SUBJECT RELATIONSHIP] in the paragraph above -->
			</div2>
			<div2 id="appropriate-attachment-assertion-subjects">
				<head>Appropriate Attachment: Identifying Assertion Subjects</head>
				<p>Each policy attachment mechanism should unambiguously
        identify the subject of the attached assertions. Generally,
        this should be a specific SOAP node or a specific message
        between two SOAP nodes. Some attachment mechanisms may
        encompass multiple notes or messages, for example, "the
        message along its entire path". </p>
				<div3 id="interaction">
					<head>Interaction between Subjects</head>
					<p>If the best practices are followed, and the assertions
           are scoped according to their subject, then multiple policy
           domains may be combined without conflict. Each domain
           should define any limitations at the policy subject level
           that might impact interoperability (i.e. WS-SecurityPolicy
           - binding abstraction to group capabilities per message
           exchange). </p>
				</div3>
			</div2>
			<div2 id="identifying-assertion-sources">
				<head>Appropriate Attachment: Identifying Assertion Sources </head>
				<p>As with identifying Policy subjects, policy attachment
	   mechanisms should make it possible to clearly identify the
	   source of a poly assertion both for debugging and for
	   verification. This could take several forms: it could be
	   assumed ( in WSDL, the source of the assertion is the same
	   as the WSDL provider) or it could be proven ( using
	   <bibref ref="WS-Trust"/>).  </p>
			</div2>
		</div1>
		<div1 id="scenerio">
			<head>Scenario and a worked example</head>
			<p>To illustrate the topics explored in this document, we
       include an example of a web service and how a fictitious company
       might utilize the WS-Policy Framework to enable Web Service
       interoperability. CompanyA has determined to utilize WS-Security,
       WS-Addressing and WS-Reliable Messaging in all its new web
       service offerings and has instructed its developers to use the
       policy assertions defined by the following documents: </p>
			<ulist>
				<item>
					<p>Web Services Security Policy </p>
				</item>
				<item>
					<p>Web Services Reliable Messaging Policy </p>
				</item>
				<item>
					<p>Web Services Addressing WSDL Binding</p>
				</item>
			</ulist>
			<p>The application developers at CompanyA are instructed to
      review the current web services at CompanyA and propose a plan
      for adding policy assertions. </p>
			<p>The application developers collect information about web
      services within CompanyA and determine that all of the web
      services already have a WSDL 1.1 description. The developers
      have determined that Company A's web services fall into two
      types of web services. There are those that fall into the
      "default" category, and will use a predefined set of policy
      assertions, and there are those that use the default but also
      extend the policy alternatives. </p>
			<p>They have also determined that for the both types, the
      appropriate policy subject is the endpoint.  They determined
      this because the capabilities apply to all operations and
      messages for the web service not to any one individual operation
      or message exchange. </p>
			<p>Service A is a WSDL 1.1 conformant web service and requires
      the use of transport-level security for protecting messages as
      well as including addressing headers. Employees of CompanyA have
      already incorporated <code>wss:Security</code> headers into their
      messages. </p>
			<example>
				<head>Message with Security Headers</head>
				<eg xml:space="preserve">&lt;soap:Envelope&gt; 
  &lt;soap:Header&gt;
	&lt;wss:Security soap:mustUnderstand ="1"&gt;
	  &lt;wsu:Timestamp u:Id=_0"&gt;
		&lt;wsu:Created&gt; 20006-01-19T02:49:53.914Z &lt;/u:Created&gt; 
		&lt;wsu:Expires&gt; 20006-01-19T02:54:53.914Z &lt;/u:Expires&gt;
	  &lt;/wsu:Timestamp&gt;
    &lt;/wss:Security&gt;
	&lt;wsa:To&gt; http://CompanyA/quote &lt;wsa:To&gt;
	&lt;wsa:Action&gt; http://CompanyA/GetRealQuote&lt;/wsa:Action&gt;
&lt;/soap:Header&gt;
&lt;soap:Body&gt;
&lt;/soap:Envelope&gt;</eg>
			</example>
			<p>The SOAP message in the example above includes security
     timestamps that express creation and expiration times of this
     message. CompanyA requires the use of these security timestamps
     and transport-level security, such as HTTPS for protecting
     messages. </p>
			<p>The example below illustrates a policy expression that
     CompanyA has created for its employees to use on their web
     services to indicate the use of addressing and transport-level
     security for securing messages. </p>
			<example>
				<head> CompanyA-ProfileA </head>
				<eg xml:space="preserve">
&lt;Policy URI=http://www.CompanyA.com/WebServicesProfileA.xml&gt; 
	&lt;wsa:UsingAddressing /&gt;
	&lt;sp:TransportBinding&gt;&lt;/sp:TransportBinding&gt;
&lt;/Policy&gt;</eg>
			</example>
			<p>The <code>sp:TransportBinding</code> element is a policy assertion. The
     assertion identifies the use of transport-level-security - such
     as HTTPS for protecting messages at the transport
     level. CompanyA's policy aware clients can now recognize this
     policy assertion and if they support it, engage in transport
     level security for protecting messages and providing security
     timestamps in SOAP envelopes for any WSDL with this policy
     attached. </p>
			<p>When creating the policy for the default web services, the
     developers took into consideration several factors.  First, all
     their web services were WSDL 1.1 web services. Second, they
     wanted to reuse policy assertions where ever possible. Third,
     they wanted to ensure that where possible they would support
     alternatives rather than forcing a single client
     configuration. </p>
			<p>The developers read the WS-Policy specification and noted that
     there were 3 ways to express combinations of behaviors. The three
     policy operators, ( Policy, All and ExactlyOne) were considered
     and the result was the creation of two policy elements. </p>
			<p>The first policy is shown in Figure
     <emph>CompanyA-ProfileA</emph> and it is the policy that is used
     by many web services at Company A that rely on https to provide
     transport level protection of messages. </p>
			<p>The second policy is shown in Figure
     <emph>CompanyA-ProfileB</emph> and it offers requestors of a
     service the ability to provide additional integrity protection by
     including WS-Security Headers to protect the message content
     after it is processed by the transport.  The additional security
     processing is not required by all CompanyA web services. </p>
     <example> <head>CompanyA-ProfileB ( not expanded)</head> <eg
     xml:space="preserve"> &lt;Policy wsu:Id="CompanyA-ProfileB"&gt;
     &lt;wsa:UsingAddressing /&gt; &lt;ExactlyOne&gt;
     &lt;sp:TransportBinding&gt;&lt;/sp:TransportBinding&gt;
     &lt;sp:AsymmetricBinding&gt;&lt;/sp:AssymetricBinding&gt;
     &lt;/ExactlyOne&gt; &lt;/Policy&gt; </eg> </example>
			<p>We have shown above that CompanyA offered a
    second profile that included two security options.  The details of
    the Bindings, requires a more detailed exploration of some of the
    other features of the WS-Policy Framework. </p>
			<p>When WS-Policy authors create sets of Policy assertions, like
    WS-Security Policy they need to consider expressing the semantics
    of their domain in a way that policy consumers, like Company A,
    can utilize them.  In this case, the WS-SecurityPolicy authors
    factored out common elements of security mechanisms and utilized a
    feature of WS-Policy called "nested" assertions.  In the case of
    an <code>sp:TransportBinding</code> assertion, just indicating the use of
    transport-level security for protecting messages is not
    sufficient. For a consumer of a web service provided by a company,
    like CompanyA, to successfully interact, the consumer must also
    know what transport token, what algorithm suite, etc. is
    required. The <code>sp:TransportBinding</code> assertion, can (and has)
    represent (ed) these dependent behaviors as "nested" policy
    assertions.  </p>
			<p>In the example below the child Policy element is a nested
     policy behavior and further qualifies the behavior of the
     <code>sp:TransportBinding</code> policy assertion.  </p>
			<example>
				<head>CompanyA-ProfileB (fully expanded)</head>
				<eg xml:space="preserve">
&lt;Policy wsu:Id="CompanyA-ProfileB"&gt; 
	&lt;wsa:UsingAddressing /&gt;
	&lt;ExactlyOne&gt;
	   &lt;sp:TransportBinding&gt;
              &lt;Policy&gt;
   	         &lt;sp:TransportToken&gt;
		    &lt;Policy&gt;
		      &lt;sp:HttpsToken RequireClienCertificate="false" /&gt;
                    &lt;/Policy&gt;
                 &lt;/sp:TransportToken&gt;
                 &lt;sp:AlgorithmSuite&gt;
                    &lt;Policy&gt;
		       &lt;sp:Basic256Rsa15 /&gt;
                    &lt;/Policy&gt;
                 &lt;/sp:AlgorithmSuite&gt;
              &lt;/Policy&gt;
        &lt;/sp:TransportBinding&gt;
	   &lt;sp:AsymmetricBinding&gt;
  &lt;/sp:AssymetricBinding&gt;
	&lt;/ExactlyOne&gt;
&lt;/Policy&gt;</eg>
			</example>
			<p>
				<code>The sp:AlgorithmSuite</code> is a nested policy
     assertion of the <code>sp:TransportBinding</code> assertion and
     indicates that this suite is required.  The
     <code>sp:TransportToken</code> is a nested policy assertion that
     indicates the use of a specific type of token, in this case an
     HttpsToken. </p>
			<p>It should be noted that each policy has an Identifier.  In the
     case of the default policy expression, CompanyA has decided that
     this policy expression should be broadly available via a URI.
     There are advantages and disadvantages to using each type of
     identifier.  For URI's there is the issue of maintaining the
     policy expression when it may no longer be used ( CompanyA gets
     bought by CompanyB and starts using the policies of Company B,
     but some "old" consumers may still try to reference the
     URI). </p>
			<p> For the second type of web services, which may be used only
     by certain of CompanyA's business partners, the id is an XML ID.
     The relative URI for referencing this within the same WSDL
     document is #CompanyA-ProfileB. This can be useful for company's
     when the policy expressions are agreed to between partners but
     may be changed as the business agreements change. But the
     disadvantage is that the policy expression must be included in
     each WSDL document. </p>
			<p>Since CompanyA has decided to use well known policy
     expressions that are themselves part of a specification, they
     adhere to the guidance given in the WS-SecurityPolicy
     specification and attach the policies to the web service endpoint
     policy subject as recommended by the WS-SecurityPolicy
     specification. For the default web services, the URI is included
     in the wsdl binding for each web service. </p>
			<example>
				<head/>
				<eg xml:space="preserve">
&lt;wsdl:binding name="CompanyADefaultBinding" type="tns:CompanyADefault"&gt; 
  &lt;wsp:PolicyReference URI="http://www.CompanyA.com/WebServicesProfileA.xml"&gt;

&lt;wsdl:operation name="GetQuote"&gt; &lt;/wsdl:operation&gt;
&lt;/wsdl:binding&gt; </eg>
			</example>
			<p>The partner specified policy is included in the beginning of
    the wsdl 1.1document and referenced by the binding for the service
    as in the example below.</p>
			<example>
				<head/>
				<eg xml:space="preserve">
&lt;wsdl:definitions name="StokeQuote"
    targetNamespace="http:.."&gt;
&lt;wsp:Policy wsu:Id="CompanyA-ProfileB"&gt; 
	&lt;wsa:UsingAddressing /&gt;
	&lt;ExactlyOne&gt;
	   &lt;sp:TransportBinding&gt;
              &lt;Policy&gt;
     	         &lt;sp:TransportToken&gt;
		   &lt;wsp:Policy&gt;
		      &lt;sp:HttpsToken RequireClienCertificate="false" /&gt;
                   &lt;/wsp:Policy&gt;
                 &lt;/sp:TransportToken&gt;
                 &lt;sp:AlgorithmSuite&gt;
                    &lt;wsp:Policy&gt;
		       &lt;sp:Basic256Rsa15 /&gt;
                    &lt;/wsp:Policy&gt;
                 &lt;/spAlgorithmSuite&gt;
              &lt;/Policy&gt;
           &lt;/sp:TransportBinding&gt;
	   &lt;sp:AsymmetricBinding&gt;
           &lt;/sp:AssymetricBinding&gt;
	&lt;/ExactlyOne&gt;
&lt;/wsp:Policy&gt;

&lt;wsdl:binding name="CompanyADefaultBinding" type="tns:CompanyADefault"&gt; 
  &lt;wsp:PolicyReference id=#CompanyA-ProfileB&gt;
	&lt;wsdl:operation name="GetQuote"&gt; &lt;/wsdl:operation&gt;

&lt;/wsdl:binding&gt; </eg>
			</example>
			<p>In some cases, companies may chose to implement their own
  assertions.  When companies chose to become policy authors they need
  to consider not only the definition of the behavior that the
  assertion represents but they need to consider how new assertions
  will be intersected and merged with other assertions in the
  calculation of an effective policy and this also indicates they need
  to consider policy subjects.</p>
			<p>The policy framework only defines an algorithm for calculating
  effective policies for WSDL 1.1 based subjects. </p>
		</div1>
	</body>
	<back>
		<div1 id="security-considerations">
			<head>Security Considerations</head>
			<p> Security considerations are discussed in the <bibref ref="WS-Policy"/> document.</p>
		</div1>
		<div1 id="xml-namespaces">
			<head>XML Namespaces</head>
			<p>The table below lists XML Namespaces that are used in this document. The choice of any
        namespace prefix is arbitrary and not semantically significant.</p>
			<table summary="Prefixes and XML Namespaces used in this specification" id="nsprefix" border="1" cellspacing="0" cellpadding="5">
				<caption>Prefixes and XML Namespaces used in this specification.</caption>
				<thead>
					<tr>
						<th>Prefix</th>
						<th>XML Namespace</th>
						<th>Specifications</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<code>soap</code>
						</td>
						<td>
							<code>http://www.w3.org/2003/05/soap-envelope</code>
						</td>
						<td>[<bibref ref="SOAP12"/>]</td>
					</tr>
					<tr>
						<td>
							<code>sp</code>
						</td>
						<td>
							<code>http://schemas.xmlsoap.org/ws/2005/07/securitypolicy</code>
						</td>
						<td>[<bibref ref="WS-SecurityPolicy"/>]</td>
					</tr>
					<tr>
						<td>
							<code>wsa</code>
						</td>
						<td>
							<code>http://www.w3.org/2005/08/addressing</code>
						</td>
						<td>[<bibref ref="WS-Addressing"/>]</td>
					</tr>
					<tr>
						<td>
							<code>wsdl</code>
						</td>
						<td>
							<code>http://schemas.xmlsoap.org/wsdl/</code>
						</td>
						<td>[<bibref ref="WSDL11"/>]</td>
					</tr>
					<tr>
						<td>
							<code>wsp</code>
						</td>
						<td>
							<code>&nsuri;</code>
						</td>
						<td>[<bibref ref="WS-Policy"/>, <bibref ref="WS-PolicyAttachment"/>]</td>
					</tr>
					<tr>
						<td>
							<code>wsrmp</code>
						</td>
						<td>
							<code>http://docs.oasis-open.org/ws-rx/wsrmp/200608</code>
						</td>
						<td>[<bibref ref="WS-RM-Policy"/>]</td>
					</tr>

					<tr>
						<td>
							<code>wss</code>
						</td>
						<td>
							<code>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</code>
						</td>
						<td>[<bibref ref="WS-Security2004"/>]</td>
					</tr>
					<tr>
						<td>
							<code>wsu</code>
						</td>
						<td>
							<code>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</code>
						</td>
						<td>[<bibref ref="WS-Security2004"/>]</td>
					</tr>
				</tbody>
			</table>
		</div1>
		<div1 id="references">
			<head>References</head>
			<blist>
				<bibl key="MTOM" id="MTOM" href="http://www.w3.org/TR/2005/REC-soap12-mtom-20050125/">
					<titleref>SOAP Message Transmission Optimization Mechanism</titleref>, M. Gudgin, N.
          Mendelsohn, M. Nottingham and H. Ruellan, Editors. World Wide Web Consortium, 25 January
          2005. This version of the SOAP Message Transmission Optimization Mechanism Recommendation
          is http://www.w3.org/TR/2005/REC-soap12-mtom-20050125/. The <loc href="http://www.w3.org/TR/soap12-mtom/">latest version of SOAP Message Transmission
            Optimization Mechanism</loc> is available at http://www.w3.org/TR/soap12-mtom/. </bibl>
				<bibl id="SOAP11" key="SOAP 1.1" href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/">
					<titleref>Simple Object Access Protocol (SOAP) 1.1</titleref>, D. Box, et al, Editors.
          World Wide Web Consortium, 8 May 2000. Available at
          http://www.w3.org/TR/2000/NOTE-SOAP-20000508/. </bibl>
				<bibl id="SOAP12" key="SOAP 1.2 Messaging Framework" href="http://www.w3.org/TR/2003/REC-soap12-part1-20030624/">
					<titleref>SOAP Version 1.2 Part 1: Messaging Framework</titleref>, M. Gudgin, M. Hadley,
          N. Mendelsohn, J-J. Moreau, H. Frystyk Nielsen, Editors. World Wide Web Consortium, 24
          June 2003. This version of the SOAP Version 1.2 Part 1: Messaging Framework Recommendation
          is http://www.w3.org/TR/2003/REC-soap12-part1-20030624/. The <loc href="http://www.w3.org/TR/soap12-part1/">latest version of SOAP Version 1.2 Part 1:
            Messaging Framework</loc> is available at http://www.w3.org/TR/soap12-part1/. </bibl>
				<bibl key="XOP" id="XOP" href="http://www.w3.org/TR/2005/REC-xop10-20050125/">
					<titleref>XML-binary Optimized Packaging</titleref>, M. Gudgin, N. Mendelsohn, M.
          Nottingham and H. Ruellan, Editors. World Wide Web Consortium, 25 January 2005. This
          version of the XML-binary Optimized Packaging Recommendation is
          http://www.w3.org/TR/2005/REC-xop10-20050125/. The <loc href="http://www.w3.org/TR/xop10/">latest version of XML-binary Optimized Packaging</loc> is available at
          http://www.w3.org/TR/xop10/. </bibl>
				<bibl key="WS-Addressing Core" id="WS-Addressing" href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">
					<titleref>Web Services Addressing 1.0 - Core</titleref>, M. Gudgin, M. Hadley, and T.
          Rogers, Editors. World Wide Web Consortium, 9 May 2006. This version of the Web Services
          Addressing 1.0 - Core Recommendation is
          http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/. The <loc href="http://www.w3.org/TR/ws-addr-core/">latest version of Web Services Addressing 1.0
            - Core</loc> is available at http://www.w3.org/TR/ws-addr-core. </bibl>
				<bibl id="WSDL11" key="WSDL 1.1" href="http://www.w3.org/TR/2001/NOTE-wsdl-20010315">
					<titleref>Web Services Description Language (WSDL) 1.1</titleref>, E. Christensen, et al,
          Authors. World Wide Web Consortium, March 2001. Available at
          http://www.w3.org/TR/2001/NOTE-wsdl-20010315. </bibl>

	                        <bibl key="WSDL 2.0 Core Language" id="WSDL20" href="http://www.w3.org/TR/2006/CR-wsdl20-20060327/">
	  <titleref>Web Services Description Language (WSDL) Version
	  2.0 Part 1: Core Language</titleref>, R. Chinnici,
	  J. J. Moreau, A. Ryman, S. Weerawarana, Editors. World Wide
	  Web Consortium, 27 March 2006. This version of the WSDL 2.0
	  specification is
	  http://www.w3.org/TR/2006/CR-wsdl20-20060327. The <loc
	  href="http://www.w3.org/TR/wsdl20/">latest version of WSDL
	  2.0</loc> is available at http://www.w3.org/TR/wsdl20.
	  </bibl>

				<bibl id="WS-Policy" key="Web Services Policy Framework" href="http://www.w3.org/TR/ws-policy/">
					<titleref>&framework.title;</titleref>, A. S. Vedamuthu, D. Orchard, M. Hondo, T.
          Boubez and P. Yendluri, Editors. World Wide Web Consortium, &draft.day;,
          &draft.month; &draft.year;. This version of the 
          &framework.title; specification is at http://www.w3.org/TR/ws-policy/. The <loc href="http://www.w3.org/TR/ws-policy/">latest version of
            &framework.title;</loc> is available at http://www.w3.org/TR/ws-policy/. </bibl>
				<bibl id="WS-PolicyAttachment" key="Web Services Policy Attachment" href="http://www.w3.org/TR/ws-policy-attach/">
					<titleref>&attachment.title;</titleref>, A. S. Vedamuthu, D. Orchard, M. Hondo, T.
          Boubez and P. Yendluri, Editors. World Wide Web Consortium, &draft.day;,
          &draft.month; &draft.year;. This version of the 
          &attachment.title; specification is at http://www.w3.org/TR/ws-policy-attach. The <loc href="http://www.w3.org/TR/ws-policy-attach/">latest version of
            &attachment.title;</loc> is available at
          http://www.w3.org/TR/ws-policy-attach/. </bibl>
				<bibl id="WS-Policy-Primer" key="Web Services Policy Primer" href="http://dev.w3.org/cvsweb/~checkout~/2006/ws/policy/ws-policy-primer.html?content-type=text/html;%20charset=utf-8">
					<titleref>&primer.title;</titleref>, A. S. Vedamuthu, D. Orchard, M. Hondo, T.
          Boubez and P. Yendluri, Editors. World Wide Web Consortium, Draft. </bibl>
				<bibl id="WS-RM" key="Web Services Reliable Messaging" href="http://docs.oasis-open.org/ws-rx/wsrm/200608/wsrm-1.1-rddl-200608.html">
					<titleref>Web Services Reliable Messaging (WS-ReliableMessaging)</titleref>, Doug Davis (IBM), Anish Karmarkar (Oracle),
          Gilbert Pilz (BEA), Steve Winkler (SAP), Umit Yalcinalp
          (SAP), August 7th, 2006, available at:
          http://docs.oasis-open.org/ws-rx/wsrm/200608/wsrm-1.1-rddl-200608.html
          </bibl>
				<bibl id="WS-RM-Policy" key="Web Services Reliable Messaging Policy" href="http://docs.oasis-open.org/ws-rx/wsrmp/200608/wsrmp-1.1-rddl-200608.html">
					<titleref>Web Services Reliable Messaging Policy Assertion v1.1</titleref>, Doug Davis (IBM), Anish Karmarkar (Oracle),
          Gilbert Pilz (BEA), Steve Winkler (SAP), Umit Yalcinalp
          (SAP), August 4, 2006, available at:
          http://docs.oasis-open.org/ws-rx/wsrmp/200608/wsrmp-1.1-rddl-200608.html
          </bibl>
				<bibl id="WS-Security2004" key="WS-Security 2004" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf">
					<titleref>Web Services Security: SOAP Message Security
          1.0</titleref>, A. Nadalin, C.  Kaler, P. Hallam-Baker and
          R. Monzillo, Editors. Organization for the Advancement of
          Structured Information Standards, March 2004. Available at
          http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf. </bibl>
				<bibl id="WS-SecurityPolicy" key="WS-SecurityPolicy" href="http://www.oasis-open.org/committees/download.php/15979/oasis-wssx-ws-securitypolicy-1.0.pdf">
					<titleref>WS-SecurityPolicy v1.0</titleref>, A. Nadalin,
          M. Gudgin, A. Barbir, and H.  Granqvist,
          Editors. Organization for the Advancement of Structured
          Information Standards, 8 December 2005. Available at
          http://www.oasis-open.org/committees/download.php/15979/oasis-wssx-ws-securitypolicy-1.0.pdf. </bibl>
				<bibl id="WS-Trust" key="WS-Trust" href="http://schemas.xmlsoap.org/ws/2005/02/trust">
					<titleref>Web Services Trust Language (WS-Trust)</titleref>,
          S. Anderson, et al, Authors.  Actional Corporation, BEA
          Systems, Inc., Computer Associates International, Inc.,
          International Business Machines Corporation, Layer 7
          Technologies, Microsoft Corporation, Oblix Inc., OpenNetwork
          Technologies Inc., Ping Identity Corporation, Reactivity
          Inc., RSA Security Inc., and VeriSign Inc., February
          2005. Available at
          http://schemas.xmlsoap.org/ws/2005/02/trust. </bibl>
      <bibl id="UDDIAPI20" key="UDDI API 2.0" href="http://uddi.org/pubs/ProgrammersAPI-V2.04-Published-20020719.htm">
	<titleref>UDDI Version 2.04 API</titleref>, T. Bellwood,
	Editor.  Organization for the Advancement of Structured
	Information Standards, 19 July 2002. This version of UDDI
	Version 2.0 API is
	http://uddi.org/pubs/ProgrammersAPI-V2.04-Published-20020719.htm. The
	<loc href='http://uddi.org/pubs/ProgrammersAPI_v2.htm'>latest
	version of the UDDI 2.0 API</loc> is available at
	http://uddi.org/pubs/ProgrammersAPI_v2.htm.
      </bibl>
      <bibl id="UDDIDataStructure20" key="UDDI Data Structure 2.0" href="http://uddi.org/pubs/DataStructure-V2.03-Published-20020719.htm">
	<titleref>UDDI Version 2.03 Data Structure
	Reference</titleref>, C. von Riegen, Editor. Organization for
	the Advancement of Structured Information Standards, 19 July
	2002. This version of UDDI Version 2.0 Data Structures is
	http://uddi.org/pubs/DataStructure-V2.03-Published-20020719.htm. The
	<loc href='http://uddi.org/pubs/DataStructure_v2.htm'>latest
	version of the UDDI 2.0 Data Structures</loc> is available at
	http://uddi.org/pubs/DataStructure_v2.htm.
      </bibl>
	<bibl id="UDDI30" key="UDDI 3.0" href="http://uddi.org/pubs/uddi-v3.0.1-20031014.htm">
	  <titleref>UDDI Version 3.0.1</titleref>, L. Cl&#233;ment, et
	  al, Editors. Organization for the Advancement of Structured Information Standards, 14 October 2003. This version of the
	  UDDI Version 3.0 is
	  http://uddi.org/pubs/uddi-v3.0.1-20031014.htm. The <loc
	  href='http://uddi.org/pubs/uddi_v3.htm'>latest version of
	  the UDDI 3.0</loc> specification is available at
	  http://uddi.org/pubs/uddi_v3.htm.
	</bibl>
			</blist>
		</div1>&acknowledgements; <inform-div1 id="change-description">
			<head>Changes in this Version of
          the Document</head>
			<p>A list of substantive changes since the previous publication is below:</p>
			<ulist>
				<item>
					<p>TBD</p>
				</item>
			</ulist>
		</inform-div1>
		<inform-div1 id="change-log">
			<head>&guideline.title; Change Log</head>
			<table id="ws-policy-primer-changelog-table" border="1">
				<tbody>
					<tr>
						<th rowspan="1" colspan="1">Date</th>
						<th rowspan="1" colspan="1">Author</th>
						<th rowspan="1" colspan="1">Description</th>
					</tr>
					<!-- template
          <tr>
          <td>200505</td>
          <td></td>
          <td></td>
          </tr>
        -->
					<tr>
						<td>20060829</td>
						<td>UY</td>
						<td>Created first draft based on agreed outline and content</td>
					</tr>
					<tr>
						<td>20061013</td>
						<td>UY</td>
						<td>Editorial fixes (suggested by Frederick), fixed references, bibl items, fixed dangling pointers, created eds to do</td>
					</tr>
					<tr>
						<td>20061018</td>
						<td>MH</td>
						<td>Editorial fixes for readability, added example for Encrypted parts</td>
					</tr>
					<tr>
						<td>20061030</td>
						<td>UY</td>
						<td>Fixes for Paul Cotton's editorial comments (20061020)</td>
					</tr>
					<tr>
						<td>20061031</td>
						<td>UY</td>
						<td>Fixes for Frederick's editorial comments (20061025)</td>
					</tr>
<tr>
						<td>20061031</td>
						<td>UY</td>
						<td>Optionality discussion feedback integration</td>
					</tr>
				</tbody>
			</table>
		</inform-div1>
	</back>
</spec>

