I write on variety of software-related topics, such as Design, Development, and Security,… My new upcoming articles will focus on the Spring Framework, REST architecture, RESTful web services, and Java implementations.

Also, I’m including a Download page for some Freeware and Shareware I have developed over the past few years. Many of these can be downloaded from my web site M9P.

Because it takes lots of research and effort to write an article, I really hope you enjoy reading them and I consider every post for a comment, question, suggestion, disagreement, or correction.

Abstract
Introduction
1. Web service: definition
2. Web services security models: description
2.1. Transport-level security: SSL
2.2. Transport-level security: TLS
2.3. Message-level security: XML Encryption
2.4. Message-level security: XML Signature
2.5. Message-level security: SAML
2.6. Message-level security: WS-Security
3. Web services security models: limitations
3.1. Transport-level security
3.1.1. Point-to-point security
3.1.2. Document-wise encryption
3.2. Message-level security
Conclusion

 

Abstract defining web services and some six web services security models which the least they solve the basic security problems, i.e., authentication and authorization, message encryption, and message integrity .

Introduction

Web services might be modeled in accordance with six security models. Communication, in web services, is usually made through exchange of SOAP messages, which are XML documents, over HTTP or HTTPS transport medium. Over the past years, web services become widely used, productively, by organizations . Their widespread usage over the internet, naturally, revealed a need for security. There was a need of private communication (or confidentiality) between parties. The receiver should be able to verify the identity of the sender (or authenticate the sender) and the originality of the data (or integrity of the data, i.e., the data has not been tempered with). These Security requirements were especially crucial when conducting online business, such as, e-Commerce. Altair Valasek (2003) introduced three basic security problems, with web services, which need to be addressed: authentication and authorization, message encryption, and message integrity. Unfortunately, web services originally lacked default security features to deal with these problems. It was the responsibility of the developer to address and solve the security problems. Still, implementing the security was greatly facilitated by the usage of XML in the web services messaging process. This is because XML allows the unlimited addition of security extension to the messages themselves. Depending on the security necessities, a developer can choose one from many available security models to solve the security problems. This paper presents six common web services security models. These models are arranged in two categories: transport-level security and message-level security. The first category includes two models: Secure Sockets Layer (SSL) and Transport Layer Security (TLS). The second category includes four models: XML encryption, XML signature, Security Assertion Markup Language (SAML), and WS-Security . Next, before providing short descriptions for these models, it is essential to provide a formal definition of a web service.

1. Web service: definition

A web service is a network software component that provides specific functions and is able to publish its capabilities to other network components. Microsoft defines it as “a loosely-coupled, language-neutral, platform-independent way of linking applications within organizations, across enterprises, and across the internet”. A web service relies on Web Service Definition Language (WSDL), an eXtensible Markup Language (XML) based, to acknowledge its interfaces and capabilities. The World Wide Web Consortium (W3C) describes WSDL as “an XML grammar for describing network services as collection of communication endpoints capable of exchanging messages”. A web service uses the Universal Description, Discovery, and Integration (UDDI), a system and a set of XML protocols, to allow others to know about it. UDDI.org puts the following definition: “UDDI is a specification for distributed web-based information registries of web services. UDDI is also a publicly accessible set of implementations of the specification that allow businesses to register information about the web services they offer so that other businesses can find them”. Finally, a web service communicates with other web services by using the Simple Object Access Protocol (SOAP), an XML protocol commonly transported over HTTP or HTTPS. W3C says that “SOAP provides the definition of an XML document, which can be used for exchanging structured and typed information between peers in a decentralized, distributed environment. It is fundamentally a stateless, one-way message exchange paradigm”.

2. Web services security models: description

2.1. Transport-level security: SSL

SSL  is a cryptography protocol for secure communication over the internet. This protocol is commonly used to secure financial transactions. It is based on the public-private key system of encryption. SSL operates in mid-layer above TCP/IP and below HTTP. The term sockets, in its name, refers to a method of communication, which uses secure pipes, between client and server (see, Figure1 ) to provide data confidentiality, authentication, and Integrity.

2.2. Transport-level security: TLS

TLS is relatively new protocol and it is the successor of the SSL protocol. The Internet Engineering Task Force (IETF) defines TLS as a “protocol [that] provides communications security over the Internet. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery” .

2.3. Message-level security: XML Encryption

XML encryption security model ensures data confidentiality through, of course, encryption.

2.4. Message-level security: XML Signature

XML signature is a technique for wrapping digital signature within XML format. It secures messages through providing data authentication and Integrity.

2.5. Message-level security: SAML

The Organization for the Advancement of Structured Information Standards (OASIS) defines SAML as “an XML-based framework for exchanging security information. This security information is expressed in the form of assertions about subjects, where a subject is an entity (either human or computer) that has an identity in some security domain.”  Basically, SAML security model provides authentication and authorization.

2.6. Message-level security: WS-Security

WS-Security was released by OASIS standards Organization in 2004. To secure the SOAP messages, WS-Security uses a combination of security tokens and digital signatures. A security token can represent the sender identity. Authenticated occurs when the signature is able to prove the sender’s association with the security token . Data confidentiality, authentication, and Integrity.

3. Web services security models: limitations

The decision to title this section as limitation and not weaknesses is for a very legitimate reason. The limitations in any security model may or may not be considered as weaknesses, and that is because not in every case all the security features are required. In some case, it is required to apply only one security feature, for example integrity, and so there would a security model that secure only the integrity of the data, and on.

3.1. Transport-level security

3.1.1. Point-to-point security

Rather than providing end-to-end security, SSL/TLS provides point-to-point security. This is considered a limitation for the following reason: in web services architecture there might be multiple function calls in between intermediary nodes, before the actual service is provided to the requesting client; Then, SSL/TLS does not provide security between client and web service as a whole (end-to-end), it only secures the client and the first intermediary node (point-to-point) .

3.1.2. Document-wise encryption

Rather than providing also application-message-level security (for element-wise encryption), SSL/TLS provides only transport-level security (document-wise encryption). Some web services need encrypting only part of the SOAP document, yet, that is not possible with SSL/TLS .

3.2. Message-level security

As mentioned in the introductory part of this section, these security models can have limitations, but these limitations might be intentional because not, in every case, all of the security features are required. For example, XML signature only provides authentication and integrity, but not confidentiality, while XML encryption model provides confidentiality, but not authentication and integrity. So that depends on what security is required, accordingly, a security model will be selected for implementation.

Conclusion

Six common web services security models were presented, defined and analyzed. Two of those are transport-level type security and the rest are message-level type security. Transport-level type models were point-to-point and document-wise oriented. If end-to-end and element-wise oriented security was needed, one can choose from the message-level type of security models. Fortunately, the limitations in the transport level have been addressed with some security models at the message level. At this level, it is possible to achieve end-to-end security as well as element-wise encryption. Depending on the result of a security analysis, hopefully a company can find the exact security requirements in one of these models. However, there is nothing that forbids implementing more than one model in a single case, if no one model was found to satisfy the exact security requirements.

Abstract
Introduction
1. Securing Multi-tier Software System
2. Security Modeling Guidelines
2.1. Weakest Point Fortification
2.2. In-Depth Defense
2.3. Access Control
2.4. Compartmentalization
2.5. Privacy
2.6. Communication Confidentiality
2.7. Failsafe
Conclusion

 
Abstract discussing the security requirements to build a secure multi-tier software system. the discussion includes: 1. a preview of multi-tier models security features; 2. a description of security requirements through a compilation of some software security modeling guidelines based on readings from Building Secure Software: How to Avoid Security Problems the Right Way by Viega and McGraw (2002); these model plans need to be seriously considered for implementation while designing software systems, in order to prevent many common security pitfalls.

Introduction

Many multi-tier software models exist in the world today. From Microsoft Distributed Component Object Model (DCOM) to Web Services, passing by Sun’s Java Remote Method Invocation (RMI) and OMG’s Common Object Request Broker Architecture (CORBA), any model can be acceptable as long as the implementation is secure. This research will put forward basic, and essential, guidelines to follow in order to build secure software. The software security modeling guidelines are all based on the author comprehension of some security issues while reading from the excellent book by John Viega and Gary McGraw, titled, Building Secure Software: How to Avoid Security Problems the Right Way, published by Addison-Wesley in 2002. Basically, these modeling procedures enforce system security. In addition, each guideline can be implemented in more than one way, whereby, the software developer can follow one or a combination of two or more (or all) of the security guidelines, depending on the security requirements of the software system. By modeling the software following these guidelines, the software developer can avoid numerous common security problems. Certainly not to forget that there is also the choice of the programming language(s) to use to implement the software and the operating system(s) where the software will be running, which, both of them, do have a great influence on the strength of the security.

1. Securing Multi-tier Software System

Commonly used multi-tier models are DCOM, RMI, CORBA, and Web Services. The first three of those, namely, DCOM, RMI, and CORBA are equipped with their own default security features. For instance, DCOM, which exists only in the Windows’ COM-centric world, provides security through its authentication level. Basically, there are seven levels of security in DCOM providing varying degrees of authentication and data integrity. Sequentially from first to last, these are: No Authentication; Connect Authentication (client authenticated only on connection); Default Authentication (at the moment, not differentiable from Connect Authentication); Call-level Authentication (for every method call, to avoid hijacking attacks); Packet-level Authentication (for every packet of every method call); Packet Integrity-level Authentication (adds checksum to prevent tampering with data); and finally; Packet Privacy-level Authentication (fully encrypt all data). Java RMI provides, through its security manager, the ability to encrypt sockets and the ability to connect on Internet Inter-ORB Protocol (IIOP). When using this protocol RMI becomes known as RMI over IIOP. IIOP supports secure communication between client and server objects through the use of cryptography. In fact, IIOP was original designed by OMG as CORBA’s default communication infrastructure. CORBA, on the other hand, has quite elaborate security features. For example, CORBA objects can be configured to restrict method calls to clients with the required security credentials. Though web services do not have default security features, they can be secured using any of the security models provided in chapter 1. Below are some security modeling guidelines that can be followed while building software systems using DCOM, RMI, CORBA, Web Services or any other multi-tier architecture.

2. Security Modeling Guidelines

2.1. Weakest Point Fortification

The software is safe as much as its weakest point is safe. Envisioning that security is like a chain, it is true that a chain is as strong as its weakest point. Naturally, a hacker would find and concentrate the attack on the weakest access point of the chain. So it would be quite logical to fortify the weakest point in order to raise the security bar for the whole software. But the main question is how can one identify the weakest point in a system? Well, that would require some analysis of the whole system. Basically, in some systems it would be very easy to find the weakest point, while in others it might be more difficult. To give an example of what is a weak access point; consider a system that uses cryptography to encrypt sensitive data while sending it from point A to point B over a network. A hacker can eavesdrop the network and intercept the transmitted data between point A and B; so is the transmission medium of the network itself the weakest point of the chain? Of course not! That’s because the hacker will be intercepting encrypted data, and it would take a while to decrypt it. The hacker would certainly search for an easier way. In this case, the hacker might try to access the data before they get encrypted on the sending side of the network, i.e., before point A. Another way the hacker might try is to access the data after they get decrypted on the receiving side of the network, i.e., after point B. Assuming, for the sake of argument, that the sending side, before point A, is not well secured, then it would be considered an easier target for the hacker, and thus, the sending side is the weakest point in the security chain, and not the transmission medium of the network. Following the Weakest point fortification security model, the security measures before point A should be reconsidered and fortified.

2.2. In-Depth Defense

In-depth defense security procedure requires layering multiple layers of different types of defense mechanisms. This model anticipates the possibility of security breaches, and thus, advises of layering down multiple layers of defense. When one layer is breached, the attacker will be faced by another layer of different type. Notice the emphasis on the word different: the layers should be different from each other in principles of defense; otherwise, if the attacker can breach one layer, breaching an adjacent similar layer will be as easy. The idea here is to diversify the defense layers in order to make it extremely difficult for the attacker to figure out all of them at one go. As an example, consider a company that wants to protect data on its intranet. The company can throw a firewall. This is one layer of defense. Yet, to apply the in-depth defense security model, the company may need to also encrypt the data. This is a second layer of defense and of different type than the first. The hacker may trespass the firewall, but then, all what the attacker gets is encrypted data. But what if the attacker can decrypt the data? Well, a third layer of defense can be added, such as, a user authentication system, and so on… In fact, it depends on the sensitivity of the data and how much the company is willing to take security measures to protect its data.

2.3. Access Control

Access control security procedure states that a user access to a software system should be controlled with privileges and, possibly, with time limitation. Each user should be granted the least possible privileges required to perform the tasks that the user needs to do. In addition, and if possible, limit the user access to the system for the exact time that the user requires to perform the tasks. One example of a system that should but does not apply access control on one of its operations is the UNIX operating system. Though UNIX is considered a secure system, but it is not entirely flawless. Unfortunately, when an application requires using the SMTP (Simple Mail Transport Protocol) service, UNIX grants the application the root privileges! The reader should be aware that with the root account in UNIX, the user can do absolutely everything. So giving an application the root privileges does not constitute a good security policy, since the application might be controlled by a malicious user. The reason why UNIX does this thing is that, only the root user can open port 25 (required by the mail server). Giving the application the root privileges will allow it to open the port. How can the access control security model be applied in this scenario? The secure way, is to create an account in UNIX that has only the privilege to open port 25. The application will then login with this account. This is the least privileges principle. Another easier but not as secure way, can be the following: if the application was given the root privileges to open port 25, then the UNIX system should directly relinquish these privileges from the application as soon as it opens the port. This is the minimal time principle. What’s the most secure way then? The reader can easily figure it out! Of course, it is the combination of the least privileges and the minimum time principles.

2.4. Compartmentalization

The compartmentalization security procedure requires breaking up a system to multiple units (compartments) in order to minimize the damage effect on the whole system by isolating the damage to a limited area of the system. Such modeling is effectively used when building ships, whereby, the submersed part of the ship is divided into multiple separately sealed chambers. If, for some reason, the hull gets breached, it doesn’t mean that the water will flood the entire ship, and thus causing it to sink. Only, the chamber(s) in direct contact with the breach will get flooded, and the ship should be able to keep floating. Same reasoning applies while building web services. Since no one can guarantee that a system won’t eventually get cracked, yet, if that happens, should the entire system fall down prey to the attack? By using compartmentalization, the integrity of the software system as a whole, following a security breach, should hold in a reasonable way. The damage will be prevented from spreading to more than the localized area that was the access point of the attacker. An example of a system that uses this model is Solaris operating system. Operations in Solaris are broken down into a set of entities that provide specific functionalities to specific set of roles with restrictions. Breaking into the operating system does not mean that the hacker can do everything. For every function the attacker wishes to execute, the attacker needs to also break into the entity responsible of executing the specified function.

 2.5. Privacy

The Privacy security procedure promotes the protection of personal information provided to the software system by its users. By enforcing data protection and by promoting to the users that the system protects their privacy, the users will then trust the system and consider it secure. Basically, even if the system is really secure in practical implementation, but if the users were not educated of the security measures of the system, then the system may not be considered as secure. So two things needs to be taken care in this security modeling: firstly, implementing security measures to protect privacy; secondly, promoting these security measures to the users, in order to establish the trust relationship between the users and the system. The first step in protecting personal information is by encrypting the sensitive data and by not leaving any information laying around in the system, since these might fall as an easy prey for an intruder. The second step is by enforcing constraints on the Database Management system (DBMS). There are several ways to protect the DBMS from unauthorized access. One way is by restricting access to the database to user groups which, in turn, are assigned specific access privileges. Another way is by using stored procedures, rather than giving users direct read and write access to the database.

2.6. Communication Confidentiality

Communication confidentiality procedure ensures, in addition to the secrecy, the integrity and the nonrepudiation of exchanged data with and within a software system. For secrecy, data communicated over a network should be unidentifiable when eavesdropped. For integrity, there should be a way to validate that the data is original, i.e., not tempered with. For nonrepudiation, the sender should be able to check that the intended recipient received the data, and vise versa, the recipient should be able to check that the data originated from the alleged sender (authentication process). These requirements of the confidential communication, namely secrecy, integrity and nonrepudiation, can be fairly handled with cryptography. Certainly, encrypting the exchanged data will make it, hopefully, useless for the eavesdropper. Even though that does not deter the attacker from altering the data, yet, cryptographic hashes provide a technique to validate its integrity by checking its checksums. To validate of the identities of the parties involved in the communication, digital signature, also a cryptographic technique, can be used. An example of a preexisting cryptographic protocol that is widely deployed is Secure Sockets Layer (SSL) or its recent successor, which is newer version of SSL, Transport Layer Security (TLS). SSL in itself provides two requirements of communication security, secrecy and integrity. To ensure nonrepudiation, SSL is usually combined with the digital certificate functionality provided by some Certificate Authority (CA). This type of security is described as security at the transport-level, which provides point-to-point (rather than end-to-end) security and document-wise (rather than element-wise) security. In case end-to-end and message-wise security are required, then, it is advisable to use what is known as message-level security. An example of message-level security protocol is WS-Security.

2.7. Failsafe

Failsafe security procedure requires devising failure modes in which a software system continues to operate securely and stably following failures. In many cases, attackers provoke a system into behaving insecurely by leading it into some sort of failure (or simply, they wait for it to fail in its own). This will provide them with an open window to launch a more successful attack. For the reason of the inevitable of failures, it is necessary that the web service, in case of failure occurrences, be able to continue operating stably and securely. This requires planning for alternative mode of operations, or failure modes. Certainly, this is not an easy thing to do! The developer has to foresee cases where the system might fail. Whether a software failure or a hardware failure, at the exact point in time when the failure occurs, the developer needs to devise a way where the system switches to the failure mode responsible of dealing with that specific failure. For instance, one type of Failsafe security model implementation is a model that involves hardware. This might be the replacement of one big server by two or more smaller servers (clustering). When some failure is detected in one server, that server is shutdown to prevent it from behaving insecurely, and at the same time another server, in the cluster, replaces it. One might argue that a smaller server may not be able to carry the same load of the bigger server which it replaces. Well, there is a way around that problem, and that is by load-balancing on multiple servers. The big server can be replaced by three smaller servers, whereby, two of them balance the load, between each other, of the replaced big server, and one stands for backup. When a failure (again hardware or software) occurs in one of the two servers, the backup server takes its place. Depending on the degree of the security required, the number of the server in the cluster can be increased. Another type of Failsafe security model implementation is a model that involves software. This might be by implementation of a Transaction service, whereby, in the case of an attack in a mid-step in an atomic multi-step functionality, the system should be able to roll-back to its original state. For example, in the case of transferring money from one bank account to another, where at least two steps are required, namely debit the first account then credit the second account, the system should perform these two steps atomically, i.e., as a single step, by applying a Transaction service. The Transaction will be able to roll-back the first account to its original state after the occurrence of a failure, probably due an attack, in-between the debit and the credit step. So, as it is clear in this example, it is not enough to continue operating securely after some failure, the system needs also to continue operating stably, and that by enabling it to re-instate its stable state before a transactional operation that fails.

Conclusion

This chapter introduced common multi-tier models and some generic security guidelines (seven of them) that can be applied, individually or in combination, on, supposedly, any software system. No doubt, that these modeling guidelines, when applied, will provide a reasonable protection for the software system. Though they were presented in a more theoretical than practical way, yet, finding the correct way to implement them is not difficult. Most importantly, they do not contradict each other. This provides the software developer with the option to apply all of them, simultaneously, on a single software system, in order to enhance the effectiveness of its security.

The design of a software application is a blueprint of the system (Jalote, 1997)

Historically, the original concern while building a software product was mostly related to programming issues alone. As time passed and applications became more and more sophisticated, the concern increasingly started to shift toward the design issues (Graham & Wills, 2007). In general, designing an application begins when some set of requirements are available. The resulting design would be a solution that satisfies those requirements. Yet, the requirements might change whilst developing the solution, so it is important to be able to integrate any changes dynamically throughout the design cycle (C. Martin, 2002). To design the application, the designer usually, follows some design methodologies and uses some design and building tools.

Next Page »

Follow

Get every new post delivered to your Inbox.