An Introduction To The Web Services Architecture and Its Specifications
An Introduction To The Web Services Architecture and Its Specifications
An Introduction To The Web Services Architecture and Its Specifications
Version 2.0
October 2004
Authors
Copyright Notice
Summary:This introduction to the Web services architecture describes the design principles
underlying the architecture and foundational technologies for Web services. Features are
described and linked to the specifications that formally define them. This paper also serves
as a reference guide to all the specifications in the architecture. (51 printed pages)
Status
The contents of this white paper reflect the features of the various Web services
specifications at revision levels current as of the publication date. As the Web services
specifications are refined and additional specifications are released, this paper will be
updated to reflect the most recent changes.
Contents
Introduction
Message-Orientation
Protocol Composability
Autonomous Services
Managed Transparency
Protocol-Based Integration
The Web Services Architecture
Core Messaging
XML and the Infoset
SOAP
Message Exchange Patterns
Transport Independence
Addressing
Metadata
Security
Message Integrity and Confidentiality
Trust Based on Security Tokens
Secure Sessions
Security Policies
System Federations
Discovery
Directories
Dynamic Discovery
Agreement Coordination Protocols – Reliable Messaging and Transactions
Reliable Messaging
Designated Coordinators
Enumeration, Transfer, and Eventing
Enumeration
Transfer
Eventing
Management
Concluding Remarks
Acknowledgements
Appendix A: Glossary
Appendix B: XML Infoset Information Items
Appendix C: Common Security Attacks
Appendix D: References
Core Specifications
Web Services Specifications
Interoperability Profiles
Other Resources
Introduction
The Web has been a phenomenal success at enabling simple computer/human interactions
at Internet scale. The original HTTP [HTTP] and HTML [HTML] protocol stack used by today's
Web browsers has proven to be a cost-effective way to project user interfaces onto a wide
array of devices. A key factor in the success of HTTP and HTML was their relative simplicity—
both HTTP and HTML are primarily text-based and can be implemented using a variety of
operating systems and programming environments.
Web services take many of the ideas and principles of the Web and apply them to
computer/computer interactions. Like the World Wide Web, Web services communicate
using a set of foundation protocols that share a common architecture and are meant to be
realized in a variety of independently developed and deployed
systems
. Like the World Wide Web, Web services protocols owe much to the text-based heritage of
the Internet and are designed to layer as cleanly as possible without undue dependencies
within the protocol stack.
An important area in which Web services differ from the World Wide Web is scope. HTTP and
HTML were designed around "read-mostly" interactive browsing of content that is often
static, or at least highly cacheable. In contrast, the Web services architecture is designed for
highly dynamic program-to-program interactions. In the Web services architecture, many
kinds of distributed systems may be implemented. Examples include synchronous and
asynchronous messaging systems, distributed computational clusters, mobile-networked
systems, grid systems, and peer-to-peer environments. The broad spectrum of requirements
in program-to-program interactions forces the Web services protocol stack to be much more
general purpose than the first Web protocols. However, like the Web, Web services rely on a
small number of specific protocols. We discuss these at more length later.
We envision that the next generation of mainstream applications will be based on
autonomous Web services. The implications of autonomy are central to the architecture, and
they will be explored throughout this paper. The technical content of this paper describes
the infrastructure protocols defining the Web services architecture and a key concept
needed to build autonomous distributed applications—the concept of contracts.
The core principles that have driven the design and implementation of the Web service
architecture protocols are as follows:
Message-Orientation
Web services communicate using messages. They place a significant emphasis on how
individual messages are formed and processed. Unlike RPC systems in which messages are
strictly subordinate to the local programming experience, the Web services architecture is
built with messages as the atomic unit of communication. This is true not only of the wire
format used for message exchanges (SOAP [SOAP]), but also for the descriptions of a given
Web service (WSDL [WSDL]). Granted, some developers may choose to view a Web service
using the remote procedure call metaphor; however, this decision is local to that developer's
code and not visible on the wire.
Web services assume SOAP as the lowest layer in the protocol stack and isolates message
transfer from transport details. Ideally, protocol-specific bindings do not leak into application
semantics. This approach provides a sound base for achieving service interoperability
among development platforms, and provides for richer communication patterns. Web
services have typically relied on HTTP as the underlying message transport. By leveraging
the open extensibility of HTTP POST, many Web services have been bootstrapped using off-
the-shelf Web technologies. As more sophisticated applications of Web services emerge, the
importance of other transports becomes clear. For example, it is cumbersome, at best, to
implement full-duplex message exchanges over HTTP's strict request/reply discipline. In
contrast, sending SOAP messages over TCP [TCPIP] using a lightweight framing protocol
allows any two-party message exchange pattern to be implemented trivially.
Web services may distribute the processing of a given message across multiple network
nodes, each of which contributes some piece of functionality, such as access checks,
content-based routing, or application-specific validation. This distributed processing model
implies that a given message may need to traverse two or more message transports prior to
arriving at the ultimate receiver. For that reason, much of the early protocol work in Web
services was focused on providing end-to-end secure and reliable message delivery over
arbitrary transports. For the simplest deployments in a single trustdomain where a secure and
reliable transport is available (e.g., TLS [TLS] over TCP or HTTP), more robust protocols such
as WS-Security [WS-Security] or WS-ReliableMessaging [WS-RM] are optional. For richer
deployments, these latter protocols are essential.
Protocol Composability
Protocols are said to compose when they can be used either independently or in
combination. Numerous domain-specific communication protocols are effectively "silos" in
which protocol designers find themselves coining new mechanisms for dealing with security,
reliability, error reporting, etc. Given the broad applicability of Web services, this approach
to defining an entire protocol for each vertical domain breaks when domains overlap and
becomes extremely costly in terms of both initial development and ongoing support costs.
To avoid these costs, the Web services protocol suite is designed as a family of composable
protocol building blocks. By design, each of the infrastructure protocols defines a fine-
grained unit of functionality. For example, the basics of signing and sealing message
contents is generic enough that it is specified once (in WS-Security) and then leveraged by
various infrastructure protocols and application-level protocols.
Web service protocol composition is based on the modular architecture of SOAP. SOAP's
architecture anticipates the composition of infrastructure protocols through the use of a
flexible header mechanism. One advantage of this approach is that the protocol surface area
for a particular application is based on the actual features used by that application. A given
protocol imposes absolutely no cost to applications that do not use it. Software operating on
computing devices of various scales can use the exact protocols they need, maximizing the
applicability of the architecture. A second advantage is that new protocols can be introduced
at any time to complement the existing ones and extend functionality. The ability to
innovate is thus built-in to the architecture. The challenge of getting a coherent and
comprehensive view of the spectrum of available protocols is real. Addressing this challenge
is the goal of this document.
Specification profiles are provided to define usage constraints and the best practices for use
of these specifications in various combinations. More information on specific profiles is
provided in the
section
on Interoperability Profiles, the WS-I Basic Security Profile, and the Device Profile for Web
services.
Autonomous Services
Autonomous services must also maintain control over the resources they manage. In
particular they need to recycle resources created by requests of services that will not
interact again. Resource reclamation policies are needed for all kinds of resources. A popular
scheme is the use of leases as exemplified by subscriptions for event notification later in this
paper. Asynchronous messaging allows services to have complete local control over the
scheduling of message processing. Services also have flexibility regarding message
transmissions, connectivity management, and independent failure modes.
Finally, the autonomous nature of Web services invariably requires processes or systems
that were at one time centralized to move to a federated model. This is true not only of
security identities, but also of service directories and systems management as well. These
new systems have to operate well in the presence of unbounded message latencies,
independent failure modes, and when services are intermittently connected to the network.
Managed Transparency
All implementation details are private to a service. The message-oriented façade that every
service exposes provides ample insulation from the implementation choices made by a
particular service developer. This opacity is critical to service autonomy, and allows
flexibility of programming models, operating systems, and other implementation details. It
also allows the substitution of one service implementation for another. Ideally, as long as
both services respond to the same set of request messages with comparable results, the
requestor is none the wiser that a different implementation of a service has been used.
Given the emphasis on autonomous services, it is somewhat ironic that Web services place a
great deal of emphasis on the transparency of implementation-specific information. For
example, if a service were completely opaque, one could not tell whether the set of input
messages accepted by Service A were similar to or different from those accepted by Service
B. For this reason, services are expected to make their publicly visible aspects transparent
to the outside world. This transparency is achieved through the use of contracts, machine-
readable descriptions of the messages a service sends or receives, as well as the abstract
capabilities and requirements of the service.
Public service descriptions are essential for creating a rich ecosystem for tools and
execution environments, and play an important part in achieving interoperability between
heterogeneous systems. Development tools rely on service descriptions in order to create
programmer-friendly language bindings for the messages a service accepts or sends.
Deployment tools rely on service descriptions to wire up a deployed service to one or more
publicly visible endpoint addresses. Management tools rely on service descriptions to track
whether a given service is operating within its expected collection of input and output
messages. Finally, the runtime binding of a requestor to a given service can take advantage
of service descriptions to ensure that a compatible service is selected during the normal
execution of an application.
Managed transparency not only applies to descriptions of services, but also to the messages
themselves. Unlike monolithic protocols of the past, SOAP and WS-Security together provide
a flexible security layer in which different parts of a message may have distinct security
characteristics. This means that the sender may elect to leave some aspects of the message
completely transparent and visible to all potential readers, while encrypting other parts of
the message for only a trusted set of readers to see. In the general case, each message part
may be encrypted for a distinct set of readers. Those message parts that are not encrypted
can be signed to protect them against tampering.
Protocol-Based Integration
Application integration is simplified when message-based protocols are used for all
communication. By building a self-contained system for description and messaging that is
devoid of programming language or operating system details, Web services have shown that
it is possible for applications running in truly disparate environments to communicate
securely and reliably. The only way this could be made to work was to assume no shared OS,
no shared virtual machine, and no shared programming language or abstraction.
Independence from underlying implementation technology is the key to Web services
interoperability. Web services have influenced many aspects of software development. The
primary contribution of Web services has been the emphasis on protocol-based software
integration.
The influence of protocol-based integration on the industry at large can be seen in the
increasing emphasis on service-oriented architectures. Both Web services and service
orientation owe much to the ideas of component software, distributed objects, and message-
oriented middleware. Information encapsulation and polymorphism have been adopted from
object orientation, and mandatory use of interfaces and the use of runtime metadata have
been adopted from component software. Distributed objects contributed notions of context
that flows among entities and broker-based bindings. Of course, message-oriented
middleware brought the use of queues, relays. and explicit message passing.
This introduction has presented the main enablers, motivators, requirements, and principles
that guide the Web services architecture. The rest of the paper presents the core
technologies that underlie the architecture, followed by a tour through the collection of
specifications that define Web services.
Core Messaging
This section presents core specifications used to formulate messages in the Web services
architecture: XML, SOAP, and WS-Addressing [WS-Addressing]. Web services rely on XML for
the basic underlying data model, SOAP for the message processing and data model, and WS-
Addressing for addressing services and identifying messages independent of transport.
For all messaging systems, the selection of the unit of information transfer is an important
decision. Simply put, a common understanding of exactly what constitutes a message is
required. In Web services, a message is an XML document information item as defined by
the XML Information Set, or Infoset, [XML-Infoset]. The Infoset is an abstract data model that
is compatible with the text-based XML 1.0 [XML-10] and is the foundation of all modern XML
specifications (XML Schema [XML-Schema], XML Query [XML-Query], and XSLT 2.0 [XSLT-20]).
By basing the Web services architecture on the XML Infoset rather than on a specific
representation format, the architecture and core protocol components are compatible with
alternative encodings.
The Infoset models an XML document in terms of a set of 'information items'. The set of
possible information items generally maps to the various features in an XML document, such
as elements, attributes, namespaces, and comments. Each information item has an
associated set of properties that provide a more complete description of the item. The
eleven types of information items in an XML document are described in Appendix B. Every
well-formed XML document consists of exactly one document information item and at least
one element information item.
In addition to the pure text-based encoding of the Infoset, the Web services architecture also
supports an Infoset encoding that allows opaque binary data to be interleaved with
traditional text-based markup. The W3C XML-binary Optimized Packaging (or XOP [XOP])
format uses multi-part MIME [MIME] to allow raw binary data to be included into an XML 1.0
document without resorting to base64 encoding. A companion specification, SOAP Message
Transmission Optimization Method, or MTOM, [MTOM], then specifies how to bind this format
to SOAP. XOP and MTOM are the preferred approach for mixing raw binary with text-based
XML and replaces the now deprecated SOAP with Attachments (SwA) and WS-
Attachments/DIME.
SOAP
SOAP provides a simple and lightweight mechanism for exchanging structured and typed
information between peers in a decentralized, distributed environment using XML. SOAP was
designed to reduce the engineering cost of integrating applications built on different
platforms as much as possible with the assumption that the lowest-cost technology has the
best chance of gaining universal acceptance. A SOAP message is an XML document
information item that contains three elements: <Envelope>, <Header>, and <Body>.
The Envelope is the root element of the SOAP message and contains an optional Header
element and a mandatory Body element. The Header element is a generic mechanism for
adding features to a SOAP message in a decentralized manner. Each child element of
Header is called a header block, and SOAP defines several well-known attributes that can be
used to indicate who should deal with a header block (role) and whether processing it is
optional or mandatory (mustUnderstand), both described below. When present, the Header
element is always the first child element of the Envelope. The Body element is always the
last child element of the Envelope, and is a container for the "payload" intended for the
ultimate recipient of the message. SOAP itself defines no built-in header blocks and only one
payload, which is the Fault element used for reporting errors.
All Web services messages are SOAP messages that take full advantage of the XML Infoset.
The fact that both the message payload and the protocol headers employ the same model
can be used to ensure the integrity of infrastructure headers as well as application bodies.
Applications may route messages based on the content of both the headers and the data
inside the message. Tools that have been developed for the XML data model may be used
for inspecting and constructing complete messages. These benefits were not available in
architectures such as DCOM, CORBA, and RMI, where protocol headers were infrastructural
details opaque to the application.
SOAP messages are transmitted one-way from sender to receiver. Multiple one-way
messages can be combined into more sophisticated patterns. For instance, a popular
pattern is a synchronous request/response pair of messages.
Any software agent that sends or receives messages is called a SOAP node. The node that
performs the initial transmission of a message is called the original sender. The final node
that consumes and processes the message is called the ultimate receiver. Any node that
processes the message between the original sender and ultimate receiver is called an
intermediary. Intermediaries are used to model the distributed processing of an individual
message. The collection of intermediary nodes traversed by the message and the ultimate
receiver are collectively referred to as the message path.
To allow parts of the message path to be identified, each node participates in one or more
roles. SOAP roles are a categorization scheme that associates a URI-based [RFC1630] name
with abstract functionality (e.g., caching, validation, authorization). The base SOAP
specification defines two built-in roles: Next and UltimateReceiver. Next is a universal role in
that every SOAP node other than the sender belongs to the Next role. UltimateReceiver is
the role that the terminal node in a message path plays. This is typically the application, or
in some cases, infrastructure that is performing work on behalf of the application.
The body of a SOAP envelope is always targeted at the ultimate receiver. In contrast, SOAP
headers may be targeted at intermediaries or the ultimate receiver. To provide a safe and
versionable model for processing messages, SOAP defines three attributes that control how
intermediaries and the ultimate receiver process a given header block—role, relay, and
mustUnderstand. The role attribute is used to identify which node the header block is
targeted at. The mustUnderstand attribute indicates whether that node may ignore the
header block if it is not recognized. Header blocks marked mustUnderstand="true" are
called mandatory header blocks. Header blocks marked mustUnderstand="false" or that
have no mustUnderstand attribute are called optional header blocks. The relay attribute
indicates whether that node should forward unrecognized optional headers or discard them.
Every SOAP node must use these three attributes to implement the SOAP processing model.
The following steps define that model:
1. Identify all header blocks of the SOAP message intended for the current SOAP node
using the role attribute (the absence of this attribute implies the header block is for
the ultimate receiver).
2. Verify that all mandatory header blocks identified in Step 1 can be processed by the
current SOAP node using the SOAP mustUnderstand attribute. If a mandatory header
block cannot be processed by the current SOAP node, the message must be
discarded and a distinguished fault message must be generated.
3. Process the message. Optional message elements may be ignored.
4. If the SOAP node is not the ultimate receiver of the message, all header blocks
identified in Step 1 that are not relayable are removed and the message is then
relayed to the next SOAP node in the message path. The SOAP node is free to insert
new header blocks into the relayed message. Some of these header blocks may be
copies of header blocks identified in Step 1.
The SOAP processing model is designed to allow extensibility and versioning. The
mustUnderstand attribute controls whether the introduction of a new header block is a
breaking or non-breaking change. Adding optional headers blocks (e.g., headers marked
mustUnderstand="false") is a non-breaking change, as any SOAP node is free to ignore it.
Adding mandatory headers blocks (e.g., headers marked mustUnderstand="true") is a
breaking change, in that only SOAP nodes that are aware of the header block's syntax and
semantics are able to process the message. The role and relay attributes compose with
mustUnderstand to distribute this processing model along a message path.
The messaging flexibility provided by SOAP allows services to communicate using a variety
of message exchange patterns, satisfying the requirements of distributed applications. We
exploit several of them in the core building blocks of the architecture. Several patterns have
proven particularly useful in distributed systems. The use of remote procedure calls, for
example, popularized the synchronous request/response message exchange pattern. When
message delivery latencies are uncontrolled, asynchronous messaging is needed. When the
asynchronous request/response pattern is used, explicit message correlation becomes
mandatory.
Transport Independence
One example of a system that requires both multiple transports and asynchronous
messaging is one that communicates between a Web service on a land-based, high-speed
network backbone and an intermittently connected Web service hosted on a cellular phone.
Such a system requires a single message to travel over different transports depending on
which network hop the message is moving between. Such a system also shows one example
of where message delivery latency cannot be accurately determined. Instead of attempting
to determine or bound message delivery latency, the Web service developer should build
the system assuming the full power of asynchronous message passing. Unlike when using
remote procedure calls, asynchronous messaging allows the sender to continue processing
after each message transmission without being forced to block and wait for a response. Of
course, synchronous request-response patterns can be built on the foundation of
asynchronous messaging.
Since Web service protocols are designed to be completely independent of the underlying
transport, selection of the appropriate mechanism can be deferred until runtime. This allows
Web service applications the flexibility to determine the appropriate transport as the
message is sent. Additionally, the underlying transport may change as the message is
routed between nodes, and again, the mechanism selected for each hop can vary as
required.
UDP does not have the delivery guarantees of TCP; it provides best-effort datagram
messaging. It also requires fewer resources to implement than TCP. In addition, UDP
provides multi-cast capabilities, allowing a sender to simultaneously transmit a message to
multiple recipients. The specifications for binding SOAP messages to UDP are published in
SOAP-over-UDP [SOAP-UDP].
Addressing
The MessageID and RelatesTo header blocks are used to identify and correlate messages.
The MessageID and RelatesTo headers use simple URIs to uniquely identify messages—
typically these URIs are transient UUIDs.
The To/ReplyTo/FaultTo header blocks are used to identify the agents that are to process the
message and its replies. These headers rely on a WS-Addressing-defined structure called an
endpoint reference that bundles together the information needed to properly address a
SOAP message.
Endpoint references are the most important aspect of WS-Addressing, as they provide
support for finer-grained addressing than just a URI. They are used extensively throughout
the Web services architecture. Endpoint references contain three critical pieces of
information: a base address, and optional sets of reference properties and reference
parameters. The base address is a URI that is used to identify an endpoint, and appears in
the To header block of every SOAP message targeted at that endpoint. Reference properties
and reference parameters are collections of arbitrary XML elements used to complement the
base address by providing additional routing or processing information for the message.
They are represented as literal header elements. When using an endpoint reference to
construct a message for the endpoint, the sender is responsible for including all reference
properties and reference parameters as header blocks.
The distinction between reference properties and reference parameters is in how they relate
to a service's metadata. The policy and contract of a Web service is based on its base
address and reference properties only. Typically, the base address and reference properties
identify a given deployed service and the reference parameters are used to identify specific
resources that are managed by that service.
Reference properties and parameters are simply opaque XML elements that are expected to
be processed by only the ultimate receiver. They help ensure that information that can be
used for dispatch, routing, indexing, or other sender-side processing activities is included
with a given message. While intermediaries are not expected to process this information, it
is possible that some intermediaries, such as firewalls or gateway services, may use certain
reference properties or parameters for message routing and/or processing.
There are many uses for reference properties. Two simple examples are classes of service
and private entity identifiers. In the class of service example, reference properties may be
used to differentiate between a Web service for standard customers and one for "gold"
customers that provides a higher quality of service and enhanced capabilities—possibly
through extra operations or additional bindings—logically forming two different endpoints.
Properties such as these are set only once in a session and then reused throughout the rest
of the interaction. An example of a second kind of use of a reference property is a
mechanism to identify a customer in a manner private to the originating system. A
combination of these two types of reference properties could enable efficient message
dispatch to the appropriate collection of servers and efficiently finding the application state
that relates to a particular user. These examples also show how data that refers to instances
of services and data that refers to instances of users can be represented in reference
properties.
In particular, reference properties also help address collections of WSDL entities that share a
common URL and scope. WSDL, the XML format for describing Web services as a set of
endpoints operating on messages, first specifies its entities abstractly, and then concretely
binds them to specific instances. In particular, messages and operations are abstractly
defined, and are then bound to an endpoint with network transport and message format
information. So, from the WSDL perspective, when targeting different concrete entities, like
input or output messages, portType bindings, ports, or services in a Web service using a
common URL, the corresponding Endpoint Reference's reference properties should be
different. WSDL is presented in more detail in the Metadata section.
Metadata
All Web service interaction is performed by exchanging SOAP messages as described in the
previous section. To provide for a robust development and operational environment,
services are described using machine-readable metadata. Metadata enables interoperability.
Web service metadata serves several purposes. It is used to describe the message
interchange formats the service can support, and the valid message exchange patterns of a
service. Metadata is also used to describe the capabilities and requirements of a service.
This last form of metadata is called the policy of a service. Message interchange formats and
message exchange patterns are expressed in WSDL. Policies are expressed using WS-Policy.
Contracts are expressed using all three kinds of metadata described above. Contracts are
abstractions that insulate applications from the internal implementation details of the
services they rely upon.
The Web Service Description Language, or WSDL, was the first widely adopted mechanism
for describing the basic characteristics of a Web service. Messages described in WSDL are
grouped into operations that define the basic message patterns. The operations are grouped
into interfaces called ports that specify an abstract contract for a service. Finally, ports and
bindings are used to associate portTypes with concrete transports and physical deployment
information. A WSDL description is a first step in automatically identifying all characteristics
of the target service and enabling software development tools.
WSDL specifies what a request message must contain and what the response message will
look like in unambiguous notation. The notation that a WSDL file uses to describe message
formats is based on XML Schema. This means it is both programming-language neutral and
standards-based, which makes it suitable for describing service interfaces that are
accessible from a wide variety of platforms and programming languages. In addition to
describing message contents, WSDL may define where the service is available and what
communications protocol is used to talk to the service. This means that the WSDL file can
specify the base elements required to write a program to interact with a Web service.
Several tools are available to read a WSDL file and generate the code required to produce
syntactically correct messages for a Web service.
While WSDL is a good starting point, it is not sufficient to describe all aspects of a Web
service. WSDL allows only a rather small set of properties to be expressed. Examples of
more detailed information that is necessary for Web services include the following:
First generation Web services must exchange metadata out of band using proprietary
protocols. This issue is addressed with WS-Policy [WS-Policy]. WS-Policy provides a general-
purpose model and syntax to describe and communicate the policies of a Web service. It
specifies a base set of constructs that can be used and extended by other Web service
specifications to describe a broad range of service requirements and capabilities. WS-Policy
introduces a simple and extensible grammar for expressing policy assertions and a processing
model to interpret them. Assertions may be combined into logical alternatives.
Individual policy assertions may be grouped to form policy alternatives. Policies are collections of
policy alternatives. To facilitate interoperability, policies are defined in terms of their XML
Infoset representation. A compact form for policies is defined to reduce the size of policy
documents while preserving interoperability.
Policies are used to convey conditions for interaction between two Web service endpoints.
Satisfying assertions in a policy usually results in behavior that reflects these conditions.
Thus, policy assertion evaluation is central to identifying compatible behaviors. A policy
assertion, the building block for policies, is supported by a requestor if and only if the
requestor satisfies the requirement, or accommodates the capability, corresponding to the
assertion. In general, this determination uses domain-specific knowledge. A policy
alternative is supported by a requestor if and only if the requestor supports all the assertions
in the alternative. This is determined mechanically using the results of the policy assertions.
Also, a policy is supported by a requestor if and only if the requestor supports at least one of
the alternatives in the policy. This determination is also mechanical once the policy
alternatives have been evaluated. Note that although policy alternatives are meant to be
mutually exclusive, it cannot be decided in general whether or not more than one
alternative can be supported at the same time.
Policies layer on top of, and augment, WSDL descriptions. Policies are associated with Web
services metadata, such as WSDL definitions or UDDI [UDDI] entities through the use of WS-
PolicyAttachment [WS-PA]. Policies may be associated with resources either as an intrinsic
part of their definition, or separately. Mechanisms are defined for each of these purposes. In
particular, policies may also be used with individual SOAP messages. When multiple policy
attachments are made for an entity, they jointly determine the effective policy for the entity.
Care must be taken when attaching policies at different levels of the WSDL hierarchy, since
the net result for each level of a hierarchy is the effective policy. As a general rule for self-
description and human-understandable clarity, it is preferable to be verbose and repeat a
policy assertion at each level of a hierarchy that it applies, than to be terse and rely on the
mechanism that computes the effective policy. In a WSDL document a message exchange
with a deployed endpoint could contain effective policies in all four subject types
simultaneously.
WSDL and WS-Policy both define formats for metadata but do not specify mechanisms for
acquiring or accessing metadata for a given service. In general, service metadata can be
discovered using a variety of techniques. To enable services to be self-describing, Web
services architecture defines SOAP-based access protocols for metadata in WS-
MetadataExchange [WS-MEX]. The GetMetadata operation is used to retrieve metadata
that is found at the endpoint reference of the request. The Get operation is similar but is
designed to retrieve metadata that is referenced in a metadata section, and is to be
retrieved at the endpoint reference where it is stored.
Security
This section presents the specifications used in the Web services architecture to provide
message integrity, authentication and confidentiality, security token exchange, message
session security, security policy expression, and security for a federation of services within a
system. The specifications providing these features are WS-Security, WS-Trust [WS_Trust],
WS-SecureConversation [WS-SecureConv], WS-SecurityPolicy [WS-SecurityPolicy], and WS-
Federation [WS_Federation].
When a secure transport is available between the communicating Web services, such as the
Secure Sockets Layer (SSL) and Transport Layer Security (TLS), building a secure solution is
simplified. With a secure transport, the services need not concern themselves with
maintaining integrity and confidentiality for individual messages; they can rely on the
underlying transport. However, existing transport-level security is a solution limited only to
point-to-point messaging. If intermediaries are present when using a secure transport, the
initial sender and the ultimate receiver need to trust those intermediaries to help provide
end-to-end security, since each hop is secured separately. In addition to explicit trust of all
intermediaries, other risks such as local storage of messages and the potential for an
intermediary to be compromised must be considered.
To maximize the reach of Web services, end-to-end security must be provided when
intermediaries are not trusted by the communicating endpoints. This requires higher-level
security protocols. End-to-end message security is a richer alternative to point-to-point
transport-level security, since it supports the loosely coupled, federated, multi transport, and
extensible environment that SOAP-based Web services require. This powerful and flexible
infrastructure can be developed from a combination of existing technologies and Web
services protocols while mitigating many of the security risks associated with point-to-point
messaging.
Even though the security requirements for Web services are complex, no new security
mechanisms were invented to satisfy the needs of SOAP-based messaging. Existing
approaches to distributed systems security, such as Kerberos tickets, public key encryption
technologies, X.509 [X509] certificates, and others proved to be sufficient. New mechanisms
were necessary only to apply these existing security approaches to SOAP. These new
security protocols were designed with extensibility in mind in order to allow new approaches
to be incorporated in the future. A primary design objective was to provide mechanisms for
self-describing security properties designed for SOAP and the rest of the Web services
architecture.
Web services security is based on the requirement that incoming messages prove a set of
assertions made about a sender, a service or other resource. We call these claims, or security
assertions. Examples of security claims include identity, attributes, key possession,
permissions, or capabilities. These assertions are encoded in binary security tokens wrapped
in XML. In traditional security terminology, these security tokens represent a mix of
capabilities and access controls.
Various approaches are used to create security tokens. A Web service may build a custom
security token from local information. Alternately, a security token may be retrieved from
specialized services such as a X.509 certificate authority or a Kerberos domain controller. To
automate communication between services, a mechanism to express security requirements
is required.
Services may express their security requirements using policy assertions as specified in WS-
SecurityPolicy. This specification is described in a later subsection of this paper. By
retrieving these policy assertions, an application may build messages that comply with the
requirements of the target service. This combination of features provided by claims, security
tokens and policies, and the ability to retrieve them from a Web service is powerful.
The general Web services security model supports several more specific security models,
such as identity-based authorization, access control lists, and capabilities-based
authorization. It allows the use of existing technologies such as X.509 public-key certificates,
XML-based tokens, Kerberos shared-secret tickets, and password digests. The general model
is sufficient to construct systems that use more sophisticated approaches for higher-level
key exchange, authentication, policy-based access control, auditing, and complex trust
relationships. Proxies and relay services may also be used. For example, a relay service can
be built to enforce a security policy at a trust boundary; messages going outside the
boundary are encrypted while those that stay within the boundary are unencrypted. This
flexibility and degree of sophistication is not present in previous solutions.
The common security attacks described in Appendix C include a base taxonomy of system
threats that should be carefully considered when choosing Web services security features.
The remainder of this section explores the application of the Web services security model.
The two key topics are securing communications and securing applications. A secure
message transport is not assumed, nor is it necessary for secure Web services.
Message-level security is the key building block for end-to-end security. When using
message-level security, no transport-level security is required. Requirements for message-
level security are message integrity, message authentication, and confidentiality. Message
integrity ensures that a message cannot be changed without detection. Use of XML
Signature [XMLSIG] ensures that message modifications can be detected.
Message authentication identifies the principal that sent the message. If public key
encryption is used, the unique identity of the principal can be determined. The use of public
key encryption with keys certified by a trusted source provides this authentication. However,
if symmetric key encryption is used, this is not the case – only the group of principals that know
the shared secret can be identified.
XMLENC
] in conjunction with security tokens.
Mechanisms for integrity, authentication, and confidentiality take the original message (or
parts of the message) as input, and product-appropriate data (such as a checksum) as
output. For example, the signature of an XML element could, in a simple case, be implemented
as the asymmetric encryption of a hash of all the characters of the XML element. This
encrypted hash could then be stored and transmitted in the message.
WS-Security specifies mechanisms for message integrity and confidentiality, and single
message authentication. For message integrity, the specification details how a cryptographic
signature is represented and associated with specific parts of the SOAP message. The
approach allows arbitrary well-formed fragments of the message to have separate
signatures. In a similar manner, confidentiality is achieved through the encryption of well-
formed fragments of the message. Authentication is achieved using digital signatures.
The WS-Security specification describes common security mechanisms in use today, but
does not preclude new ones from being added in the future. Since the SOAP processing
model uses the header elements to make processing decisions, great care must be
exercised when deciding which elements in a SOAP message to encrypt.
Web service designers must be aware of how the message will be processed in deciding
which elements are to be encrypted and which encryption algorithms to use. These
decisions are even more important when specific header elements need to be processed by
third parties or intermediaries. If those parties are not privy to the appropriate decryption
data, or to the conventions used in encrypting the XML elements, they will not be able to
operate correctly. In addition, each processing node must have a common understanding of
the security information included in the message.
One natural choice for encrypting an XML element in a header is to encrypt it completely,
substituting the original element for one that is of type encrypted data. Drawbacks to this
straightforward approach exist. Intermediaries, for example, have a hard time determining
which elements must be processed (those adorned with the mustUnderstand="1"
attribute). Also, as the element type is changed, determining its original type is difficult.
An alternative approach is to transform the element to one where all the key attributes
needed for correct SOAP processing are preserved and the original element is encrypted and
placed in a distinguished sub-element. The advantage of this approach is that correct
processing can be achieved even by intermediaries that do not know how to decrypt the
element. A drawback to this approach is that it requires the convention used to represent
the original element to be understood by all parties. While WS-Security does not currently
provide guidance on this approach, we expect future work to do so. The alternate method is
preferred because it enables the correct processing of all SOAP header elements.
Several kinds of security tokens are described in WS-Security's profile specifications. Profiles
have been developed for tokens representing user names, X.509 certificates, and XML-
based security tokens. XML-based security tokens include the Security Assertion Markup
Language (SAML) [SAML] and the eXtensible rights Markup Language/Rights Expression
Language (REL) [REL]. Specifications for the use of Kerberos tickets are also under
development.
Security tokens are required to provide an end-to-end security solution. These security
tokens must be shared, either directly or indirectly, between the parties involved in message
processing. Each party also must determine if the asserted credentials can be trusted. These
trust relationships are based on the exchange and brokering of security tokens and in the
supporting trust policies that have been established. How much of a brokered token is
trusted, for example, is determined by system administrators and the trust relationships
they have established.
Services that provide security tokens can be quite varied. This is where each of the
underlying security technologies is first used by a Web service. In order to provide a uniform
solution irrespective of the security technology, new protocols were designed for security
token exchange between trust domains.
WS-Trust [WS-Trust] complements WS-Security with protocols for requesting, issuing and
brokering security tokens. In particular, operations to acquire, issue, renew, and validate
security tokens are defined. Another feature of the specification is a mechanism to broker
new trust relationships. Network and transport protection mechanisms such as IPsec or
TLS/SSL can be used in conjunction with WS-Trust for different security requirements and
scenarios.
Security token acquisition can be done directly by explicitly requesting one from an
appropriate issuer, or indirectly by delegating the acquisition to a trusted third party. Tokens
may also be acquired out-of-band. For example, the token may be sent from a security
authority to a party without the token having been explicitly requested. To complete the
picture, system administrators determine initial trust relationships designating, for example,
a given service as a trusted root service. This approach is similar to what is used to
bootstrap security on the Web today. All tokens obtained from this service are trusted to the
same extent as the trusted root itself. For example, if a root is trusted for only claims A and
B, and a message contains claims A, B and C, then only claims A and B in the message are
trusted. Configuration flexibility is provided through trust relationship delegation.
To address scenarios where a set of exchanges between the parties is required prior to
returning, or issuing, a security token, mechanisms are specified for validation, negotiation
and exchange. A particular form of exchange called a "challenge" provides a mechanism for
a party to prove that it possesses a secret associated with a token. Other types of
exchanges include legacy protocol tunneling. WS-Trust defines how to extend the
specification for additional token exchange protocols beyond these two examples.
Security tokens expressing security claims are issued by a trusted root or one through a
delegation chain. These security claims are used to verify that the message complies with
the security policies in place. They also verify that the attributes of the claimant are proven
by the signatures. In brokered trust models, i.e., those where a trusted intermediary
dispenses security tokens, the signature may not verify the identity of the claimant, but may
instead verify the identity of the intermediary. This intermediary may simply assert the
identity of the claimant.
Secure Sessions
Three different ways of establishing a security context among the parties of a secure
conversation are defined. First, a security token service may create them, and the initiating party
has to fetch it to propagate it. Second, one of the communicating parties creates the
security context and propagates it in a message to the other party. Third, the security
context is created through negotiation and exchanges. Web services select the approach
most appropriate for their needs.
A security context token implies or contains a shared secret. This secret is used for signing
and/or encrypting messages. When using a shared secret, the parties may choose a
different key derivation pattern to use. For example, four keys may be derived so that two
parties can sign and encrypt using separate keys. In order to keep the keys fresh and to
maintain a high level of security, subsequent derivations should be used. Securing sessions
using this approach is preferred. The WS-SecureConversation specification defines a
mechanism to indicate which derivation is being used within a given message. Each
derivation algorithm is identified with a URI.
Security Policies
System Federations
Application security requires additional mechanisms beyond what we have presented so far.
Identities, for example, are valid within a trust domain but most likely meaningless in other
trust domains. For services in different trust domains to be able to validate identities,
appropriate mechanisms are needed. WS-Federation defines mechanisms to enable identity,
account, attribute, authentication, and authorization information sharing across trust
domains. By using these mechanisms, multiple security domains may federate by allowing
and brokering trust of identities, attributes, and authentication among participating Web
services. The specification extends the WS-Trust model to allow attributes and pseudonyms
to be integrated into the token issuance mechanism, resulting in a multi-domain identity
mapping mechanism. These mechanisms support single sign on, sign out and pseudonyms, and
describe the role of specialized services, for attributes and pseudonyms.
A large variety of requirements may be addressed through identity federation. One example
is associating an employee with its employer. In this case, Jane, from CompanyA makes a
purchase from OfficeSupplyStore.com. CompanyA and OfficeSupplyStore.com have a
purchasing contract. Since Jane's identity is associated with CompanyA, she can be
authorized to make a purchase under the contract.
A second example is mapping a single person to multiple pseudonyms. Joe may be known at
work as [email protected]. He may also have other identities, such as [email protected]
and [email protected]. Through identity federation, systems can determine that each of
these identities is the same Joe.
Two broad classes of requestors (message senders) are defined in the Web services
federated security architecture: passive and smart (active). A passive requestor [WS-FedPassive] is
service that only uses HTTP and never issues security tokens. A smart requestor is a service
that is capable of issuing messages containing security tokens, such as those described in
WS-Security and WS-Trust. A traditional HTTP-based web browser is an example of a passive
requestor. Profile specifications have been developed to define the behaviors of these two
kinds of requestors.
For smart requestors, the active requestor profile [WS-FedActive] specifies how single sign on,
sign out, and pseudonyms are integrated into the Web services security model using SOAP
messages. In effect, the profile describes how to implement the model described in WS-
Federation in the context of smart requestors. It specifies requirements on various kinds of
security tokens. As an example of one of these security token requirements, when not using
a secure channel, tokens for X.509 certificates must contain the authority's name and a
signature over the whole token. The profile also requires that X.509 tokens contain the
subject identifier uniquely identifying the subject for whom the token was granted.
Discovery
This section presents the functional components of the Web services architecture that are
used to locate Web services on a network and to determine the service's availability: UDDI
and WS-Discovery [WS-Discovery].
Web service discovery is a key enabler for automating connections to services without
human intervention. The Web service approach to discovery mirrors the two most common
approaches to finding information in a computer system: looking in a well-known location, or
broadcasting a request to all available listeners. The UDDI registries serve as the directory,
and discovery protocols are used to broadcast requests.
Directories
The Universal Description, Discovery, and Integration protocol, or UDDI, specifies a protocol
for querying and updating a common directory of Web service information. The directory
includes information about service providers, the services they host, and the protocols those
services implement. The directory also provides mechanisms to add metadata to any
registered information.
The UDDI directory approach can be used when Web service information is stored in well-
known locations. Once the directory is located, a series of query requests can be sent to
obtain the desired information. UDDI directory locations are obtained out of band, usually
through system configuration data.
Web service providers have various options for how they deploy UDDI registries.
Deployment scenarios fall into one of three categories: public, extra-enterprise and intra-
enterprise. To support public deployments, a group of vendors led by Microsoft, IBM and SAP
host the UDDI Business Registry [UBR]. The UBR is a public UDDI registry that is replicated
across multiple hosting organizations, serving as both a resource for Internet-based Web
services and a testbed for Web services developers. While the public UDDI implementation
has received the most attention to date, early adopters use the extra- and intra-enterprise
approach more often. In these two deployment scenarios, a private registry is deployed by
an organization, and much tighter control over the types of information registered is
possible. These private registries may be dedicated to only one organization or to groups of
business partners. UDDI also defines protocols for replication between registries and for
trust federation across deployments. Using these protocols further increases the number of
deployment scenarios available to implementers.
For all deployment scenarios, UDDI directories contain detailed information about Web
services and where they are hosted. A UDDI directory entry has three primary parts—the
service provider, Web services offered, and bindings to the implementations. Each of these
parts provides progressively more detailed information about the Web service.
The most general information describes the service provider. This information is not
targeted at Web services software, but at a developer or implementer that needs to contact
someone responsible for the service directly. Service provider information includes names,
addresses, contacts and other administrative details. All UDDI entries have multiple
elements for multi-language descriptions.
The list of available Web services is stored within a service provider entry. These services
may be organized depending on their intended use: they may be grouped into application
area, geography, or any other scheme that is appropriate. Service information stored in a
UDDI registry includes simply a description of the service and a pointer to the Web service
implementations it contains. Links to services hosted by other providers, called 'Service
Projections', may also be registered.
The final part of a UDDI service provider entry is the binding to an implementation. This
binding associates the Web service entry to the exact URI(s) to identify where the service is
deployed, specifies the protocol to use for access, and contains references to the exact
protocols that are implemented.
These details are sufficient for a developer to write an application that invokes the Web
service. The detailed protocol definition is provided through a UDDI entity called a Type
Model (or tModel). In many cases, the tModel references a WSDL file describing the SOAP
Web service interface, but tModels are also flexible enough to describe almost any kind of
resource.
For each provider or service registered in UDDI, additional metadata from standard
taxonomies (such as NAICS [NAICS] and the older SIC industry codes [SIC]) or other
identification schemes (such as an Edgar Central Index Key) can be used to categorize the
information and improve search accuracy. The set of available taxonomies and identifier
schemes is readily extensible as a part of any implementation, so it can be customized to
support any specific geographic, industry, or corporate requirements.
Dynamic Discovery
Dynamic Web service discovery is provided in a different manner. As an alternative to
storing information in a known registry, dynamically discovered Web services explicitly
announce their arrival and departure from the network. WS-Discovery defines protocols to
announce and discover Web services through multicast messages.
When a Web service connects to a network, it announces its arrival by sending a Hello
message. In the simplest case, these announcements are sent across the network using
multicast protocols—we call this an ad-hoc network. This approach also minimizes the need
for polling on the network. In order to limit the amount of network traffic and optimize the
discovery process, a system may include a Discovery Proxy. A Discovery Proxy replaces the
need to send multicast messages with a well-known service location, transforming an ad-hoc
network into a managed network. Using configuration information, collections of proxy
services may be linked together to scale the discovery service to groups of servers, scaling
from one machine to many.
Since the Discovery Proxies are themselves Web services, they may announce their
presence with their own special Hello message. Web services receiving this message may
then take advantage of the proxy's services, and are no longer required to use the noisier
one-to-many discovery protocols.
When a service departs from a network, WS-Discovery specifies a Bye message to be sent to
either the network or the Discovery Proxy. This message informs the other services on the
network that the departing Web service is no longer available.
The WS-Discovery specification also allows system configurations where the Probe message
is sent to a Discovery Proxy that has been established by some other administrative means,
such as by using a well-known DHCP record.
The ability to find services dynamically enables Web service management bootstrapping. In
conjunction with WS-Eventing [WS-Eventing] and other protocols, more sophisticated
management services can be built using this dynamic discovery infrastructure.
Dynamic discovery also extends the Web services architecture to devices, such as those
that might implement the Universal Plug & Play (UPnP) protocols today. This is an important
step in making the architecture truly universal. With WS-Discovery and WS-Eventing,
devices such as printers or storage media, for example, may be incorporated into a system
as Web services without the need for specialized tools or protocols.
When multiple Web services must complete a joint unit of work or operate under a common
behavior, there must be common agreement on what protocols to use. This minimum
amount of coordination among Web services is unavoidable. Coordination protocols are also
required to be able to determine and to agree that a common goal has been reached. Every
interaction between Web services can be viewed as a kind of coordination. Agreement
coordination protocols bring the architecture an improved chance that the participant
services will succeed in what they set up to do jointly. The Web services architecture is
designed to function properly in the face of transports that lose messages and services that
malfunction.
Reliable Messaging
Many conditions may interrupt an exchange of messages between two services. This is
especially an issue when unreliable transport protocols such as HTTP 1.0 and SMTP [SMTP]
are used for transmission or when a message exchange spans multiple transport-layer
connections. Messages may be lost, duplicated or reordered, and Web services may fail and
lose volatile state. WS-ReliableMessaging is a protocol that enables the reliable delivery of
messages based on specific delivery assurance characteristics. The specification defines
three different assurances that may be used in combination:
Several policy assertions are defined in WS-ReliableMessaging. These policy assertions are
expressed using the mechanisms defined in WS-Policy.
Reliable messaging protocols simplify the code that developers have to write to transfer
messages under varying transport assurances. Instead, the underlying infrastructure verifies
that messages have been properly transferred between the endpoints, retransmitting
messages and detecting duplication when necessary. Applications do not need any
additional logic to handle the message retransmissions, duplicate message elimination,
message reordering, or message acknowledgement that may be required to provide the
delivery assurances. The implementation of WS-ReliableMessaging is distributed across the
initiator and the service. Those characteristics that are not visible 'on the wire', such as
message delivery order, are provided by the implementation of the WS-ReliableMessaging
specification. While characteristics such as message retransmissions due to transport losses
are handled by the messaging layer unbeknownst to the application, other end-to-end
characteristics such as in-order delivery require that both the messaging infrastructure and
the receiver application collaborate. It is interesting to note that providing a message
ordering "as received" on the receiver when the sender expects "as sent" is an incorrect
implementation of in-order. Providing an order "as sent" on the receiver when the sender
expects "as received" is a correct implementation of in-order.
Designated Coordinators
WS-AtomicTransaction specifies traditional ACID transactions [Gray & Reuter] for Web services.
Within the context of the atomic transaction coordination type, three protocols are defined:
a Completion protocol, and two variants of a Two-Phase Commit protocol. The Completion
protocol is used to initiate commit processing. A Web service registered for Completion has
the ability to tell the designated coordinator when commit processing is to begin. This
protocol also defines messages to communicate the final result of the transaction to the
initiator. However, the protocol does not require that the coordinator ensure that the
initiator process the result. In contrast, other behaviors in WS-AtomicTransaction do require
the coordinator to ensure that participants process the coordination messages.
The Two-Phase Commit (2PC) protocol brings all registered participants to a common
commit or abort decision, and ensures that all participants are informed of the final result.
As its name indicates, it uses two rounds of notifications to complete the transaction. Two
variants of this protocol are defined: Volatile 2PC, and Durable 2PC. Both protocols use the same
messages on the wire (corresponding to the operations of prepare, commit, and abort),
but Volatile 2PC had no durability requirements. The volatile 2PC protocol is to be used by
participants that manage volatile resources, such as cache managers or window managers.
These participants are contacted in a first round of notifications by the coordinator and do
not require a second round of notifications.
The durable 2PC protocol is to be used by participants managing durable resources such as
databases and files. When a commit processing has been initiated, these participants are
contacted for the first time after all the volatile 2PC participants have been contacted. This
enables, for example, caches to be flushed. Durable 2PC participants require the full two
rounds of notifications to achieve the all-or-nothing behavior imposed by the coordinator
and to complete the transaction. These behaviors are most appropriate for scenarios where
resources can be held for the duration of the transaction, and the transactions are typically
very short-lived. This protocol guarantees that under normal processing the coordinator will
contact all of the participants with the outcome of the first phase. For transactions that are
expected to require more time to complete, or when resources such as locks cannot be held,
alternate behaviors are defined by other coordination protocols.
Several policy assertions are defined in WS-AtomicTransaction. These policy assertions are
expressed using the mechanisms defined in WS-Policy.
Queued Systems
A pattern that has proven to be very useful when building distributed systems is the use of
transactional durable queues to provide store-and-forward asynchronous message delivery.
In this pattern, atomic transactions are exploited at each of the transmission endpoints. At
the sender side, the sending application delivers a message to a durable queue in an atomic
transactional manner where the application and the queue manager both use WS-
AtomicTransaction to coordinate. Only if there is no error in processing the message is it
considered successfully delivered to the queue.
Then, the queue subsystem takes over the delivery of the message between the originating
queue and the recipient queue. This transmission step can be done at a time that is later
from that when the message was placed in the originating queue. In addition, the location of
the originating queue need not coincide with the location of the application from which the
message originated.
Analogously, the application that retrieves the message from the recipient queue does so
using an atomic transaction. In that manner, a message can be removed from the queue
only when there are no processing errors.
Enumeration
Many scenarios require data exchange using more than just a single request/response
message pair. Types of applications that require these longer data exchanges include
database queries, data streaming, the traversal of information such as namespaces, and
enumerating lists. Enumeration, in particular, is achieved though establishing a session
between the data source and the requestor. Successive messages within the session
transport the collection of elements being retrieved. No assumptions are made on the
approach used by the service to organize the items that will be produced. What is expected
is that under normal processing circumstances the enumeration will produce all the
underlying data before the end of the session.
State information regarding the progress of the iteration may be maintained between
requests by either the data source or the consuming service. WS-Enumeration allows the
data source to decide, on a request-by-request basis, which party will be responsible for
maintaining state for the next request. This flexibility enables several kinds of optimizations.
One optimization example is allowing a server to avoid saving any cursor state between
invocations. As message latencies can be large for a service supporting several
simultaneous enumerations, not preserving state may yield substantial savings in the total
amount of information that must be maintained. Service implementations on resource-
constrained devices, such as cell phones, may not be able to maintain any state information
at all.
Transfer
The basic operations required to manage the data entities accessed through Web services
are defined in WS-Transfer [WS-Transfer]. An understanding of WS-Transfer requires two new
terms to be introduced: factory and of resource. A factory is a Web service that can create a
resource from its XML representation. WS-Transfer introduces operations that create,
update, retrieve and delete resources. It should be noted that the state maintenance for a
resource is at most subject to the "best efforts" of the hosting server. When a client receives
the server's acceptance of a request to create or update a resource, it can reasonably
expect that the resource now exists at the confirmed location and with the confirmed
representation, but this is not a guarantee, even in the absence of any third parties. The
server may change the representation of a resource, may remove a resource entirely, or
may bring back a resource that was deleted. This lack of guarantees is consistent with the
loosely coupled model brought by the Web. If desired, services may offer additional
guarantees that are not required by the Web services architecture.
WS-Transfer's create, update, and delete operations extend the capabilities of the read-
only operations found in WS-MetadataExchange. The retrieve operation is exactly the same
Get operation in WS-MetadataExchange. The Create request is sent to a factory. The factory
then creates the requested resource and determines its initial representation. The factory is
assumed to be distinct from the resource being created. The new resource is assigned a
service-determined endpoint reference that is returned in the response message.
Eventing
In systems made up of services that communicate among each other, possibly using
asynchronous messaging, there are many scenarios where information produced by one
service is of interest to another service. Due to poor scaling characteristics, polling is often
not an appropriate mechanism for obtaining such information; too many unnecessary
messages are sent through the network. Instead, the architecture requires a mechanism for
explicit notifications when events occur. Even more important is the requirement that the
binding of a source service and a consumer service be done dynamically at runtime. The
Web services architecture supports this through a lightweight eventing protocol.
Subscriptions lease resources that must be eventually recovered. The primary mechanism
used to reclaim resources is an expiration time for each subscription. There is also a
mechanism to query the status of subscriptions. Additional operations to help subscribers
manage their collection of subscriptions, including renewal, notifications, and unsubscribe
requests are also defined. Of course, any service is free to end a subscription at any time,
consistent with the principle of autonomy for all Web services. The subscription-end
message may be used by the event source to notify subscribers of the premature
termination of a subscription.
Management
Management features are the final aspect of the Web services architecture to discuss. These
features are defined in the WS-Management [WS-Management] specification.
Care has been taken so that conformant WS-Management implementations can be deployed
to small devices. At the same time, it has been designed to scale up to large datacenter and
distributed installations. In addition, mechanisms are defined independent of any implied
data models or system health models. This independence supports its application to all kinds
of Web services.
To accommodate the messaging needs of management services, three qualifiers are defined
for the operations. The SOAP representation of these qualifiers is in header elements. An
operation timeout specifies a deadline after which the operation need not be serviced.
The locale element is used when translations of the underlying information are needed or
expected. Finally, a freshness qualifier is provided to request up-to-date values and
prohibit returning stale data.
For data access using the WS-Transfer operations, WS-Management specifies three more
qualifiers. The Get operation may be qualified with the SummaryPermitted header and the
NoCache header. The SummaryPermitted qualifier enables transmission of abbreviated
representations, when available. The NoCache qualifier requires transmission of fresh data,
disallowing caching of the information. For the Put and Create operations, the
ReturnResource qualifier mandates the service to return the new representation of a
resource. ReturnResource allows resource-constrained Web services to retain no state when
updating a resource.
WS-Management defines three custom delivery modes for event notification: batched, pull,
and trap. Each of these modes is identified by a URI. These URIs are used when establishing
subscriptions. The batched delivery mode enables a subscriber to receive multiple event
messages bundled in single SOAP messages. The subscriber may also request that a
maximum number of events be included in the bundle, a maximum amount of time that the
service should take accumulating events, and a maximum amount of data that should be
returned. The pull delivery mode allows the data producing service to maintain a logical
queue of events so that the subscriber can poll for on-demand for notifications. This polling
is done using WS-Enumeration with an enumeration context returned with the subscription
response message. Finally, when UDP multicast is an appropriate messaging mechanism,
the trap delivery mode allows an event source to use it. In trap mode, the event source can
send its notifications to a predetermined UDP multicast address.
Concluding Remarks
This paper introduces the functional building blocks of the Web services architecture and its
underlying principles. Each building block is defined in terms of a protocol specification. We
expect the functional scope and guiding principles described in this paper to remain
unaltered. However, we do expect the architecture to expand to support additional
scenarios. Being able to accommodate innovation is a fundamental strength of the
architecture.
Great care has been taken to ensure that the various Web service protocols can be cleanly
composed with each other; while they have been designed together, they can be used in a
wide range of combinations. As functional building blocks they behave like a traditional
development framework. When needed, such as for SOAP attachments, we have developed
new solutions that fit cleanly within the architecture. The focus on composition is not a
deterrent from rich functionality.
The architecture's SOAP messaging foundation assures wide reach. SOAP messaging
supports both asynchronous and synchronous patterns in a transport-independent manner.
There is no infrastructure more flexible. To accelerate broad adoption of the Web services
architecture, the specifications have been authored with an extensive collection of technical
partners. Partnering with these key technology providers accelerates the deployment of
devices and of programming environments that support the on-the-wire protocols. Achieving
wide reach, widespread adoption, and scale-independent constructs are three of our core
goals.
We strive to ensure that the architecture can be implemented on any platform and in any
programming language. This is facilitated by the message-based and protocol-based nature
of the architecture. When necessary, such as only using WS-Security for message integrity,
confidentiality and authentication, and expressing metadata only using WS-Policy, we have
restricted the universe of technical approaches to increase the level of interoperability.
Ideally, as long as implementations faithfully follow the protocol specifications of the
architecture they will be able to communicate with any other Web service. The truth is on
the wire.
Acknowledgements
Special thanks to Omri Gazitt for his continued support and multiple suggestions, to Alan
Geller, Jim Johnson and Rodney Limprecht for thorough reviews and excellent insights, to
Dan Simon for his description of common security attacks, and to Chris Kaler for his
guidance and multiple revisions of the security section. John Shewchuk's contributions to the
architecture section also were a great help. Thanks to Phil Bernstein, Shy Cohen, Paul
Cotton, David Langworthy, Andrew Layman, Brad Lovering, Jeffrey Schlimmer, Scott Seely,
Satish Thatte, Marvin Theimer, Jorgen Thelin, and Hervey Wilson for their reviews and
encouragements.
Last but not least, the following individuals have participated in the definition of the Web
services architecture: (alphabetical) Tony Andrews, Bob Atkinson, Keith Ballinger, Don Box,
John Brezak, Allen Brown, Luis Felipe Cabrera, Erik Christensen, George Copeland, Michael
Coulson, Giovanni Della-Libera, Brendan Dixon, Mike Dusche, Colleen Evans, Max Feingold,
Henrik Frystyk Nielsen, Praerit Garg, Omri Gazitt, Alan Geller, Josh Gray, Martin Gudgin,
Destry Hood, Efim Hudis, Tomasz Janczuk, Jim Johnson, Ryan Johnson, John Justice, Gopal
Kakivaya, Chris Kaler, Johannes Klein, Scott Konersmann, Brian LaMacchia, Dave
Langworthy, Andrew Layman, Paul Leach, Al Lee, Rodney Limprecht, Joe Long, Steve Lucco,
John Manferdelli, Ashok Malhotra, Jonathan Marsh, Steve Millet, Angela Mills, Stefan Pharies,
Scott Robinson, Yordan Rouskov, Sujay Sahni, Jeff Schlimmer, Oliver Sharp, John Shewchuk,
Yasser Shohoud, Dan Simon, Jeff Spelman, Keith Stobie, Satish Thatte, Robert Wahbe, Elliot
Waingold, Richard Ward, Hervey Wilson, Kenny Wolf and Eric Zinda.
Appendix A: Glossary
Active Requestor—An active requestor is an application (possibly a Web browser) that is
capable of issuing Web services messages such as those described in WS-Security and WS-
Trust.
Claim—A claim is a statement made about a sender, a service or other resource (e.g.,
name, identity, key, group, privilege, capability, etc.).
Durable Two Phase Commit—The protocol used for transactions on durable resources,
such as files or databases.
Effective Policy—An effective policy, for a given policy subject, is the resultant
combination of the policies attached to policy scopes that contain the policy subject.
Federation—A federation is a collection of trust domains that have established mutual pair-
wise trust. The level of trust may vary, but typically includes authentication and may include
authorization.
Message Path—The set of SOAP nodes traversed between the original source and ultimate
receiver.
Principal—Any system entity that can be granted security rights or that makes assertions
about security or identity.
Security Context Token—A Security Context Token (SCT) is a wire representation of the
security context abstract concept, and which allows a context to be named by a URI and
used with [WS-Security].
Service—A software entity whose interactions with other entities are via messages. Note
that that a service need not be connected to a network.
Sign-Out—A sign-out is the process by which a principal indicates that they will no longer
be using their token and services in the domain can destroy their token caches for the
principal.
SOAP Intermediary—A SOAP intermediary is a SOAP processing node that is neither the
original message sender nor the ultimate receiver.
Symmetric Key Algorithm—An encryption algorithm where the same key is used for both
encrypting and decrypting a message.
Trust—Trust indicates that one entity is willing to rely upon a second entity to execute a set
of actions and/or to make set of assertions about a set of subjects and/or scopes.
Trust Domain—A Trust Domain is an administered security space in which the source and
target of a request can determine and agree whether particular sets of credentials from a
source satisfy the relevant security policies of the target. The target may defer the trust
decision to a third party (if this has been established as part of the agreement) thus
including the trusted third party in the Trust Domain.
Volatile Two Phase Commit—The protocol used for transactions on volatile resources,
such as caches or window managers.
Web Service—A Web service is a reusable piece of software that interacts exchanging
messages over the network through XML, SOAP, and other industry recognized standards.
The five information items not allowed by SOAP but present in the original definition of XML
Infoset are: Processing Instruction, Document Type Declaration, Unexpanded Entity
Reference, Unparsed Entity, and Notation.
The following is a brief, non-exhaustive list of security attack classes, organized according to
these axes, together with standard countermeasures for each:
• Attacks on hosts:
• Denial-of-service (DoS) attacks disrupt host operations by overwhelming their
ability to respond.
When directed at the cryptographic layer, a DoS usually attempts to force the
host to repeatedly perform the computationally expensive public-key
operations needed for certain authentication or key exchange protocols. The
typical defense against such attacks is to delay public-key operations until the
legitimacy of the interlocutor can be verified by less expensive means, such
as symmetric cryptography or "puzzles".
These attacks may exploit vulnerabilities in the host software to gain control
of the host. Proper security administration, such as installation of patches,
firewall configuration, and reducing the privilege of exposed applications, is
the usual countermeasure.
• Attacks on communication:
• DoS attacks on the network attempt to disrupt communication with a service.
Like those on the host network layer, these can only really be addressed using
network infrastructure means.
• Attacks on the confidentiality of network communication attempt to
compromise privacy on the wire.
Message replay attacks, in which the attacker injects previously sent (and
hence correctly authenticated) messages into a conversation can be detected
and addressed through sequence numbers, or the combination of timestamps
and message caches.
Appendix D: References
Core Specifications
[ARP]
An Ethernet Address Resolution Protocol [RFC826]. David C. Plummer. November 1982. Internet
Engineering Task Force.
[HTML]
HTML 4.01 Specification. Ed. Dave Raggett, et al. 24 December 1999. W3C.org.
[HTTP]
Hypertext Transfer Protocol – HTTP/1.1 (RFC 2616). Ed. R. Fielding, et al. June 1999. The Internet
Society.
[KERBEROS]
The Kerberos Network Authentication Service (V5). J. Kohl and C. Neuman. September 1993. Internet
Engineering Task Force.
[MIME]
Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. Ed. N. Freed, et
al. November 1996. Internet Engineering Task Force.
[REL]
[RFC1630]
Universal Resource Identifiers in WWW (RFC 1630). Ed. T. Berners-Lee. June 1994. Internet
Engineering Task Force.
[SAML]
Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V1.1. Ed. Eve Maler, et
al. 2 September 2003. OASIS-Open.org.
[SMTP]
Simple Mail Transfer Protocol. Ed. J. Klensin. April 2001. Internet Engineering Task Force.
[TCPIP]
Transmission Control Protocol. Ed. Jon Postel. September 1981. Defense Advanced Research
Projects Agency.
Internet Protocol. Ed. Jon Postel. September 1981. Defense Advanced Research Projects
Agency.
[TLS]
The TLS Protocol. T. Dierks, et al. January 1999. The Internet Society.
[UDP]
User Datagram Protocol. J. Postel. August 1980. Internet Engineering Task Force.
[X509]
Data Networks and Open System Communications Directory (ITU-T Recommendation X.509). June 1997.
International Telecommunication Union.
[XSLT-20]
XSL Transformations (XSLT) Version 2.0. Ed. Michael Kay. 12 November 2004. W3C.org
[XML-Infoset]
XML Information Set (Second Edition). Ed. John Cowan, et al. 4 February 2004. W3C.org.
[XML-10]
Extensible Markup Language (XML) 1.0 (Third Edition). Ed. Tim Bray, et al. 4 February 2004. W3C.org
[XMLENC]
XML Encryption Syntax and Processing. Ed. Takeshi Imamura, et al. 10 December 2002. W3C.org.
[XML-Query]
XQuery 1.0: An XML Query Language. Ed. Scott Boag, et al. 23 July 2004. W3C.org
[XML-Schema]
[XMLSIG]
XML Signature Syntax and Processing. Ed. Donald Eastlake, et al. 12 February 2004. W3C.org.
Web Services Specifications
[SOAP]
Simple Object Access Protocols (SOAP) 1.1. Ed. Don Box, et al. 8 May 2000. W3C.org.
[SOAP-UDP]
SOAP-over-UDP. Harold Combs, et al. September 2004. BEA, Lexmark, Microsoft, and Ricoh.
[MTOM]
SOAP Message Transfer Optimization Mechanism. Ed. Noah Mendelsohn, et al. 8 July 2004. W3C.org.
[UDDI]
UDDI Version 2.04 API Specification. Ed. Tom Bellwood. 19 July 2004. OASIS-Open.org.
[WSDL]
Web Service Description Language (WSDL) 1.1. Ed. Erik Christensen, et al. 15 March 2001. W3C.org.
[WS-Addressing]
Web Services Addressing (WS-Addressing). Don Box, et al. August 2004. BEA, IBM, and Microsoft.
[WS-AT]
[WS-BA]
[WS-Coord]
[WS-Discovery]
Web Services Dynamic Discovery (WS-Discovery). John Beatty, et al. February 2004. Microsoft
Corporation.
[WS-Enum]
Web Service Enumeration (WS-Enumeration). Don Box, et al. September 2004. Microsoft
Corporation.
[WS-Eventing]
Web Services Eventing (WS-Eventing). Luis Felipe Cabrera, et al. September 2004. BEA, Microsoft,
and TIBCO.
[WS-Federation]
Web Services Federation Language (WS-Federation). Siddharth Bajaj, et al. 8 July 2003. IBM, Microsoft,
BEA, RSA Security, and VeriSign.
[WS-FedActive]
WS-Federation: Active Requestor Profile. Siddharth Bajaj, et al. 8 July 2003. IBM, Microsoft, BEA,
RSA Security, and VeriSign.
[WS-FedPassive]
WS-Federation: Passive Requestor Profile. Siddharth Bajaj, et al. 8 July 2003. IBM, Microsoft, BEA,
RSA Security, and VeriSign.
[WS-MEX]
Web Services Metadata Exchange (WS-MetadataExchange). Keith Ballinger, et al. March 2004. BEA,
IBM, Microsoft, and SAP.
[WS-Policy]
Web Services Policy Framework (WS-Policy). Don Box, et al. 3 September 2004. BEA, IBM, Microsoft,
and SAP.
[WS-PA]
Web Services Policy Attachment (WS-PolicyAttachment). Don Box, et al3 September 2004. BEA, IBM,
Microsoft, and SAP.
[WS-RM]
Web Services Reliable Messaging (WS-ReliableMessaging). Ruslan Bilorusets, et al. March 2004. BEA,
IBM, Microsoft, and TIBCO.
[WS-SecureConv]
Web Services Secure Conversation Language (WS-SecureConversation). Steve Anderson, et al. May 2004.
BEA Systems, Inc., Computer Associates International, Inc., International Business Machines
Corporation, Layer 7 Technologies, Microsoft Corporation, Netegrity, Inc., Oblix Inc.,
OpenNetwork Technologies Inc., Ping Identity Corporation, Reactivity Inc., RSA Security Inc.,
VeriSign Inc., and Westbridge Technology.
[WS-Security]
Web Services Security: SOAP Message Security (WS-Security). Ed. Anthony Nadalin, et al. March 2004.
OASIS-Open.org.
[WS-SecurityPolicy]
Web Services Security Policy Language (WS-SecurityPolicy). Giovanni Della-Libera, et al. 18 December
2002. IBM, Microsoft, and VeriSign.
[WS-SecUsername]
Web Services Security: Username Token Profile V1.0. Ed. Anthony Nadalin, et al. March 2004. OASIS-
Open.org.
[WS-SecX509]
Web Services Security: X.509 Token Profile V1.0. Ed. Phillip Hallam-Baker, et al. March 2004. OASIS-
Open.org.
[WS-Transfer]
Web Service Transfer (WS-Transfer). Ed. Don Box, et al. September 2004. Microsoft Corporation.
[WS-Trust]
Web Services Trust Language (WS-Trust). Steve Anderson, et al. May 2004. BEA Systems, Inc.,
Computer Associates International, Inc., International Business Machines Corporation, Layer
7 Technologies, Microsoft Corporation, Netegrity, Inc., Oblix Inc., OpenNetwork Technologies
Inc., Ping Identity Corporation, Reactivity Inc., RSA Security Inc., VeriSign Inc., and
Westbridge Technology, Inc.
[XOP]
XML-binary Optimized Packaging (XOP). Ed. Noah Mendelsohn, et al. 8 June 2004. W3C.org.
Interoperability Profiles
[WSI-BP10]
Basic Profile Version 1.0. Ed. Keith Ballinger, et al. 16 April 2004. The Web Services-
Interoperability Organization.
[WSI-BSP10]
Basic Security Profile Version 1.0 (Working Group Draft). Ed. Abbie Barbir, et al. 12 May 2004. The
Web Services-Interoperability Organization.
[WS-DP]
Devices Profile for Web Services. Shannon Chan, et al. May 2004. Microsoft Corporation.
Other Resources
[NAICS]
[SIC]
[UBR]
[WS-I]
Transaction Processing: Concepts and Techniques. Jim Gray and Andreas Reuter. Morgan-
Kaufmann, 1993.