Welcome!

Microservices Expo Authors: Christoph Schell, Elizabeth White, Matt Brickey, Pat Romanski, Liz McMillan

Related Topics: Microservices Expo, Cloud Security

Microservices Expo: Article

We Know Web Services Need Security, But What Type?

We Know Web Services Need Security, But What Type?

It's well known that Web services need security. It's also a truism that lack of security is the barrier to the adoption of Web services. Let's dig a little deeper: What is it about Web services that provoke the security concerns? What is being done to answer the challenge? By answering these questions, this article attempts to dispel some of the confusion around Web services security.

First, let's take a step back and focus on what security actually is. For some, security is linked to identity - a system is "secure" if the identities of all users are known and intruders are blocked. For others, security is synonymous with cryptography - for them, a "secure" document means an encrypted and/or digitally signed document. Finally, the battery of attacks on Web servers in the past few years has given rise to a third meaning of security - a system is "secure" if it is locked down against buffer-overflow attacks, denial-of-service attacks, and application-level attacks exploiting known vulnerabilities in server software.

Fortunately, the information security industry has codified these various meanings. I'll look at these in turn, beginning with access control.

3A Security: "Who's Running My Web Service?"
The Access Control theory defines the functions of "3A" security - authentication, authorization, and audit. The difference between authentication and authorization is important. Authentication is "who you are" while authorization is "what you are permitted to access." It's surprising how often a system is touted as allowing "authenticated access," because authentication alone is rarely enough - it has to be linked to access control rules for authorization. 3A security is widely used for access to company extranets for high-value consumer services such as home banking.

3A has been successful for controlling access to Web sites. It seems obvious that it should be useful for Web services also, even for Web services that do not use HTTP. It turns out that it is indeed obvious that 3A security should be used for Web services, but implementing it isn't as easy as it might seem. The problem is that first "A", authentication. Let's look at how the security context differs between Web site access and Web services access.

When a Web site receives an HTTP request from a user, it has a direct connection to that user. The user's browser is at the other end of an SSL session, over which they can authenticate using a password or a client certificate. The security context is relatively simple (see Figure 1).

 

The well-known OSI stack applies for the connection between the user's Web browser and the Web site. Security can be applied at various levels of the stack - and TLS/SSL applies at the transport layer, as the name implies (Transport Layer Security).

Now think about how Web services enlarge the security context. Let's say that the user in Figure 1 authenticates to a Web site, and then submits a Web form that runs a Web service in order to retrieve information on that user's behalf (see Figure 2).

 

In Figure 2, things get more complicated. The OSI stack applies for both communications. However, if access to the Web service is to be based on authentication of the end user, then we have a problem, since the OSI stack only applies for each "hop" of the full transaction. Let's look at another example of multiple security contexts, this time using SOAP routing (see Figure 3).

Again, in Figure 3 we see that if access to the final Web service depends on the originator of the SOAP request, we have a problem. In addition, the OSI stack for each "hop" may use different communication technologies. This creates a challenge to create a "golden thread" back to the originator of the SOAP request. SOAP is independent of the underlying communication transport, and in any case it is not guaranteed that the same communication transport will be used for the entire life cycle of a SOAP message.

 

The challenge of implementing 3A security for Web services is being ably met by industry standards bodies including OASIS and the W3C, industry consortia such as Project Liberty, and by Microsoft. Let's look at how SAML addresses the problem we saw back in Figure 2 (see Figure 4).

 

In Figure 4, the scenario is contextualized into a currency trading situation. If the Web service that is executing the trade relies only on transport security, then it only has visibility of the currency dealing system (which is probably an application server). But what if the Web service must know who the trader actually is? After all, it may be the case that hundreds of traders use the same dealing system, which in turn sends SOAP requests to the trade fulfilment Web service. The answer is that the outgoing SOAP message includes a SAML authentication assertion. The information in this assertion indicates that the dealer was authenticated at a certain time, how they authenticated (e.g., by password), how long the authentication is valid for, and a "NameIdentifer" element to indicate the identity of the trader. The "NameIdentifier" may be an e-mail address, a username, or an X.509 common name such as "C=US, O=Acme Banking Inc, OU=Trading, CN=Joe Trader".

SAML effectively extends 3A security along the security context all the way from the dealer to the Web service, which they ultimately use. Although SAML is not directly used for authentication, it is used to convey information about authentication events that have happened. As we can see in Figure 4, that's very useful. As well as authentication and authorization assertions, SAML includes attribute assertions that can be used to convey information about the end user - e.g., a credit limit.

In Figure 4, notice that Step 1 is the only sign-on step - i.e., it is a Single Sign-On (SSO) scenario. Other technologies - .NET Passport and Project Liberty - that can also use SAML technology, aim to provide SSO for Web services. Liberty explicitly uses SAML and extends some of the SAML ideas, e.g., to introduce "authentication context" (information about rules governing the authentication act). It makes sense for .NET Passport to use certain portions of SAML - for example, the SAML request/response protocol (called the "SAML Protocol"), which we see in Steps 5 and 6 of Figure 4. Liberty and .NET Passport offer specifications for federated authentication services - a user can authenticate once and this authentication can be valid for multiple services. Passport and Liberty are finding uses in Web site access before Web services access, but the critical mass of Passport users (legions of Hotmail users) and of AOL Instant Messenger (AOL is a member of Project Liberty) means that in 2003, Liberty or Passport authentication should start to be used for Web services.

So far, we haven't seen any disastrous "security holes" in XML or Web services. It's true that the Web services model certainly presents challenges, due to expanding the security context beyond the simple browser-to-Web site model. However, these challenges are being addressed by the industry in specifications such as SAML.

"Confidentiality, Integrity, Nonrepudiation":
Same Old Principles, New SOAPy Environment

Look again at the SOAP routing scenario in Figure 3. Think about the high-level principles of security - confidentiality (ensuring that data in transit cannot be read), integrity (ensuring that undetectable changes cannot be applied to data), and nonrepudiation (to prove the originator sent the data). These principles existed before Web services were invented, and now must be mapped to the Web services model.

Confidentiality can be implemented at each "hop" of the transaction - but what if information sent by the originator must be hidden from the SOAP intermediary but revealed at the destination of the SOAP message? Or what if data must be protected from change by intermediaries while it is en route to the destination Web service? This is where XML-Signature and XML Encryption come into play. XML-Signature may be used to selectively sign a portion of XML data. WS-Security provides a framework for putting XML-Signature data into a SOAP message. Similarly, XML Encryption may be used to selectively encrypt a portion of a SOAP message. And again, WS-Security provides a framework for putting XML Encryption data into a SOAP message. The ability to selectively sign data is important for SOAP, since portions of the SOAP message may be volatile (e.g., routing information in the <head>), and if the entire SOAP message was digitally signed, then the signature would be almost guaranteed to break. Similarly, encrypting an entire SOAP message would be counterproductive.

XML Encryption is used to satisfy the high-level security principle of confidentiality for Web services. XML-Signature is used to satisfy the high-level security principle of integrity. When linked with a digital certificate, XML-Signature can be further used for nonrepudiation - i.e., to prove the identity of the originator of the SOAP message, and to prove the fact that they sent the message.

WS-Security describes not only how to sign and encrypt portions of a SOAP message, but also how to sign and encrypt security tokens in SOAP messages. These security tokens include X.509 v3 digital certificates, Kerberos tickets, and username/password combinations. These security tokens allow a security context to persist within the message; later specifications such as WS-Trust and WS-Policy build on WS-Security to explain how security tokens may be obtained, or verified, using SOAP. It is convenient to think of WS-Security as a specification that takes XML security, such as XML Signature and XML Encryption; links it with preexisting security technologies, such as X.509 and Kerberos; and binds it to SOAP.

So far, we've seen how security is being applied to Web services and to SOAP in particular. The reason isn't because there is anything inherently dangerous about Web services - just that it is awkward to map 3A security, and the high-level principles of security (confidentiality, integrity, and nonrepudiation) to a distributed model.

New Threats:
The Next Steps for Firewalls

Freud called dreams the "royal road to the unconscious," believing that repressed thoughts are concealed by layers of protection while we are awake. When we are asleep, these thoughts find expression. Freud believed that a skilled psychoanalyst could use dreams to probe directly into a client's darkest secrets. The "royal road" analogy also applies to Web services, when they are implemented over HTTP. An organization may have layers of protection, but if a SOAP-over-HTTP Web service bypasses this protection, then it represents a "royal road" into the organization's IT infrastructure.

Although there is no stipulation that Web services must use HTTP, they frequently do. Existing firewalls tend to be all-or-nothing when it comes to SOAP-over-HTTP. All SOAP requests can be blocked, or all allowed through. Firewalls must be able to distinguish SOAP requests from invalid requests. A valid request and an invalid request may differ only on the basis of the SOAP method being called. Listing 1 shows a valid SOAP request to a method called "GetTime", which takes a time zone as a parameter; Listing 2 shows a SOAP request that targets another Web service method, called "PleaseDontRunMe".

The challenge for firewalls is how to allow the first SOAP message, targeting a valid method of a Web service, and to block the second message. It is not a case that SOAP can magically cut through firewalls - it's relatively trivial to configure a firewall to block all SOAP messages. The challenge is to selectively block SOAP messages. There are analogies with firewall functionality at lower layers of the OSI stack - e.g., application level gateways or stateful-inspection firewalls. Filtering on the targeted SOAP method is only the first step, however.

Filtering on the data that is provided to a Web service is more complicated because the details of each Web service are specific. Consider a Web service that takes a ZIP code as a parameter. The valid input is a five-character string. If the Web service receives 5,000 characters as input, this may indicate that an attacker is testing for vulnerability to a buffer-overflow attack. In order to block this sort of attack, a firewall must be aware of what type of data is valid for the Web service. This information is found in the WSDL for that service.

A number of vendors in the software and hardware space have launched SOAP-aware firewall products. It is important to see these in the context of "traditional" firewalls. Firewalls became popular when corporate networks were exposed to the entire world. Web services are not yet being exposed to the entire world - businesses are beginning to use XML behind the firewall, before deploying limited partner-integration projects. It can be argued that the 3A aspects of security are therefore more important than XML firewalling since it's important to control who is accessing your Web service, before examining the data they are sending.

Conclusion
This article divided Web services security into three topics: 3A security is being addressed by initiatives such as SAML, Project Liberty, and .NET Passport. The high-level principles of confidentiality, integrity, and nonrepudiation are addressed by XML-Signature and XML Encryption, which are packaged into SOAP messages using WS-Security. Finally, when SOAP is sent over HTTP, firewalls must evolve to discriminate SOAP traffic on the basis of what SOAP method is being called, and what parameters are being sent.

None of the three aspects of security mean that Web services are too "dangerous" to adopt. If proper care is used, Web services represent an exciting enabling technology that is here to stay.

More Stories By Mark O'Neill

Mark O'Neill is VP Innovation at Axway - API and Identity. Previously he was CTO and co-founder at Vordel, which was acquired by Axway. A regular speaker at industry conferences and a contributor to SOA World Magazine and Cloud Computing Journal, Mark holds a degree in mathematics and psychology from Trinity College Dublin and graduate qualifications in neural network programming from Oxford University.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@MicroservicesExpo Stories
From personal care products to groceries and movies on demand, cloud-based subscriptions are fulfilling the needs of consumers across an array of market sectors. Nowhere is this shift to subscription services more evident than in the technology sector. By adopting an Everything-as-a-Service (XaaS) delivery model, companies are able to tailor their computing environments to shape the experiences they want for customers as well as their workforce.
If you read a lot of business and technology publications, you might think public clouds are universally preferred over all other cloud options. To be sure, the numbers posted by Amazon Web Services (AWS) and Microsoft’s Azure platform are nothing short of impressive. Statistics reveal that public clouds are growing faster than private clouds and analysts at IDC predict that public cloud growth will be 3 times that of private clouds by 2019.
"Outscale was founded in 2010, is based in France, is a strategic partner to Dassault Systémes and has done quite a bit of work with divisions of Dassault," explained Jackie Funk, Digital Marketing exec at Outscale, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"DivvyCloud as a company set out to help customers automate solutions to the most common cloud problems," noted Jeremy Snyder, VP of Business Development at DivvyCloud, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We focus on SAP workloads because they are among the most powerful but somewhat challenging workloads out there to take into public cloud," explained Swen Conrad, CEO of Ocean9, Inc., in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"As we've gone out into the public cloud we've seen that over time we may have lost a few things - we've lost control, we've given up cost to a certain extent, and then security, flexibility," explained Steve Conner, VP of Sales at Cloudistics,in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"Peak 10 is a hybrid infrastructure provider across the nation. We are in the thick of things when it comes to hybrid IT," explained , Chief Technology Officer at Peak 10, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I think DevOps is now a rambunctious teenager – it’s starting to get a mind of its own, wanting to get its own things but it still needs some adult supervision," explained Thomas Hooker, VP of marketing at CollabNet, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I will be talking about ChatOps and ChatOps as a way to solve some problems in the DevOps space," explained Himanshu Chhetri, CTO of Addteq, in this SYS-CON.tv interview at @DevOpsSummit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, provided a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services with...
If you are thinking about moving applications off a mainframe and over to open systems and the cloud, consider these guidelines to prioritize what to move and what to eliminate. On the surface, mainframe architecture seems relatively simple: A centrally located computer processes data through an input/output subsystem and stores its computations in memory. At the other end of the mainframe are printers and terminals that communicate with the mainframe through protocols. For all of its apparen...
DevOps at Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to w...
There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability and development velocity challenges. In his session at 21st Cloud Expo, Ryland Degnan, a Senior Software Engineer on the Netflix Edge Platform team, will discuss how by leveraging a reactive stream-based protocol,...
"At the keynote this morning we spoke about the value proposition of Nutanix, of having a DevOps culture and a mindset, and the business outcomes of achieving agility and scale, which everybody here is trying to accomplish," noted Mark Lavi, DevOps Solution Architect at Nutanix, in this SYS-CON.tv interview at @DevOpsSummit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
For over a decade, Application Programming Interface or APIs have been used to exchange data between multiple platforms. From social media to news and media sites, most websites depend on APIs to provide a dynamic and real-time digital experience. APIs have made its way into almost every device and service available today and it continues to spur innovations in every field of technology. There are multiple programming languages used to build and run applications in the online world. And just li...
Data reduction delivers compelling cost reduction that substantially improves the business case in every cloud deployment model. No matter which cloud approach you choose, the cost savings benefits from data reduction should not be ignored and must be a component of your cloud strategy. IT professionals are finding that the future of IT infrastructure lies in the cloud. Data reduction technologies enable clouds — public, private, and hybrid — to deliver business agility and elasticity at the lo...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In their Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, and Mark Lav...
"NetApp's vision is how we help organizations manage data - delivering the right data in the right place, in the right time, to the people who need it, and doing it agnostic to what the platform is," explained Josh Atwell, Developer Advocate for NetApp, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Five years ago development was seen as a dead-end career, now it’s anything but – with an explosion in mobile and IoT initiatives increasing the demand for skilled engineers. But apart from having a ready supply of great coders, what constitutes true ‘DevOps Royalty’? It’ll be the ability to craft resilient architectures, supportability, security everywhere across the software lifecycle. In his keynote at @DevOpsSummit at 20th Cloud Expo, Jeffrey Scheaffer, GM and SVP, Continuous Delivery Busine...
"We do one of the best file systems in the world. We learned how to deal with Big Data many years ago and we implemented this knowledge into our software," explained Jakub Ratajczak, Business Development Manager at MooseFS, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.