Welcome!

Microservices Expo Authors: Pat Romanski, Elizabeth White, Liz McMillan, Carmen Gonzalez, JP Morgenthal

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
Docker containers have brought great opportunities to shorten the deployment process through continuous integration and the delivery of applications and microservices. This applies equally to enterprise data centers as well as the cloud. In his session at 20th Cloud Expo, Jari Kolehmainen, founder and CTO of Kontena, will discuss solutions and benefits of a deeply integrated deployment pipeline using technologies such as container management platforms, Docker containers, and the drone.io Cl tool...
For organizations that have amassed large sums of software complexity, taking a microservices approach is the first step toward DevOps and continuous improvement / development. Integrating system-level analysis with microservices makes it easier to change and add functionality to applications at any time without the increase of risk. Before you start big transformation projects or a cloud migration, make sure these changes won’t take down your entire organization.
SYS-CON Events announced today that CA Technologies has been named “Platinum Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY, and the 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business – from apparel to energy – is being rewritten by software. From ...
SYS-CON Events announced today that Outlyer, a monitoring service for DevOps and operations teams, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Outlyer is a monitoring service for DevOps and Operations teams running Cloud, SaaS, Microservices and IoT deployments. Designed for today's dynamic environments that need beyond cloud-scale monitoring, we make monitoring effortless so you...
DevOps is being widely accepted (if not fully adopted) as essential in enterprise IT. But as Enterprise DevOps gains maturity, expands scope, and increases velocity, the need for data-driven decisions across teams becomes more acute. DevOps teams in any modern business must wrangle the ‘digital exhaust’ from the delivery toolchain, "pervasive" and "cognitive" computing, APIs and services, mobile devices and applications, the Internet of Things, and now even blockchain. In this power panel at @...
Cloud Expo, Inc. has announced today that Andi Mann and Aruna Ravichandran have been named Co-Chairs of @DevOpsSummit at Cloud Expo 2017. The @DevOpsSummit at Cloud Expo New York will take place on June 6-8, 2017, at the Javits Center in New York City, New York, and @DevOpsSummit at Cloud Expo Silicon Valley will take place Oct. 31-Nov. 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, Cloud Expo and @ThingsExpo are two of the most important technology events of the year. Since its launch over eight years ago, Cloud Expo and @ThingsExpo have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, I provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading the...
TechTarget storage websites are the best online information resource for news, tips and expert advice for the storage, backup and disaster recovery markets. By creating abundant, high-quality editorial content across more than 140 highly targeted technology-specific websites, TechTarget attracts and nurtures communities of technology buyers researching their companies' information technology needs. By understanding these buyers' content consumption behaviors, TechTarget creates the purchase inte...
@DevOpsSummit at Cloud taking place June 6-8, 2017, at Javits Center, New York City, is co-located with the 20th International 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 wait for long developm...
Microservices (μServices) are a fascinating evolution of the Distributed Object Computing (DOC) paradigm. Initial design of DOC attempted to solve the problem of simplifying developing complex distributed applications by applying object-oriented design principles to disparate components operating across networked infrastructure. In this model, DOC “hid” the complexity of making this work from the developer regardless of the deployment architecture through the use of complex frameworks, such as C...
DevOps and microservices are permeating software engineering teams broadly, whether these teams are in pure software shops but happen to run a business, such Uber and Airbnb, or in companies that rely heavily on software to run more traditional business, such as financial firms or high-end manufacturers. Microservices and DevOps have created software development and therefore business speed and agility benefits, but they have also created problems; specifically, they have created software securi...
All clouds are not equal. To succeed in a DevOps context, organizations should plan to develop/deploy apps across a choice of on-premise and public clouds simultaneously depending on the business needs. This is where the concept of the Lean Cloud comes in - resting on the idea that you often need to relocate your app modules over their life cycles for both innovation and operational efficiency in the cloud. In his session at @DevOpsSummit at19th Cloud Expo, Valentin (Val) Bercovici, CTO of Soli...
The rise of containers and microservices has skyrocketed the rate at which new applications are moved into production environments today. While developers have been deploying containers to speed up the development processes for some time, there still remain challenges with running microservices efficiently. Most existing IT monitoring tools don’t actually maintain visibility into the containers that make up microservices. As those container applications move into production, some IT operations t...
The evolution of JavaScript and HTML 5 to support a genuine component based framework (Web Components) with the necessary tools to deliver something close to a native experience including genuine realtime networking (UDP using WebRTC). HTML5 is evolving to offer built in templating support, the ability to watch objects (which will speed up Angular) and Web Components (which offer Angular Directives). The native level support will offer a massive performance boost to frameworks having to fake all...
Microservices are a very exciting architectural approach that many organizations are looking to as a way to accelerate innovation. Microservices promise to allow teams to move away from monolithic "ball of mud" systems, but the reality is that, in the vast majority of organizations, different projects and technologies will continue to be developed at different speeds. How to handle the dependencies between these disparate systems with different iteration cycles? Consider the "canoncial problem" ...
Both SaaS vendors and SaaS buyers are going “all-in” to hyperscale IaaS platforms such as AWS, which is disrupting the SaaS value proposition. Why should the enterprise SaaS consumer pay for the SaaS service if their data is resident in adjacent AWS S3 buckets? If both SaaS sellers and buyers are using the same cloud tools, automation and pay-per-transaction model offered by IaaS platforms, then why not host the “shrink-wrapped” software in the customers’ cloud? Further, serverless computing, cl...
Hardware virtualization and cloud computing allowed us to increase resource utilization and increase our flexibility to respond to business demand. Docker Containers are the next quantum leap - Are they?! Databases always represented an additional set of challenges unique to running workloads requiring a maximum of I/O, network, CPU resources combined with data locality.
As software becomes more and more complex, we, as software developers, have been splitting up our code into smaller and smaller components. This is also true for the environment in which we run our code: going from bare metal, to VMs to the modern-day Cloud Native world of containers, schedulers and micro services. While we have figured out how to run containerized applications in the cloud using schedulers, we've yet to come up with a good solution to bridge the gap between getting your contain...
An overall theme of Cloud computing and the specific practices within it is fundamentally one of automation. The core value of technology is to continually automate low level procedures to free up people to work on more value add activities, ultimately leading to the utopian goal of full Autonomic Computing. For example a great way to define your plan for DevOps tool chain adoption is through this lens. In this TechTarget article they outline a simple maturity model for planning this.
The rapid growth of hyperscale IaaS platforms that provide Serverless and Software management automation services is changing how enterprises can get better Cloud ROI. Heightened security concerns and enabling developer productivity are strategic issues for 2017. The emergence of hyper-scale Infrastructure as-a-Service (IaaS) platforms such as Amazon Web Services (AWS) that offer Serverless computing, DevOps automation and large-scale data management capabilities is changing the economics of so...