Welcome!

Microservices Expo Authors: Pat Romanski, Elizabeth White, Stackify Blog, Liz McMillan, Yeshim Deniz

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
Regardless of what business you’re in, it’s increasingly a software-driven business. Consumers’ rising expectations for connected digital and physical experiences are driving what some are calling the "Customer Experience Challenge.” In his session at @DevOpsSummit at 20th Cloud Expo, Marco Morales, Director of Global Solutions at CollabNet, will discuss how organizations are increasingly adopting a discipline of Value Stream Mapping to ensure that the software they are producing is poised to o...
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...
Cloud promises the agility required by today’s digital businesses. As organizations adopt cloud based infrastructures and services, their IT resources become increasingly dynamic and hybrid in nature. Managing these require modern IT operations and tools. In his session at 20th Cloud Expo, Raj Sundaram, Senior Principal Product Manager at CA Technologies, will discuss how to modernize your IT operations in order to proactively manage your hybrid cloud and IT environments. He will be sharing bes...
SYS-CON Events announced today that CollabNet, a global leader in enterprise software development, release automation and DevOps solutions, will be a Bronze Sponsor of SYS-CON's 20th International Cloud Expo®, taking place from June 6-8, 2017, at the Javits Center in New York City, NY. CollabNet offers a broad range of solutions with the mission of helping modern organizations deliver quality software at speed. The company’s latest innovation, the DevOps Lifecycle Manager (DLM), supports Value S...
SYS-CON Events announced today that Peak 10, Inc., a national IT infrastructure and cloud services provider, will exhibit at 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. Peak 10 provides reliable, tailored data center and network services, cloud and managed services. Its solutions are designed to scale and adapt to customers’ changing business needs, enabling them to lower costs, improve performance and focus intern...
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 his Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, will explore t...
This talk centers around how to automate best practices in a multi-/hybrid-cloud world based on our work with customers like GE, Discovery Communications and Fannie Mae. Today’s enterprises are reaping the benefits of cloud computing, but also discovering many risks and challenges. In the age of DevOps and the decentralization of IT, it’s easy to over-provision resources, forget that instances are running, or unintentionally expose vulnerabilities.
Most DevOps journeys involve several phases of maturity. Research shows that the inflection point where organizations begin to see maximum value is when they implement tight integration deploying their code to their infrastructure. Success at this level is the last barrier to at-will deployment. Storage, for instance, is more capable than where we read and write data. In his session at @DevOpsSummit at 20th Cloud Expo, Josh Atwell, a Developer Advocate for NetApp, will discuss the role and value...
It has never been a better time to be a developer! Thanks to cloud computing, deploying our applications is much easier than it used to be. How we deploy our apps continues to evolve thanks to cloud hosting, Platform-as-a-Service (PaaS), and now Function-as-a-Service. FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual "function", action, or piece of business logic. They are expected to start within milliseconds...
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.
There are two main reasons for infrastructure automation. First, system administrators, IT professionals and DevOps engineers need to automate as many routine tasks as possible. That’s why we build tools at Stackify to help developers automate processes like application performance management, error monitoring, and log management; automation means you have more time for mission-critical tasks. Second, automation makes the management of complex, diverse environments possible and allows rapid scal...
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...
We all know that end users experience the internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices - not doing so will be a path to eventual ...
SYS-CON Events announced today that Linux Academy, the foremost online Linux and cloud training platform and community, will exhibit at 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. Linux Academy was founded on the belief that providing high-quality, in-depth training should be available at an affordable price. Industry leaders in quality training, provided services, and student certification passes, its goal is to c...
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at 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. Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry’s single source for the cloud. Fusion’s advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including cloud...
SYS-CON Events announced today that HTBase will exhibit at 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. HTBase (Gartner 2016 Cool Vendor) delivers a Composable IT infrastructure solution architected for agility and increased efficiency. It turns compute, storage, and fabric into fluid pools of resources that are easily composed and re-composed to meet each application’s needs. With HTBase, companies can quickly prov...
@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...
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...
The purpose of this article is draw attention to key SaaS services that are commonly overlooked during contact signing that are essential to ensuring they meet the expectations and requirements of the organization and provide guidance and recommendations for process and controls necessary for achieving quality SaaS contractual agreements.
SYS-CON Events announced today that OpsGenie will exhibit at 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. Founded in 2012, OpsGenie is an alerting and on-call management solution for dev and ops teams. OpsGenie provides the tools needed to design actionable alerts, manage on-call schedules and escalations, and ensure that the right people are notified at the right time, using multiple notification methods.