<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.7//EN"
"http://www.w3.org/2002/xmlspec/dtd/2.7/xmlspec.dtd"
[
<!ENTITY wsdl20-p1 "http://www.w3.org/TR/2003/WD-wsdl20-20031110/">
]
>
<?xml-stylesheet type="text/xsl" href="../../2002/xmlspec/xhtml/1.10/xmlspec.xsl"?>
<spec w3c-doctype="other">
  <header>
    <title>Use of the P3P generic attribute in WSDL 2.0</title>
    <w3c-designation>doc</w3c-designation>
    <w3c-doctype>Draft</w3c-doctype>
    <pubdate>
      <day>$Date: 2003/12/18 18:24:05 $</day>
      <month></month>
      <year></year>
    </pubdate>
    <publoc><loc
    href="http://www.w3.org/2003/12/p3p-wsdl">http://www.w3.org/2003/12/p3p-wsdl</loc></publoc>
    <altlocs>
      <loc href="p3p-wsdl.html">XHTML version</loc>
      <loc href="p3p-wsdl.xml">XML version</loc>
    </altlocs>
    <prevlocs><loc href="05-p3p-ws.html">Notes about P3P and Web
    services</loc>
    </prevlocs>
    <authlist>
      <author>
	<name>Hugo Haas</name>
	<affiliation>W3C</affiliation>
      </author>
    </authlist>
    <abstract>
      <p>This document explains how to use the P3P generic attribute
      with a WSDL 2.0 description in order to express a Web service's
      privacy policy.</p>
    </abstract>
    <status>
      <p>This document is a first draft and has no formal
      status.</p>
      <p>Review from WSDL 2.0 and P3P people is welcome. Please send comments to <loc href="mailto:hugo@w3.org">hugo@w3.org</loc>.</p>
    </status>
    <langusage>
      <language id="en-US">American English</language>
    </langusage>
    <revisiondesc>
      <p>$Id: p3p-wsdl.xml,v 1.11 2003/12/18 18:24:05 hugo Exp $</p>
    </revisiondesc>
  </header>
  <body>

    <div1 id="intro">
      <head>Introduction</head>

      <p>The same way Web sites have privacy policy, Web services are
      impacted by privacy concerns, as shown in <bibref
      ref="p3pbh"/>. Users of Web services may want to know the use
      that the service provider is going to make of the data sent to
      the service before using this service.</p>
      <p>The Platform for Privacy Preferences 1.0 (P3P1.0)
      Specification <bibref ref="p3p"/> defines a language to
      express and interpret policies in a machine-processable way.</p>
      <p>The Web Services Description Language (WSDL) 2.0 <bibref
      ref="wsdlp1"/> is an XML language for describing Web
      services. When used in combination with P3P, one can express the
      privacy policy of a Web service.</p>
      <p>This document shows how to use the generic P3P attribute
      <bibref ref="p3patt"/> to extend a WSDL 2.0 description to
      specify services' privacy policies.</p>
    </div1>

    <div1 id="granws">
      <head>Granularity of privacy policies in a service description</head>

      <div2 id="wsdl20cm">
	<head>WSDL 2.0 component model</head>

	<p>In the context of Web services, a privacy policy applies to
	the data which is being exchanged between the Web service
	requester and the Web service provider.</p>

	<p>This data, i.e. its format and the specifics of the
	information exchange between the requester and the provider,
	are described by <xspecref
	href="&wsdl20-p1;#component_model">WSDL 2.0 using the
	following component model</xspecref>:</p>

	<ulist>
	  <item><p>the format of the <emph>messages</emph> exchanged
	  are described using a schema language;</p></item>
	  <item><p>messages are associated into <emph>interface
	  operations</emph> forming message exchange
	  patterns;</p></item>
	  <item><p><emph>interfaces</emph> describe sets of messages
	  that a service sends and/or receives, and are expressed as a
	  set of interface operations;</p></item>
	  <item><p><emph>bindings</emph> represent the binding of an
	  interface, which is abstract, to a concrete message format
	  and transmission protocol (e.g. SOAP 1.2 over
	  HTTP/1.1);</p></item>
	  <item><p><emph>endpoints</emph> are network locations (URL)
	  at which a binding of an interface is available;</p></item>
	  <item><p>finally, the set of endpoints described is
	  logically grouped into a <emph>service</emph>.</p></item>
	</ulist>

	<p>In such a model, different components may have different
	privacy policies applying to them.</p>
      </div2>

      <div2 id="privpolcomp">
	<head>Privacy policies and components</head>

	<p>A privacy policy may be applied to different WSDL 2.0
	components.</p>

	<p>First, a message may contain information for which
	different policies apply, e.g. a DNS domain name versus a
	physical address versus a credit card number.</p>

	<p>Second, the implementation of a service might be done with
	different privacy policies. An endpoint might be collecting
	private information, while another, implementing the same
	interface with the exact same binding, might be logging access
	for audit purposes; a third one, still providing the same
	service, may not be keeping any kind of record of the
	transactions processed.</p>

	<p>Also, one might want to specify a privacy policy of a
	particular binding to certain values, e.g. because of some
	characteristics of the implementation used by all the
	endpoints.</p>

	<p>Therefore, for each component, one might want to associate
	a privacy policy for the data exchange described by this
	component.</p>

      </div2>

    </div1>

    <div1 id="useofp3patt">
      <head>Use of the P3P generic attribute in WSDL 2.0</head>

      <p>Using <xspecref href="&wsdl20-p1;#aii-extensbility">WSDL
      2.0's attribute-base extensibility mechanism</xspecref>, privacy
      policies can be indicated in a WSDL 2.0 document using the P3P
      generic attribute as defined in <bibref ref="p3patt"/>.</p>

      <ednote>
	<edtext>Here I am making some assumptions about what a P3P
	generic attribute would look like; these will have to be
	revisited once it exists</edtext>
      </ednote>

      <p>The P3P generic attribute identifies the privacy policy
      associated with the data enclosed or represented by an
      element. In the case of a WSDL 2.0 service description, it
      indicates the privacy policy associated with the data exchange
      which is being represented by the element information item it is
      attached to, as explained in section <specref ref="sematt"/>.</p>

      <div2 id="sematt">
	<head>Semantics of the P3P generic attribute on WSDL 2.0
	components</head>

	<p>The P3P generic attribute can be used on any XML element:</p>

<eg xml:space="preserve">&lt;!-- Extracted from an email from MSM --&gt;
&lt;!-- Sample attribute definition --&gt;
&lt;xsd:schema
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 targetNamespace=&quot;http://www.w3.org/2004/01/P3Pv11&quot;
 &gt;
 &lt;xsd:annotation&gt;
  &lt;xsd:documentation&gt;
   &lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;p&gt;Sample schema document for Rigo Wenning, to demonstrate
     how to declare a global attribute.&lt;/p&gt;                   
    &lt;p&gt;Here, we let the attribute be called 'p3p-gen'.&lt;/p&gt;
   &lt;/div&gt;
  &lt;/xsd:documentation&gt;
 &lt;/xsd:annotation&gt;

 &lt;xsd:attribute name=&quot;p3p-gen&quot; type=&quot;xsd:anyURI&quot;&gt;
  &lt;xsd:annotation&gt;
   &lt;xsd:documentation&gt;
    &lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
     &lt;p&gt;The P3P-generic attribute takes a URI as its value.&lt;/p&gt;
     &lt;p&gt;The meaning is that a P3P document describing the privacy
      policy relevant to this element may be found at the URI
      given.&lt;/p&gt;
     &lt;p&gt;Examples: ...&lt;/p&gt;
     &lt;p&gt;Other notes: ...&lt;/p&gt;
    &lt;/div&gt;
   &lt;/xsd:documentation&gt;
  &lt;/xsd:annotation&gt;
 &lt;/xsd:attribute&gt;
&lt;/xsd:schema&gt;
</eg>

	<p>This section therefore describes the meaning of the use of the P3P generic attribute can be used on components of a WSDL 2.0 description.</p>

	<ednote><edtext>What about the use of the attribute on features?</edtext></ednote>

	<div3 id='messsem'>
	  <head>Message definition</head>

	  <p>In WSDL 2.0, message format is defined by an XML element
	  declaration.</p>
	  <p>The P3P generic attribute may be used in the declaration
	  of an XML element. If it is the case, it associates a
	  privacy policy with the content of the element (either
	  simple or complex) it applies to.</p>
	</div3>

	<div3 id='inoutmesssem'>
	  <head>WSDL 2.0's <el>input</el>, <el>output</el>,
	  <el>infault</el>, <el>outfault</el> element
	  information items</head>

	  <p>The P3P generic attribute associates a privacy policy
	  to all data which is being sent or received in the message referenced
	  by the <att>message</att> attribute<!-- (see also <specref ref="messsem"/>)-->.</p>
	</div3>

	<div3 id='operationsem'>
	  <head>WSDL 2.0's <el>operation</el> element information
	  item</head>

	  <p>On this element information item, the P3P generic
	  attribute associates a privacy policy to all data which is
	  being received and/or sent through by the interface
	  operation, i.e. included in any of the set of (ordinary and
	  fault) messages being exchanged as part of the operation and
	  represented by its <el>input</el>, <el>output</el>,
	  <el>infault</el>, <el>outfault</el> children elements<!-- (see
	  also <specref ref="inoutmesssem"/>)-->.</p>
	  </div3>

	  <div3 id='interfacesem'>
	    <head>WSDL 2.0's <el>interface</el> element information
	    item</head>

	    <p>On this element information item, the P3P generic
	    attribute associates a privacy policy to all data which is
	    being received and/or sent through the interface, i.e. through all the
	    interface operations represented by its <el>operation</el>
	    childrens<!-- (see <specref ref="operationsem"/>)-->.</p>
	  </div3>

	  <div3 id='bindingsem'>
	    <head>WSDL 2.0's <el>binding</el> element information
	    item</head>

	    <p>On this element information item, the P3P generic
	    attribute associates a privacy policy to all data which is
	    contained by the (ordinary or fault) messages received and/or sent using
	    this binding.</p>

	    <p>The <el>binding</el> element information item can
	    specify a binding of an interface<!-- (see <specref
	    ref="interfacesem"/>)-->, an operation<!-- (see <specref
	    ref="operationsem"/>)-->, a message reference or a fault
	    reference<!-- (see <specref ref="inoutmesssem"/>)-->.</p>
	  </div3>

	  <div3 id='endpointsem'>
	    <head>WSDL 2.0's <el>endpoint</el> element information
	    item</head>

	    <p>On this element information item, the P3P generic
	    attribute associates a privacy policy to all data which is
	    being received and/or sent through the binding represented by its
	    <att>binding</att> attribute<!-- (see <specref ref="bindingsem"/>)-->.</p>
	  </div3>

	  <div3 id='servicesem'>
	    <head>WSDL 2.0's <el>service</el> element information
	    item</head>

	    <p>On this element information item, the P3P generic
	    attribute associates a privacy policy to all data which is
	    being received and/or sent by the service, i.e. through all the
	    endpoints represented by its <el>endpoint</el>
	    children elements<!-- (see <specref ref="endpointsem"/>)-->.</p>
	  </div3>
	
      </div2>

      <div2 id="resol">
	<head>Resolution of policy conflicts</head>

	<ednote><edtext>That should probably be handled by the P3P
	generic attribute spec</edtext></ednote>

	<p>As shown in <specref ref="granws"/>, privacy policy can be
	expressed on a number of components, and each component
	reference other components that might themselves have a
	privacy policy associated with them.</p>
	
	<ednote><edtext>1. Complex solution: merging</edtext></ednote>

	<p>When several P3P policy files are being encountered for a
	service (e.g. on an operation and on the interface referencing
	this operation), all claims made by all P3P policies applying
	to a particular piece of data must be taken into account by
	the service requester.</p>

	<p>In case the policy files contain conflicting information,
	all privacy claims must be ignored.</p>

	<ednote><edtext>2. Simpler solution: 2 policies,
	fail</edtext></ednote>

	<p>If, after following the rules in section <specref
	ref="sematt"/>, more than one policy applies to a piece of
	data, the service requester must ignore all privacy claims
	made about this data.</p>
      </div2>

    </div1>

    <div1 id="ex">
	<head>Example</head>

	<ednote><edtext>Example for the complex case</edtext></ednote>

	<p>Here is an <loc href="wsdl20-example.wsdl">example</loc> of use of the P3P generic attribute on a
	WSDL 2.0 file.</p>

	<example>
	  <head>Example of a WSDL 2.0 file with P3P policies</head>
	  <eg xml:space="preserve">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!-- Hopefully valid WSDL 2.0 --&gt;
&lt;definitions xmlns=&quot;http://www.w3.org/2003/11/wsdl&quot;
	     xmlns:myns=&quot;http://example.org/myservice&quot;
	     xmlns:mytypes=&quot;http://example.org/myservice-types&quot;
	     xmlns:p3patt=&quot;http://www.w3.org/2004/01/P3Pv11&quot;
	     xmlns:soap=&quot;http://www.w3.org/2003/06/wsdl/soap12&quot;
	     targetNamespace=&quot;http://example.org/myservice&quot; &gt;
  &lt;documentation&gt;
    Sample service definition showing the use of the P3P generic attribute
  &lt;/documentation&gt;

  &lt;types&gt;
    &lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
	    targetNamespace=&quot;http://example.org/myservice-types&quot;&gt;
      &lt;xsd:complexType name=&quot;commentStruct&quot;&gt;
	&lt;xsd:sequence&gt;
	  &lt;xsd:element name=&quot;phonenumber&quot; type=&quot;xsd:string&quot;
		       p3patt:p3p-gen=&quot;http://example.com/p3p-pol1.xml&quot; /&gt;
	  &lt;xsd:element name=&quot;status&quot; type=&quot;xsd:anyURI&quot;
	  &lt;xsd:attribute name=&quot;date&quot; type=&quot;xsd:date&quot;
		       p3patt:p3p-gen=&quot;http://example.com/p3p-pol2.xml&quot; /&gt;
	&lt;/xsd:sequence&gt;
      &lt;/xsd:complexType&gt;
      &lt;xsd:element name=&quot;commentReq&quot; type=&quot;mytypes:commentStruct&quot;/&gt;
      &lt;xsd:element name=&quot;commentResp&quot; type=&quot;xsd:string&quot;/&gt;
    &lt;/xsd:schema&gt;
  &lt;/types&gt;

  &lt;interface
   name=&quot;Interface&quot;&gt;

    &lt;operation
     name=&quot;Operation&quot; 
     pattern=&quot;http://www.w3.org/2003/11/wsdl/in-out&quot;&gt;
      &lt;input message=&quot;mytypes:commentReq&quot;/&gt;
      &lt;output message=&quot;myntypes:commentResp&quot;/&gt;
    &lt;/operation&gt;

  &lt;/interface&gt;
  
  &lt;binding name=&quot;Binding&quot; interface=&quot;myns:Interface&quot;&gt;
    &lt;soap:binding protocol=&quot;http://www.w3.org/2003/05/soap/bindings/HTTP/&quot;/&gt;
  &lt;/binding&gt;

  &lt;service
        name=&quot;Service&quot; 
        interface=&quot;myns:Interface&quot; &gt;
    &lt;endpoint
          name=&quot;Endpoint1&quot; 
          binding=&quot;myns:binding&quot;
	  p3patt:p3p-gen=&quot;http://example.com/p3p-pol3.xml&quot;&gt;
    &lt;soap:address location=&quot;http://ws.example.org/myservice&quot; /&gt; 
    &lt;/endpoint&gt;
  &lt;/service&gt;

&lt;/definitions&gt;</eg>
	</example>

	<p>If <loc
	href="p3p-pol1.xml">http://example.com/p3p-pol1.xml</loc> is:</p>
	
	<example>
	  <head>Privacy policy #1</head>
	  <eg xml:space="preserve">&lt;POLICIES xmlns=&quot;http://www.w3.org/2002/01/P3Pv1&quot;&gt;
 &lt;POLICY name=&quot;nice&quot; 
     discuri=&quot;http://example.com/pol1.html&quot;
     xml:lang=&quot;en&quot;&gt;
  &lt;ENTITY&gt;
   &lt;DATA-GROUP&gt;
    &lt;DATA ref=&quot;#business.name&quot;&gt;CatalogExample&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.street&quot;&gt;4000 Lincoln Ave.&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.city&quot;&gt;Birmingham&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.stateprov&quot;&gt;MI&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.postalcode&quot;&gt;48009&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.country&quot;&gt;USA&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.online.email&quot;&gt;catalog@example.com&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.telecom.telephone.intcode&quot;&gt;1&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.telecom.telephone.loccode&quot;&gt;248&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.telecom.telephone.number&quot;&gt;3926753&lt;/DATA&gt;
   &lt;/DATA-GROUP&gt;
  &lt;/ENTITY&gt;
  &lt;ACCESS&gt;&lt;nonident/&gt;&lt;/ACCESS&gt;
  &lt;DISPUTES-GROUP&gt;
   &lt;DISPUTES resolution-type=&quot;independent&quot;
     service=&quot;http://www.PrivacySeal.example.org&quot;
     short-description=&quot;PrivacySeal.example.org&quot;&gt;
    &lt;IMG src=&quot;http://www.PrivacySeal.example.org/Logo.gif&quot; alt=&quot;PrivacySeal's logo&quot;/&gt;
    &lt;REMEDIES&gt;&lt;money/&gt;&lt;/REMEDIES&gt;
   &lt;/DISPUTES&gt;
  &lt;/DISPUTES-GROUP&gt;
  &lt;STATEMENT&gt;
   &lt;PURPOSE&gt;&lt;admin/&gt;&lt;develop/&gt;&lt;/PURPOSE&gt;
   &lt;RECIPIENT&gt;&lt;ours/&gt;&lt;/RECIPIENT&gt;
   &lt;RETENTION&gt;&lt;stated-purpose/&gt;&lt;/RETENTION&gt;
   &lt;DATA-GROUP&gt;
    &lt;DATA ref=&quot;#dynamic.http&quot;/&gt;
   &lt;/DATA-GROUP&gt;
  &lt;/STATEMENT&gt;
 &lt;/POLICY&gt;
&lt;/POLICIES&gt;</eg>
	</example>

	<p>And if <loc
	href="p3p-pol3.xml">http://example.com/p3p-pol3.xml</loc> is:</p>

	<example>
	  <head>Privacy policy #3</head>
	  <eg xml:space="preserve">&lt;POLICIES xmlns=&quot;http://www.w3.org/2002/01/P3Pv1&quot;&gt;
 &lt;POLICY name=&quot;lessnice&quot; 
     discuri=&quot;http://example.com/pol3.html&quot;
     xml:lang=&quot;en&quot;&gt;
  &lt;ENTITY&gt;
   &lt;DATA-GROUP&gt;
    &lt;DATA ref=&quot;#business.name&quot;&gt;Invisible Corp.&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.street&quot;&gt;Cloud 9&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.postal.city&quot;&gt;The sky&lt;/DATA&gt;
    &lt;DATA ref=&quot;#business.contact-info.online.email&quot;&gt;invisible@example.com&lt;/DATA&gt;
   &lt;/DATA-GROUP&gt;
  &lt;/ENTITY&gt;
  &lt;ACCESS&gt;&lt;all/&gt;&lt;/ACCESS&gt;
  &lt;DISPUTES-GROUP&gt;
   &lt;DISPUTES resolution-type=&quot;independent&quot;
     service=&quot;http://www.PrivacySeal.example.org&quot;
     short-description=&quot;PrivacySeal.example.org&quot;&gt;
    &lt;REMEDIES&gt;&lt;correct/&gt;&lt;/REMEDIES&gt;
   &lt;/DISPUTES&gt;
  &lt;/DISPUTES-GROUP&gt;
  &lt;STATEMENT&gt;
   &lt;PURPOSE&gt;&lt;contact/&gt;&lt;telemarketing/&gt;&lt;/PURPOSE&gt;
   &lt;RECIPIENT&gt;&lt;public/&gt;&lt;/RECIPIENT&gt;
   &lt;RETENTION&gt;&lt;indefinitely/&gt;&lt;/RETENTION&gt;
   &lt;DATA-GROUP&gt;
    &lt;DATA ref=&quot;#user.home-info.telephonenum&quot;/&gt;
   &lt;/DATA-GROUP&gt;
  &lt;/STATEMENT&gt;
 &lt;/POLICY&gt;
&lt;/POLICIES&gt;</eg>
	</example>
	
	<p>Although privacy policy #1 claims that no personal data is
	going to be used for purposes other than the administration of
	the Web service, privacy policy #3 claims that telephone
	numbers may be used for telemarketing.</p>

	<p>Therefore, the phone number provided in the the
	<el>phonenumber</el> element of the input message in
	Endpoint1, having both policy #1 and #3 applying to it, will
	likely be used by telemarketers.</p>

    </div1>

    <div1 id="ref">
      <head>References</head>

      <blist>
	<bibl key="P3P1.0" id='p3p'
	      href="http://www.w3.org/TR/2002/REC-P3P-20020416/">
	  <titleref>The Platform for Privacy Preferences 1.0 (P3P1.0)
	  Specification</titleref>, L. Cranor, M. Langheinrich,
	  M. Marchiori, M. Presler-Marshall, J. Reagle, W3C
	  Recommendation, 16 April 2002
	</bibl>
	<bibl key="P3P-att" id="p3patt">
	  P3P generic attribute, <emph>not written yet</emph>
	</bibl>
	<bibl key="P3PBH" id='p3pbh'
	      href="http://www.w3.org/P3P/2003/p3p-beyond-http/Overview.html">
	  <titleref>P3P: Beyond HTTP</titleref>, J. Reagle, P. Hung,
	  Task Force Report, 18 April 2003
	</bibl>
	<bibl key="WSDL2.0"
	      href="&wsdl20-p1;"
	      id="wsdlp1">
	  <titleref>Web Services Description Language (WSDL) Version
	  2.0 Part 1: Core Language</titleref>, R. Chinnici,
	  M. Gudgin, J-J. Moreau, S. Weerawarana, W3C Working Draft,
	  10 November 2003
	</bibl>
      </blist>
    </div1>

  </body>
</spec>
