Implement an XML Encryption engine
In this second installment, Bilal Siddiqui examines the usage model of XML Encryption with the help of a use case scenario. He presents a simple demo application, explaining how it uses the XML Encryption implementation. He then continues with his last implementation of XML Encryption and makes use of JCA/JCE classes to support cryptography. Finally, he briefly discusses the applications of XML Encryption in SOAP-based Web services.
In Part 1 of this series, I gave an introduction to XML Encryption and its underlying syntax and processing. I examined the different tags and their respective use in XML encryption with a simple example of secure exchange of structured data, proposed a Java API for XML Encryption based on DOM, and gave a brief overview of cryptography in Java (JCA/JCE).
I start my discussion in this part with an information exchange scenario, which demonstrates the use of XML encryption.
Information exchange scenario
Consider the process of information exchange between two enterprises. One is an online books-seller and the other is a publisher. When the books-seller wants to purchase books, it submits a purchase order to the publisher. At the publisher's end, the sales department receives this order, processes it, and forwards it to the accounts department. The two enterprises exchange information in the form of XML documents. Since some portion of the document needs to be secure and the rest can be sent insecurely, XML encryption is the natural approach for applying security to distinct portions of the document.
According to the books-seller's security policy, the payment information will only be revealed to the accounts department. The sales department will need to extract only the name of the book, its item ID and the quantity ordered; because this is insensitive information it can remain insecure. The accounts department will need to decrypt the payment information in the purchase order using a pre-exchanged secret key. (Note that XML Encryption is only about encryption and decryption of structured information and does not dictate any particular method of key exchange.) Mapping this policy, XML Encryption facilitates the concealment of payment information in the sales department and its disclosure in the accounts department.
Document-based security
At this point, it may be useful to ponder a bit on the concept of document-based security. With this security architecture, you can impose security at the document level. The context of a secure session is effectively preserved within the secure document. All the information that an authorized party may need to decrypt the document is available inside the document. A logical secure session is created that is flexible, has a long life, and allows numerous parties to be part of the same secure session. An upcoming protocol for Web services, the Business Transaction Protocol (BTP -- see Resources), relies on the same concept of preserving the context of a session within a transaction document; this prolongs the life of a transaction and enhances its flexibility.
Full article and source:
|
IBM
|