Welcome!

Microservices Expo Authors: Jason Bloomberg, Elizabeth White, Pat Romanski, Mehdi Daoudi, 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
Many organizations are now looking to DevOps maturity models to gauge their DevOps adoption and compare their maturity to their peers. However, as enterprise organizations rush to adopt DevOps, moving past experimentation to embrace it at scale, they are in danger of falling into the trap that they have fallen into time and time again. Unfortunately, we've seen this movie before, and we know how it ends: badly.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
Many organizations adopt DevOps to reduce cycle times and deliver software faster; some take on DevOps to drive higher quality and better end-user experience; others look to DevOps for a clearer line-of-sight to customers to drive better business impacts. In truth, these three foundations go together. In this power panel at @DevOpsSummit 21st Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, industry experts will discuss how leading organizations build application success from all...
The last two years has seen discussions about cloud computing evolve from the public / private / hybrid split to the reality that most enterprises will be creating a complex, multi-cloud strategy. Companies are wary of committing all of their resources to a single cloud, and instead are choosing to spread the risk – and the benefits – of cloud computing across multiple providers and internal infrastructures, as they follow their business needs. Will this approach be successful? How large is the ...
‘Trend’ is a pretty common business term, but its definition tends to vary by industry. In performance monitoring, trend, or trend shift, is a key metric that is used to indicate change. Change is inevitable. Today’s websites must frequently update and change to keep up with competition and attract new users, but such changes can have a negative impact on the user experience if not managed properly. The dynamic nature of the Internet makes it necessary to constantly monitor different metrics. O...
Enterprises are moving to the cloud faster than most of us in security expected. CIOs are going from 0 to 100 in cloud adoption and leaving security teams in the dust. Once cloud is part of an enterprise stack, it’s unclear who has responsibility for the protection of applications, services, and data. When cloud breaches occur, whether active compromise or a publicly accessible database, the blame must fall on both service providers and users. In his session at 21st Cloud Expo, Ben Johnson, C...
21st International Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Me...
Today companies are looking to achieve cloud-first digital agility to reduce time-to-market, optimize utilization of resources, and rapidly deliver disruptive business solutions. However, leveraging the benefits of cloud deployments can be complicated for companies with extensive legacy computing environments. In his session at 21st Cloud Expo, Craig Sproule, founder and CEO of Metavine, will outline the challenges enterprises face in migrating legacy solutions to the cloud. He will also prese...
Most of the time there is a lot of work involved to move to the cloud, and most of that isn't really related to AWS or Azure or Google Cloud. Before we talk about public cloud vendors and DevOps tools, there are usually several technical and non-technical challenges that are connected to it and that every company needs to solve to move to the cloud. In his session at 21st Cloud Expo, Stefano Bellasio, CEO and founder of Cloud Academy Inc., will discuss what the tools, disciplines, and cultural...
The “Digital Era” is forcing us to engage with new methods to build, operate and maintain applications. This transformation also implies an evolution to more and more intelligent applications to better engage with the customers, while creating significant market differentiators. In both cases, the cloud has become a key enabler to embrace this digital revolution. So, moving to the cloud is no longer the question; the new questions are HOW and WHEN. To make this equation even more complex, most ...
With the rise of DevOps, containers are at the brink of becoming a pervasive technology in Enterprise IT to accelerate application delivery for the business. When it comes to adopting containers in the enterprise, security is the highest adoption barrier. Is your organization ready to address the security risks with containers for your DevOps environment? In his session at @DevOpsSummit at 21st Cloud Expo, Chris Van Tuin, Chief Technologist, NA West at Red Hat, will discuss: The top security r...
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
The nature of the technology business is forward-thinking. It focuses on the future and what’s coming next. Innovations and creativity in our world of software development strive to improve the status quo and increase customer satisfaction through speed and increased connectivity. Yet, while it's exciting to see enterprises embrace new ways of thinking and advance their processes with cutting edge technology, it rarely happens rapidly or even simultaneously across all industries.
These days, APIs have become an integral part of the digital transformation journey for all enterprises. Every digital innovation story is connected to APIs . But have you ever pondered over to know what are the source of these APIs? Let me explain - APIs sources can be varied, internal or external, solving different purposes, but mostly categorized into the following two categories. Data lakes is a term used to represent disconnected but relevant data that are used by various business units wit...
"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.
One of the biggest challenges with adopting a DevOps mentality is: new applications are easily adapted to cloud-native, microservice-based, or containerized architectures - they can be built for them - but old applications need complex refactoring. On the other hand, these new technologies can require relearning or adapting new, oftentimes more complex, methodologies and tools to be ready for production. In his general session at @DevOpsSummit at 20th Cloud Expo, Chris Brown, Solutions Marketi...
DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting challenge of adapting related cloud strategies to ensure optimal alignment, from managing complexity to ensuring proper governance. How can culture, automation, legacy apps and even budget be reexamined to enable this ongoing shift within the modern software factory?
"When we talk about cloud without compromise what we're talking about is that when people think about 'I need the flexibility of the cloud' - it's the ability to create applications and run them in a cloud environment that's far more flexible,” explained Matthew Finnie, CTO of Interoute, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.