Welcome!

AJAX & REA Authors: Scott Sellers, Liz McMillan, RealWire News Distribution, David Smith

Related Topics: SOA & WOA

SOA & WOA: Article

Six Basic Rules for Securing SOA Based Projects

Common Sense SOA Security

Over the past five years, an "alphabet soup" of new Web Services Security specifications, standards, and buzzwords has been thrust upon the technology scene. As we have watched the evolution of many Web services security specifications, it has sometimes been difficult to wade through the murky and dangerous waters of implementation patent issues, vendor wars, competing specifications, and challenges of interoperability. These waters have thankfully become clearer over the past few years, due to vendor agreement and some diligent work in standards organizations such as OASIS and the W3C. Mature specifications have emerged and have become (or are now on their way to becoming) standards. As a result, many standards-based Web service security toolkits and implementations have been shipped that allow developers to build solutions quickly. That's the good news!

Is there bad news? The bad news isn't tragic, but it must be stated. Because it is relatively easy to use these new products to build security solutions without a security background and without looking at the big picture, it's easy to develop a security solution that is over-engineered, complex, poor-performing, and possibly even insecure. Because our current tools are focused on ease of integration, the use of these tools may not require any background in information assurance or information security techniques. As a result, bad solutions can and will be developed. In meeting this challenge, we must underscore the need to focus on the "A" in SOA, the essential tenets of information security, and a few common sense rules.

This article will build on six basic, common sense rules and best-practices that you can follow as you are building your SOA security solutions.

1)  Plan Ahead
A major pitfall occurs when architects wait until the last minute to plan for security. This happens more than we would like to admit. Either requirements aren't plainly stated and the team is surprised at the last minute, or someone makes a deliberate choice to worry about security later. Many times, our focus is on designing, developing, and testing core functionality of our services, and a security focus is not scheduled until a few weeks before deployment. The standard model of Web Services Security SOAP messaging appeals to designers and developers because of the logical separation of security data in the SOAP header and business data in the SOAP body - and therefore, the physical separation of security logic in security handlers and business logic in the main Web service code. Unfortunately, this separation also provides an unacceptable excuse to worry about security later.

For your project, it is absolutely vital to determine your security requirements very early in the project. Based on those requirements, you can then delve into how you are going to satisfy them. A good requirements analysis phase is absolutely necessary because most customers may simply say "Just make it secure!" From the beginning, you will need to determine what requirements may exist for authentication, authorization, integrity, non-repudiation, auditing, and confidentiality. Talk to your customers and end users and find out who will be levying security requirements. Once you get with the right people, either work with them to gather security requirements or help them determine what their security needs are. The key point here is to make sure that you find out the true requirements at the beginning of your projects in order to make the appropriate design decisions early.

2)  Know the Enterprise Infrastructure
As many of us are developing our applications, we often forget about the environment in which we will deploy our solutions. As we architect our security solutions, we must never architect in a vacuum or assume anything about the existing enterprise security infrastructure. Security-wise, there will undoubtedly be systems such as LDAP directory servers, policy servers, and Public Key Infrastructure (PKI), with which you will have to integrate. This enterprise infrastructure may dictate much about how your system will operate. Issues regarding connectivity, credential management, policy and privilege management, user authentication and authorization, and auditing may be affected by the existing infrastructure. This gets back to our first point - plan ahead by asking the right questions as you begin your project. Do not assume anything about the infrastructure; make sure to know your enterprise integration points.

3)  Stick To The Standards
For those of us who had to develop Web services security solutions in the caveman days (three to five years ago), many times we had to play the role of amateur cryptographer because the secure messaging standards had not yet been developed. As a result, many of us have grown accustomed to tinkering and creating our own "secure" messaging concoctions. This may not have been the best thing to do then, but it is definitely the wrong thing to do now.

Now that there are accepted standards - such as WS-Security and its associated token profiles used for identity propagation (WS-Security SAML Token Profile, WS-Security X.509 Token Profile, WS-Security Username Token Profile) - as well as emerging specifications in standards bodies (WS-SecureConversation, etc.), there should no longer be any reason to create a home-grown security messaging syntax. Certainly, you must be able to understand the purpose and use of these standards and security specifications in order to meet your security requirements, but you need to avoid creating home-grown protocols. In addition to the problems that you will have down the road involving lack of interoperability with other systems, any non-standard solution created by wannabe cryptographers will most likely have security vulnerabilities that could come back to haunt you in very ugly ways. We have standards for a reason - embrace them.

4)  Think Like a Security Guy (or Hire One!)
If you are developing a security architecture for a SOA that involves sensitive, proprietary, or highly confidential information, you will either need to be well-versed in information security and the current standards, or you will need to hire a security professional. Understanding the fundamentals of information security will be necessary not only in determining the security requirements at the beginning of your project, but also for designing the architecture, testing, and - if necessary- getting through the proper certification and accreditation processes.

Although you can lean on the WS-Security standards and toolkits to do the hard work for you, many of these standards have multiple options that you will have to study and select, based on the security requirements of your system. Most Web services security solutions must be able to thwart message replay attacks, protect availability, and, depending on the requirements, provide some or all of the classical security goals: authentication, authorization, confidentiality, integrity, and non-repudiation. Remember that the Web services security standards may not be intuitive for those who have not had an information security background, so make sure your people are educated in information security.

5)  Remember the Nature of Web Services
In a large SOA pilot four years ago, initial tests showed that all Web services were functional and operating normally, so the developers were relieved. When there were errors related to access control, a Web service would throw a SOAP fault. The problem? In this particular environment where much Web service chaining was happening, it wasn't always quite apparent which service threw the SOAP fault, because the SOAP fault contained very little information. I remember calling the administrator of the first Web service on the phone, asking him if he could look in his logs to see why the SOAP fault was thrown. Then he told me that his Web service didn't really throw it, but that his Web service programmatically called another Web service, which must have thrown the fault. I then called the administrator of the next Web service on the phone to get more information. It goes without saying that the process got old quickly.

We can still have similar problems today if we do not understand that Web services are essentially "black boxes" with published interfaces, and that they will be called and used together in ways we may not always anticipate. Web service chaining and orchestration should therefore be expected, so you must understand the distributed and dynamic nature of Web services. In planning for this from a security perspective, you need to focus on Web services transaction management, centralized auditing, and detailed, descriptive error handling. This relates not only to Web services security in regards to auditing, but also to Web service management.

6)  Understand the Double-Edged Sword of Cryptography
Cryptography is a mechanism that we use to achieve most, if not all, of our security goals. It is with cryptography that we achieve authentication, confidentiality, integrity, and non-repudiation. At the same time, we must acknowledge that cryptography is performance-intensive, which could slow down systems and lead to problems with availability and denial of service. The double-edged sword is that cryptography - when done right - is a friend of security, but cryptography always has a negative impact on performance. Think of a seesaw with your security goals on one side, and your goals of performance and availability on the other. The key thing is to keep things balanced.

Sometimes engineers forget about the high cost of cryptography when they choose to secure services that don't need securing, or when they apply unnecessary cryptography. I once saw a solution where the body of every Web services call was signed by the caller with XML Signature, encrypted to the recipient with XML Encryption, and each Web service client initiated an SSL connection to each Web service for every request. What was the biggest problem (other than the redundancy of encryption for each connection)? The back end Web services were reading bytes from a public Internet Web page, so the developers used a lot of cryptography to encrypt, decrypt, sign, and eventually validate the signature of publicly available data that had no assurance of integrity. Essentially, they created a very slow SOAP-based alternative to HTTP!

In planning your SOA security solution, it is absolutely essential to be wise and deliberate about the cryptography you use. Going back to the first rule (Plan Ahead), it is important to truly understand your security requirements. If there is no requirement for confidentiality, then you shouldn't use encryption! If there is only one part of your message that is sensitive, then perhaps only that part of your message should be encrypted. If you need to encrypt everything between two points only, consider using SSL. If you have a requirement for technical non-repudiation, then using XML Signature in your WS-Security messaging is a valid choice. Realize, however, that all cryptography will have a performance cost and will affect the scalability of your system. If you have serious cryptographic needs in solving your security requirements, consider using hardware acceleration products that do the cryptography and XML processing in the hardware. The use of cryptography should be intentional, based on your requirements, and you must plan ahead for its impact on performance.

Conclusion
Diving head-first into detailed implementation issues involved in SOA security, it is truly easy to make mistakes or become overwhelmed if you don't initially focus on the big picture, beginning with understanding your true security requirements, understanding the fundamentals of information security, and understanding the proper use of Web services security standards. This article has attempted to capture this big picture by providing six common sense rules to use when planning and developing SOA security solutions. Above all else, it is important to focus on basic project management, security architecture fundamentals, and common sense!

More Stories By Kevin Smith

Kevin T. Smith is a technical director at McDonald Bradley, where he leads the SOA and Semantics Security Team (S3T) focusing on securing Web services for multiple projects. An author of several technology books on XML, Web services, Java development, and the Semantic Web, he is a frequent speaker at many conferences, such as JavaOne, OMG Web Services, Association for Enterprise Integration (AFEI), and Net-Centric Warfare.

Comments (1) View Comments

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.


Most Recent Comments
JDJ News Desk 10/30/06 04:03:58 PM EST

Over the past five years, an 'alphabet soup' of new Web Services Security specifications, standards, and buzzwords has been thrust upon the technology scene. As we have watched the evolution of many Web services security specifications, it has sometimes been difficult to wade through the murky and dangerous waters of implementation patent issues, vendor wars, competing specifications, and challenges of interoperability. These waters have thankfully become clearer over the past few years, due to vendor agreement and some diligent work in standards organizations such as OASIS and the W3C. Mature specifications have emerged and have become (or are now on their way to becoming) standards.

Cloud Expo Breaking News
Nearly every enterprise is evaluating cloud computing solutions either today or in the near term. Many have already made the leap, and many more are getting close to putting that first toe in the water. But there are key considerations that should be made, questions to be asked, and designs to consider before you can feel secure with your provider. In his session at the 10th International Cloud Expo, David Gulick, Product Manager, Hosting Product Management at Savvis, will help give you food f...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and strategy sessions for you dealing with every nook and cranny of Cloud Computing, but what of those who are presenting? Who are they, where do they work, what else have they written and/or said about the Cloud that is t...
SYS-CON Events announced today that Super Micro Computer, Inc., a global leader in high-performance, high-efficiency server technology and green computing, will exhibit at SYS-CON's 10th International Cloud Expo, which will take place on June 11–14, 2012, at the Javits Center in New York City, New York. Supermicro (NASDAQ: SMCI), the leading innovator in high-performance, high-efficiency server technology, is a premier provider of advanced server Building Block Solutions for Embedded Systems, E...
SYS-CON Events announced today that ScaleMP, a leading provider of virtualization solutions for high-end computing, will exhibit at SYS-CON's 10th International Cloud Expo, which will take place on June 11–14, 2012, at the Javits Center in New York City, New York. ScaleMP is the leader in virtualization for high-end computing, providing maximum performance and lower total cost of ownership (TCO). The innovative Versatile SMP (vSMP) architecture aggregates multiple independent systems into a sin...
Come learn real-world examples where cloud and mobile are changing the way business works and the impact they're having on efficiency and productivity. In his session at the 10th International Cloud Expo, Rodrigo Coutinho Senior Product Marketing Manager at OutSystems, will look at how mobile and the cloud are interwoven and the wave of change these two 2012 megatrends will bring to your organization. He will also provide a roadmap to assure you can navigate this sea change for business succes...
Enterprise IT organizations want to deploy a virtualized data center fabric that will provide the foundation for agile private cloud computing. Getting there does not have to be difficult, but it does require a new approach to data center infrastructure design – an approach that is non-disruptive, vendor-agnostic, and very adaptable to changing business requirements. In his session at the 10th International Cloud Expo, Bruce Fingles, Chief Information Officer and VP of Product Quality at Xsigo...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
How can businesses harness the power of APIs to reach new customers and markets? In his session at the 10th International Cloud Expo, Alistair Farquharson, CTO at SOA Software, will walk the audience through the growth and evolution of the API, why effective API management is important, and how the game changes when companies expose business applications to the outside world. He will also discuss: A brief history of the API How to use APIs to make money, save money, build brand "Appificatio...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and strategy sessions for you every day from June 11 through June 14 dealing with every nook and cranny of Cloud Computing and Big Data, but what of those who are presenting? Who are they, where do they work, what else have ...