Web Services Security Using SOAP, \Rysdl and UDDI
Total Page:16
File Type:pdf, Size:1020Kb
Web Services Security Using SOAP, \rySDL and UDDI by Lin Yan A Thesis Submitted to the Faculty of Graduate Studies in Partial Fulfillment of the Requirements for the Degtee of MASTER OF SCIENCE Department of Electrical and Computer Engineering University of Manitoba Winnipeg, Manitoba, Canada @ Lin Yan, 2006 THE I]NTVERSITY OF MANITOBA FACULTY OF GRÄDUATE STUDIES COPYRIGHT PERMISSION Web Services Security Using SOAP, WSDL and IJDDI BY Lin Yan A Thesis/Practicum submitted to the Faculty ofGraduate Studies ofThe University of Manitoba in partial fulfillment of the requirement of the degree OF MASTER OF SCIENCE Lin Yan @ 2006 Permission has been granted to the Library ofthe University of Manitoba to lend or sell copies of this thesis/practicum' to the National Library of Canada to microfilm this thesis and to lend or sell copies of the film, and to University Microfitms Inc, to publish an abstract of this thesis/practicum, This reproduction or copy ofthis thesis has been made available by authority ofthe copyright orvner solely for the purpose of private study and research, and may only be reproduced and copied as permitted by copyright laws or with express rvritten authorization from the copyright owner. ABSTRACT The Internet is beginning to change the way businesses operate. Companies are using the Web for selling products, to find suppliers or trading partners, and to link existing applications to other applications. With the rise of today's e-business and e-commerce systems, web services are rapidly becoming the enabling technology to meet the need of commerce. However, they are not without problems. While Web services are designed to pass through firewalls and have the capability to access Application Program Interfaces (APIs), they also come with security issues. ln this thesis, I present a viable approach for securing Web services. This approach adopts the Entrust/PKI (Public Key Infrashucture) and PKCS#7 cryptographic message syntax standard. This approach offers the capability to restrict access to an XML Web service to authorized users, and to protect the integrity and confidentiality of XML messages exchanged in a Web se¡vice environment. I make some comparison of this approaclr with existing standards and technologies for Web services security. Finally, a prototype based on the service-oriented architecture (SOA) is developed to validate the performance and effectiveness ofthe proposed approach. lyeb Setnices Secur¡ly, @ Lin Yon 2006 ACKNOWLEDGEMENTS I would like acknowledge foremost the constructive guidance of my advisor, Dr. Robert D. Mcleod. Without his patience, knowledge and encouragement, thìs thesis could not have been completed. Also, I would like to thank my father for his love, suppoñ, and encouragement in my life. Without his contribution for taking care of my son during the period of my graduate studies, it would be impossible for me to have completed my graduate study program. Last but not least, I am grateful to Tao Wang, my husband, and Shi Yan, our son, whose support and understanding was also vital to the completion of my thesis. ll/eb Services Security, @ Lin )'an 2006 TABLE OF CONTENTS Approval Form Abstract .......... i Acknowledgements ................... i i Table ofContents ......... ..........iii List ofFigures ... ....................iii Figure 1-l Web Services Architecture ................4 Figure 2-l IBM and Microsoft Web Se¡vices security specifications . .3 5 Figure3-l 3-tier Design in Credit Card Web Service .. ............ .......40 Figure 3-2 Credit Card Checking Scenario Use Case Diagram ..... ......43 Figure 3-3 Entrust/PKl core components and their relationships ... ... ... ... .. ..... ... ......44 Figure3-4Encryption/DecryptionSequenceDiagram..........................................50 Figure4-l Business Entity in UDDI ...................62 Figure 4-2 Details ofa Business ....... ................63 Figure 4-3 Details ofa Service ............ ..............64 Figure 4-4 UDDI Find Interface ... ............... .............................65 Figure 5-l Entrust/Toolkit for Java Basic Architecture ............ ........70 Figure 5-2 Logic flow of Credit Card Web Service in WebSphere Studio ...... ...............75 Figure 5-3 Web services security standards work together .. .. ... ... .....85 Chapter I Introduction . I l.l The Internet . 1 ll/eb Services Security, @ Lin |'an 2006 llt 1.2 Web Services ...... .. .. ... .....2 1.3 Associated Web Services Standards .................4 l.3.lExtensibleMarkupLanguage-XML.............. ............4 L3.2 Simple Object Access Protocol- SOAP .......................8 1.3.3 Web Services Description Language - WSDL .....................................8 L3.4 Universal Description, Discovery and Integration - UDDI .......................9 1.4 Motivations and Objectives ...........................9 Summary ..............................1I Chapter 2 Technologies for Web Services Security ... ... ... .. ..............12 2.1 Public Key Infrastructure - PKI... ... ...... ..........12 2.1.1 Security through cryptography.................. .. ..............12 2.1.2 Certificates ............15 2.1.3 Certification Authority ............................15 2.1.4 Public Key Inflastructure ... ... ............. ....................15 2.2XML Signature ...................17 2.2.1 XML Signature Overview ................17 2.2.2 XML Signature Structure .................18 2.2.3 XML Signature Generation ............... ....................20 2.2.4 XML Signature Validation ...............21 2.3 XML Encryption ................. .....................21 2.3.1 XML Encryption Overview ..............21 2.3.2 XMLBncryption Structure ..............22 2.3.3 XML Encryption Types .................23 Iyeb Sen ices Secur'¡ty, @ Lin Yan 2006 lv 2.3.4 Encrypting an XML element, example ........... ...........23 2.3.5 Encryption Steps ...... ........ ...............25 2.3.6 Decryption Steps .............. ............26 2.4 XML Key Management Specification - XKMS .........................27 2.4.1XKMS Overview ............................27 2.4.2XMLKeylnformationServiceSpecification...................................27 2.4.3XMLKeyRegistrationServiceSpecification...................................31 2.5 WS-Security ...... ..............33 2.5.1 WS-Security Overview ..................33 2.5.2 lBM/Microsoft Web Services Security Road Map ..............................33 2.5.3 WS-Security Elements and Attributes ...........................35 Summary......... ..................3 8 Chapter3CreditCardWebServiceA¡chitecture.....................,.........................39 3.l The Client/Server Model and 3-tier Architecture .............-.......39 3.2 The 3{ier Architecture in Credit Card 'üy'eb Service .................40 3.3 UseCaseAnalysis ............... ...................42 3.4 Entrust PKI ....................44 3.4.1 Entrust PKI A¡chitecture ...............44 3.4.2 Entrust PKI User Roles ........ ........46 3.5 PKCS #7: Cryptographic Message Syntax Standard ................47 3.5.1 Overview ...........47 3.5.2 Encryption and Decryption Sequence ......................48 Summary ......... ..................51 Ileb Services Security, @ Lik yan 2006 Chapter 4 Building Credit Card Web Service using SOAP, WSDL and UDDI ... .52 4.1 Overview .......................52 4.2 SOAP ...........................53 4.2.1 SOAP Message Structure ................... .................53 4.2.2 SOAP Message Encoding . .. .... .. ...55 4.2.3 Summary ...........56 4.3 V/SDL .........................57 4.4 UDDL.........................60 4.4.1UDDI Business Registry .......... ....60 4.4.2UsingUDDItoRegisterandFindServices....................................6l Summary ...... ......... ...... .....66 Chapter 5 Credit Card Web Service Implementation ...................67 5.1 Implementation Language .......................67 5.2 Implementation Tools ............ ................68 5.2.1 Entrust Authority Security Toolkit for Java . .........68 5.2.218M Websphere Studio ...............73 5.3 PKCS #7 ImplementationwithEntrustToolkit..........................................75 5.3.1 Encode ............75 5.3.2 Decode ............77 5.4 Database Design and Implementation.............. ..................78 5.5 Comparison with Other Web Services Security Solutions .. ... ...80 5.5.1 Benefits/Limitations of existing technologies . ...... ...80 5.5.2 Benefits/Limitations ofthe proposed solutions ..........87 IVeb Services Secwi6,, @ Lin fan 2006 VI lyeb Ser-vices Secutily, @ Lin Yan 2006 Chopter I lntroduction Chapter 1 Introduction This thesis presents a viable approach for securing Web services. The purpose of this approach is to increase the security of transferring XML (Extensible Markup Language) messages over the Internet. This approach adopts the Entrust/PKl (Public Key Iníìastructure) and PKCS #7 cryptographic message syntax standard. A comparison of this approach with existing standards and technologies for Web services security is also reported. As a prototype, a sample credit card Web service is developed with the help of UML (Unified Modeling Language) modeling, to demonstrate the performance and effectiveness of our approaclr. In the remainder of this introductory chapter, I first introduce Internet concepts and Web services in particular in Section 1.1 and Section 1.2 respectively. Following that, I review the associated Web services standards including XML, SOAP (Simple Object Access Protocol), WSDL (Web Services Description Language), and UDDI (Universal Description, Discovery and Integration) in Section