|
|
YOUR FEEDBACK
SOA World Conference
Virtualization Conference $200 Savings Expire May 16, 2008... – Register Today! Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Security
Don't Forget Security on the Way Out
Security requirements for a Web service that are often overlooked
By: Tieu Luu
Feb. 20, 2006 11:15 AM
Digg This!
Typically when we think about security for a Web service, our focus is on how to protect it from unauthorized and malicious users. Thus, we tend to concentrate on such things as authentication of the requestor, checking to see that the requestor is authorized to access the service, validation of the request message, and so forth - all things that happen on the way in or during a request for the service. However, there is an equally important set of security functions that need to occur on the way out or after the service has finished processing the request.
Typical View of Web Services Security - Only Half of the Picture
The Complete Picture
Content Filtering Ideally, this type of functionality should be handled in the security infrastructure, separate from the implementation of the service. One approach may be to use a message handler that intercepts outbound messages from the Web service and uses XSLT to filter out content that the requestor is not authorized to see. One drawback to this approach is that it may not be the most efficient approach. In some cases, it may make more sense to filter out the content before everything is converted to XML. In other cases, this may not even be feasible. Considering the DOD example from above, if the schema definition for the response data does not include an element or attribute that specifies the classification level of the data, that information would be lost once the response is converted into XML. Thus, the message handler would not have enough information to properly filter the data. In such cases, it may be necessary to have a post-processing security layer within the service implementation to perform the filtering before the response is converted into XML.
Message Signing For example, the accounts payable department of a large organization may provide a Web service for its partners to submit invoices for payment. The implementation logic of this service will need to verify and approve the invoices that it receives. Upon verification and approval, this service will need to digitally sign a response message that is sent back to the partner indicating that the invoice has been received, verified, and approved. If there is ever any type of dispute over late or missing payments, the partner will have a digitally signed response proving that the organization did receive and approve the invoice it sent. In some cases, the total amount due that is specified on an invoice may not be the total amount that is approved for payment, perhaps because not all goods were delivered or some were defective. Whatever the case may be, the response from this invoicing service may contain an element that specifies the actual amount that was approved for payment. The service provider may want to sign that element of the response message to protect its integrity - so that it can't be modified without detection. This prevents an unscrupulous partner from disputing that a greater amount was approved for payment. Digitally signing the response message should be handled in the security infrastructure. The implementation should use the W3C specification for XML Signature [XMLSIG]. This is a formal recommendation from W3C that describes the syntax and processing rules for digitally signing selected elements in an XML document. The Web Services Security (WS-Security) standard from OASIS describes how XML Signature can be used to secure SOAP messages and how the signature should be attached to the message headers [WSSEC]. Following this standard allows loosely coupled service providers and consumers to independently sign and verify the SOAP messages that they exchange. Most Web service security products available today provide an outbound message handler that can be plugged into the service and digitally sign the XML response message. Some vendors offer dedicated XML hardware appliances that can "sit in front of" the Web service and intercept inbound and outbound messages and digitally sign and verify the XML messages.
Message Encryption Message encryption should be performed after the response has been converted into an XML message. Similar to message signing, this makes it ideal to be performed in the outbound message handler of the security infrastructure. WS-Security describes how XML Encryption should be used to encrypt any section of the body or header of a SOAP message. XML Encryption is another W3C recommendation that specifies a process for encrypting XML data and representing the results in XML [XMLENC]. Using these mechanisms essentially allows encrypting of the response message at the application level, thus avoiding the aforementioned problems. Just as with message signing, most Web service security vendors provide message handlers or XML appliances that can perform the message-level encryption and decryption so that developers will not need to build it into the service's implementation.
Insert Security Tokens Adding security tokens to an outbound message can be supported by having an outbound message handler that intercepts the message on the way out and inserts the tokens into the message headers. Unfortunately, the heterogeneous environment in which a Web service typically operates often adds extra complexity. Security tokens can be expressed in multiple formats such as X.509 certificates, Kerberos tickets, or SAML assertions. In a heterogeneous environment there may be multiple interacting domains with different security infrastructures, and they may not all support the same format for security tokens. Thus, the security token inserted by the outbound message handler may not always be interoperable with the security infrastructure of the next target service. Web Services Trust (WS-Trust) is a set of specifications, proposed by vendors such as IBM, BEA, and Microsoft, which describes how security tokens can be issued and exchanged through a trusted authority to enable interoperability across security domains [WSTRUST]. WS-Security defines how security tokens should be represented and attached to the headers of a SOAP message. Using a Web service security product that supports both WS-Security and WS-Trust may help to alleviate some of the complexity involved with supporting this requirement.
Summary References
SOA WORLD LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||