Professional Documents
Culture Documents
Layer 7 Technologies
White Paper
Web Services and PKI
Contents
Introduction ................................................................
................................................................................................
.................................................. 3
Channel vs. Message Security ................................
................................................................................................
....................................................... 3
The Challenge with Messagee Security ................................................................................................
.......................................... 4
Web Services Security Requires PKI ................................................................................................
.............................................. 4
An Example of PKI in Web Services ................................................................................................
........................................... 4
Conclusion ................................................................
................................................................................................
..................................................... 6
About Layer 7 Technologies ................................
................................................................................................
.......................................................... 7
Contact Layer 7 Technologies ................................
................................................................................................
....................................................... 7
Legal Information ................................
................................................................................................................................
.......................................... 7
Introduction
Enterprise Public Key Infrastructure (PKI) has a bad name. Considered complex, costly, and difficult to deploy and
maintain, the technology has been plagued with criticism since it first appeared. To the dismay of many CIOs, few
applications have attempted to effectively use PKI. This may soon change. Web services promotes
promote a security model
that demands the flexibility that only an enterprise PKI deployment can offer.
SSL provides confidentiality and integrity. Automatic sequence numbering protects against replay attacks. SSL uses
a server-side
side certificate that binds the server’s Domain Name Server (DNS) name to a subject, ensuring server
authentication and protecting against impersonators and most man man-in-the-middle attacks. While this
t feature does
rely on the integrity of the DNS system,
tem, it is often considered an acceptable risk. SSL even offers optional client-
client
side certificate
cate authentication that, though powerful, is rarely implemented.
Channel continuity is probably the most unheralded quality of SSL. Once a session is set
SSL requires a up, and the client and server mutually authenticate (with the client using a certificate
direct connection under SSL, or via HTTP authentication, or an application-level
level means such as forms), a
level of trust is established on the open socket so that it is available for multiple
between
transactions without requiring re re-authentication.
authentication. The value in such a transparently
participants, maintained security context is easy to take for granted.
which is not
always possible Of course, one of the reasons behind SSL’s success on the Web was that, although it
with Web services utilizes public key cryptography, it does not need full
full-blown
blown PKI. Most SSL-enabled
SSL Web
servers use certificates issued by the “browser cartel”. Those certification authorities are
fortunate enough to have their root cer
certificates
tificates automatically installed within the trust
store of the most popular browsers. With the exception of a few early consumer banking products that have now
been abandoned, almost nobody body provides the baroque logistics of client
client-side
side certificates on the Web. The ability
to delegate PKI to a third-party
party greatly simplified Web security. This was one of the reasons SSL became good
enough for most online transactions, even when initially cchallenged by technically cally elegant though complex
solutions like Secure Electronic Transaction (SET).
SSL’s greatest weakness, however, is that it is oriented toward synchronous transactions that require a direct
connection between participants. Both parti
parties
es need to be available, multiple passes are necessary to set up a
secure context, and all information in the transaction is en
encrypted
crypted (a costly processor burden). This requirement
makes SSL an insufficient security model for Web services. Despite the namname,e, Web services is not about the Web.
Web services uses existing Web infrastructure (including HTTP transport, Web application servers, etc.), but it is
fundamentally a one-way
way messaging paradigm for computer communications composed around a simple XML
message
sage structure with an extensible header model.
Web service messages may not piggyback on HTTP at all. They might flow across a Message
Message-Oriented
Oriented Middleware
(MOM) such as IBM’s MQSeries
Series or be carried asynchronously by Simple Mail Transfer Protocol (SMTP). Similar to IP
packets being passed between routers, Simple Object Access Protocol (SOAP) messages are designed to flow
through a network of intermediates. Intermediates may be required to view header information to make
processing decisions based on application
cation-level protocol. A channel-based
based security model that encrypts everything
and requires synchronous responses from a receiver is not appropriate in a Web services architecture.
In the second scenario illustrated in Figure 2, a simplified message is exchanged between the producer and the
consumer. The message body has been encrypted using a two two-step process
cess described in WSS. First, the producer
generates a random symmetric key with which the body content is encrypted using a symmetric algorithm like
triple-DES
DES or AES. A specialized security header describes the exact algorithm and key length. Contrast this
approach with SSL, which supports ts negotiation of cipher suites and key lengths in order to accommodate a
diversity of clients, any of whom may be subject to cryptography export restrictions. Here, we assume a prior out-
out
of-band
band agreement on cipher capabilities.
How does this shared secret et become shared? The producer encrypts the symmetric key with the consumer’s public
key, ensuring only that party can decrypt the message. This encrypted key is embedded in the security header with
a reference to the key pair needed to unlock it (often ththis
is is implemented using the subject key identifier field from
the receiver’s certificate). In the security header, anyone can read the encrypted key, but only the designated
designat
receiver can decrypt it and use it to decipher the message content. Thus, no comp
complex multi-pass
pass protocol is
required to negotiate a security session key. Each message stands alone.
Conclusion
Web services is a great opportunity for PKI and a great challenge. Most vendors’ toolkits have a deliberately vague
coupling to commercial PKI KI systems. As always, it is what the standards loosely describe that becomes the source
of problems. Interfacing to a particular key store type or location and coercing servers to check Certificate
Revocation Lists (CRLs) or use Online Certificate Status Protocol (OCSP) can be troublesome. It is best to start
proactively, rolling out your PKI system before its services are demanded by a Web services application. The
demand will come because, while SSL is sufficient for synchronous client
client-server applications,
s, Web services
depends on asynchronous messaging, which is where PKI will shine.
Email:
info@layer7tech.com
Web Site:
www.layer7tech.com
Phone:
604-681-9377
1-800-681-9377 (toll free)
Fax:
604-681-9387
Address:
US Office
1200 G Street, NW, Suite 800
Washington, DC 20005
Canada Office
Suite 405-1100 Melville Street
Vancouver, BC
V6E 4A6 Canada
Legal Information
Copyright © 2010 by Layer 7 Technologies, Inc. (www.layer7tech.com). Contents confidential. All rights reserved.
SecureSpan™ is a registered trademark of Layer 7 Technologies, Inc. All other mentioned trade names and/or
trademarks are the property of their respective owne
owners.