Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic, Containers Expo Blog

Weblogic: Article

ebXML and XML Digital Signature

WebLogic Integration takes advantage of a growing technology

The data exchanged in business-to-business (B2B) messages is often sensitive and requires protection. Secure Socket Layer (SSL) provides protection at the transport level through the confidentiality of data exchanged between two endpoints.

However, such business messages may travel through multiple endpoints. This makes the message authenticity (who sent it?) and integrity (is it changed on its way?) necessary. Also, it is important to have these facts recorded for non-repudiation purposes.

BEA WebLogic Integration http://edocs.bea.com/wli/docs8/1 supports electronic business protocol using eXtensible Markup Language (ebXML) for B2B transactions. The ebXML protocol recommends using XML Digital Signature (XMLDSig) to provide message authenticity and integrity. This article provides an introduction to XMLDSig and describes how to use it with ebXML in WebLogic Integration 8.1.

The Need for Signature in B2B Transactions
Businesses prefer to use the Internet to exchange business documents, as it is a cheap and effective medium compared to expensive, proprietary, and closed networks. The usage of an unreliable and insecure medium such as the Internet brings forth requirements for security of business transactions. Transport-level security that provides encryption, integrity, and authentication at the session level between the endpoints is not enough when messages travel through various intermediate servers. In such cases, confidentiality, authenticity, and integrity need to be provided at the message level. An interoperable and globally accepted message-signing technology is needed to answer questions, such as who sent the message, was the message modified in transit, and can the sender deny sending it, or the recipient deny receiving it?

The rest of this section provides an introduction to signature. It describes what is legally meant by signature, what a digital signature is, the processes of generating and verifying a signature, and, at the end, the introduction of XMLDSig in the context of ebXML.

The subsequent sections describe the anatomy of XMLDSig including requirements from ebXML, as well as the processes of signing and verifying an ebXML message, and provide information on support and configuration of XMLDSig in WebLogic Integration.

Signature
According to the American Bar Association, a signature is not part of the substance of a transaction, but rather of its representation or form. A signature serves the following purposes:

  • Evidence: A signature authenticates a writing by identifying the signer with the signed document.
  • Ceremony: The act of signing a document calls to the signer's attention the legal significance of the signer's act, and thereby helps prevent inconsiderate engagements.
  • Approval: In certain contexts defined by law or custom, a signature expresses the signer's approval or authorization of the writing, or the signer's intention that it has legal effect.
  • Efficiency and logistics: A signature on a written document often imparts a sense of clarity and finality to the transaction and may lessen the subsequent need to inquire beyond the face of a document.
Digital Signature
Digital signature is a value generated from the application of a private key to a message via a cryptographic algorithm such that it has the properties of integrity, message authentication, and signer authentication, where
  • Integrity: The data has not been changed, destroyed, or lost in an unauthorized or accidental manner.
  • Message authentication: A signature identifies what is signed, making it impracticable to falsify or alter either the signed matter or the signature without detection.
  • Signer authentication: A signature indicates who signed a message. It should be difficult for another person to produce without authorization.
Generating a Digital Signature
Figure 1 describes the digital signature generation process performed by the signer.
  1. A hash function is applied to the data to be signed to generate a digest.
  2. The private key of the signer is applied to the digest of the data to be signed using a cryptographic signing function to produce a digital signature.
  3. The data and digital signature are sent to a recipient in some associative form such as an envelope.
Verifying a Digital Signature
After receiving the data and associated digital signature, the recipient performs the process described in Figure 2 to verify the signature.
  1. The same hash function that was used while signing the message is applied to the received data to compute a digest.
  2. The verifying function is applied using the signer's public key to find out if the signature was signed using the signer's private key and to verify if the computed digest and the digest that was transformed into the received signature are the same.
  3. Lastly, the signer's public key is verified.
XML Digital Signature for ebXML Messages
ebXML is a modular suite of specifications that enables enterprises of any size, in any geographical location, to conduct business over the Internet. The ebXML Messaging Service (ebXML-MS) specification defines a communication protocol-neutral method for exchanging business messages electronically between trading partners under some business transaction. It defines specific enveloping constructs that support reliable and secure delivery of business information including attachments. It also defines a set of namespace-qualified SOAP Header and Body element extensions within the SOAP Envelope as shown in Figure 3. An ebXML message is packaged within a MIME multipart to allow attachments to be included as per the SOAP Messages with Attachment specification.

Why Use XML Digital Signature with ebXML?
XML has become a lingua franca for business transactions conducted over the Internet as it is text based, Internet friendly, and provides a semistructured data format. Also, when a document is exchanged between several participants who may process only a portion of the document, which often is the case in business processes, a technology is needed to selectively sign only a portion of a document. The W3C/IETF joint XML Signature (XMLDSig) is the technology that leverages the power of XML and provides selective signing of documents. Therefore, the ebXML-MS specification mandates XMLDSig as the technology to use to sign the ebXML messages.

Anatomy of an XML Signature in the ebXML SOAP Envelope
Figure 4 shows the anatomy of an XMLDSig and the subsequent paragraph provides a brief description of each element, including values recommended by the ebXML-MS for certain elements, as well as the relationship between these elements.

The SOAP Header of an ebXML message may contain zero or more Signature elements. The first such element must be signed by the From party of the ebXML message.

Each Signature element contains one SignedInfo element, which consists of the information signed.

The CanonicalizationMethod is the algorithm that is used to canonicalize the SignedInfo element before it is digested as part of the signature operation. For ebXML-MS, www.w3.org/TR/2001/REC-xml-c14n-20010315 (c14n) is the recommended algorithm.

The SignatureMethod is the algorithm that is used to convert the canonicalized SignedInfo into the SignatureValue. It is a combination of a digest algorithm, a key dependent algorithm, and possibly other algorithms such as padding. The ebXML-MS recommends www.w3.org/2000/09/XMLDSig#dsa-sha1.

The signature can contain references to one or more data (payload) objects in the ebXML message. Each Reference element includes the digest method and the digest value calculated over a data object. The optional URI attribute of the Reference identifies the data object to be signed. A URI with the value "" identifies the node-set (without comment nodes) of the XML resource containing the signature while the value of the MIME content-id identifies a payload part of the ebXML message.

Transforms in Reference is an optional ordered list of processing steps that are applied to the data object's content before it is digested. Transforms can include operations such as canonicalization, encoding/decoding (including compression/inflation), XSLT, XPath, XML Schema validation, etc. The three transforms required for signing ebXML messages are:

  1. Enveloped Signature (www.w3.org/2000/09/XMLDSig#enveloped-signature): Signature is over the SOAP Envelope that contains the signature(s) as an element.
  2. XPath (www.w3.org/TR/1999/REC-xpath-19991116): With expression to exclude signing elements with attributes such as actor that could change as the message passes through intermediaries. It is

    not(ancestor-or-self::node()[@SOAP-ENV:
    actor='urn:oasis:names:tc:ebxml-msg:actor:nextMSH'] |
    ancestor-or-self::node()[@SOAP-ENV:actor=
    'http://schemas.xmlsoap.org/soap/actor/next'])

  3. Canonicalization of the SOAP Envelope using www.w3.org/TR/2001/REC-xml-c14n-20010315
DigestMethod is the algorithm applied to the data after the Transforms are applied to yield the DigestValue. The signing of the DigestValue is what binds a data object's content to the signer's key. www.w3.org/2000/09/xmldsig#sha1 is the mandatory digest algorithm for ebXML.

KeyInfo indicates the key to be used to validate the signature. Possible forms for identification include certificates, key names, and key agreement algorithms and information.

Object is the element where arbitrary data may be placed. An Object element is merely one type of digital data that can be signed via a Reference.

The Process
This section describes the processes of generating a signature for an ebXML message to be sent, and validating the signature when that message is received.

Let's say that the company ABC, Inc., buys laptops from company XYZ, Inc. These companies exchange business messages using ebXML-MS v2.0. Quote is a signed business document sent by XYZ (From party) in response to the QuoteRequest message received from ABC (To party) as shown in Figure 5.

XYZ uses the following attributes to sign the Quote message.

Signing of a Message
This section, with the help of Figure 6, describes the steps of the signature generation and packaging process. The steps are divided into three main parts: reference generation, signature generation, and packaging.

1.  Reference Generation for each data object to be signed:
a. Apply the three Transform(s) recommended by ebXML-MS.
b. Calculate the DigestValue for the transformed object using the SHA1 algorithm.
c. Create the Reference element including the URI for the referred object ("" for the SOAP Header containing the Signature or the value of the Content-id for the payload part with the Quote document), DigestValue, and DigestMethod used.

2.  Signature Generation:
a. Create SignedInfo with SignatureMethod, CanonicalizationMethod, and Reference(s).
b. Canonicalize the SignedInfo using the algorithm c14n.
c. Calculate SignatureValue for SignedInfo using the RSA-SHA1 algorithm and the private key of the Signer, XYZ.
d. Create the Signature element and include SignedInfo, SignatureValue and KeyInfo with the X509 certificate chain of XYZ.

3.  Packaging:
a. Package Signature as a SOAP Header.
b. Package ebXML multipart message with a SOAP Envelope and a payload part containing the Quote document as MIME parts.

Listing 1 (the code for this article is online at www.sys-con.com/weblogic/sourcec.cfm) shows an example of a signed ebXML message.

Validation of a Signed Message
This section describes the signature validation process. The process consists of four main parts: unpacking the signature from message, signature validation, reference validation, and signer verification as shown in figure 7.

1.  Unpack Signature
a. Obtain the Signature from the SOAP Envelope Header
b. Extract the KeyInfo, SignedInfo and SignatureValue from the Signature
c. Canonicalize SignedInfo using the c14n algorithm.

2.  Signature Validation
a. Extract XYZ's public key from the KeyInfo
b. Apply XYZ's public key and SignatureMethod RSA-SHA1 to validate the SignatureValue of the SignedInfo

3.  Reference Validation for each signed object
a. Get the data object to be digested. This should be obtained by de-referencing the URI of the Reference and applying Transform(s).
b. Calculate the digest of the data obtained above using SHA1 as the DigestMethod.
c. Compare this digest with the value in the DigestValue received for this Reference.

4.  Verifying the Signer
a. Validate XYZ's certificate; this may include time validity, host name verification, key usage, basic constraint checks, etc.
b. Validate XYZ's certificate chain. Make sure none of the certificates in the chain are revoked.
c. If ABC and XYZ had exchanged their certificates off-band, make sure that the received certificate's fingerprint matches with the one stored in ABC's database.

XMLDSig and ebXML in WebLogic Integration
BEA WebLogic Integration provides a J2EE and XML standard-based integration platform to enterprises to integrate business processes with various back-end systems and trading partners. The Trading Partner Integration module of WebLogic Integration helps enterprises automate and manage relationships with customers, suppliers, distributors, and other trading partners by providing support for business transactions conducted using ebXML and other protocols.

The ebXML protocol in WebLogic Integration uses XMLDSig for signing messages. This support consists of the following:

  1. Signing of ebXML Message with attachment(s).
  2. Signed acknowledgements for ebXML-MS 2.0
  3. KeyInfo including X509Data with Signer's certificate chain
  4. Signature algorithms
    a. www.w3.org/2000/09/xmldsig#rsa-sha1
    b. www.w3.org/2000/09/xmldsig#dsa-sha1
  5. Digest algorithm: www.w3.org/2000/09/xmldsig#sha1
  6. Canonicalization algorithm: www.w3.org/TR/2001/REC-xml-c14n-20010315
  7. Transform algorithms:
    a. www.w3.org/2000/09/xmldsig#enveloped-signature
    b. www.w3.org/TR/2001/REC-xml-c14n-20010315
    c. www.w3.org/TR/1999/REC-xpath-19991116 (with default XPath expression mandated by ebXML-MS)
The following procedure configures a digital signature for trading partners XYZ and ABC in WebLogic Integration for the scenario shown in Figure 5. For more information on the terminology used and configuration, refer to "Introducing Trading Partner Integration" and tutorials in BEA WebLogic Integration.

Assumptions

  • XYZ, Inc., uses WebLogic Integration. A WebLogic Integration domain is already created with custom keystores.
  • Trading partners ABC and XYZ have obtained public key certificates from recognized Certificate Authorities. These certificates have RSA public key and necessary key usage for signing messages.
  • XYZ offers a quote service using QuoteService.jpd as a BEA WebLogic Integration business process. This process receives the QuoteRequest document and responds with the Quote document. This process is already deployed in the WebLogic Integration domain.
  • ABC's system is running and ready to send QuoteRequest to XYZ. It has XYZ's public key certificate in its database.
Steps to Configure WebLogic Integration:
  1. Start WebLogic Integration server and log in to the WebLogic Integration console.
  2. Click Trading Partner Management->Profile Management.
  3. Create a Partner Profile for XYZ.
    a. Click Create New and fill all necessary information for XYZ. Make it a LOCAL trading partner. Click Add Profile.
    b. Click Add Binding, select ebXML 2.0 and click Create Binding.
    c. Change the Endpoint information. Click Add Certificate where Signature Certificate is required.
    d. Choose Import certificate from file and click Next.
    e. If the private key is password protected, you will have to create a password alias using Add alias.
    f. Provide the location of the private key and certificate for XYZ and enable the Import Certificate In KeyStore checkbox. Click Create Certificate. This private key and certificate is used to send a signed Quote from XYZ to ABC.
    g. Enable the Signature Required checkbox and click Add Binding.
  4. Create a Partner Profile for ABC.
    a. Follow steps 3a-3d above for ABC, but specify ABC as a REMOTE trading partner.
    b. Provide the location of the file where the public key certificate of ABC is kept. Enable the Import Certificate In KeyStore checkbox. Click Create Certificate. This is needed to complete the signer verification process in case ABC sends signed messages to XYZ.
    c. Enable the Signature Required checkbox and click Add Binding. This indicates that ABC is expecting signed documents from XYZ.
  5. Create a ServiceProfile between XYZ and ABC for service QuoteService.jpd by following the steps from Trading Partner Management->Service Management.
  6. A third-party plug-in to perform certificate verification can be configured in WebLogic Integration as described in Trading Partner Integration Security.
  7. To enable nonrepudiation, configure a Secure Audit Log provider. Follow the steps described in "Trading Partner Management" for more information.
Conclusion
Message-level authenticity and integrity are some of the basic requirements for B2B messages that travel through various intermediate servers within and outside of enterprises. XMLDSig is best suited as the technology that achieves this for ebXML. WebLogic Integration supports this basic functionality for its ebXML protocol stack to help its customers take advantage of this technology.

References

  • ebXML, Electronic Business using eXtensible Markup Language: www.ebxml.org
  • XML-Signature Syntax and Processing. W3C Recommendation, February 2002: www.w3.org/TR/xmldsig-core
  • ebXML Messaging Service Specification, v2.0: www.oasis-open.org/committees/ebxml-msg/documents/ebMS_v2_0.pdf
  • Digital Signatures in Trading Partner Integration Security, WebLogic Integration: http://edocs.bea.com/wli/docs81/tpintro/security.html#1097886
  • Simon, Ed et al. "An Introduction to XML Digital Signatures" August 2001, XML.com. www.xml.com/pub/a/2001/08/08/xmldsig.html
  • Shirey, Robert. "Internet Security Glossary".
  • Digital Signature Guidelines, American Bar Association. www.abanet.org/scitech/ec/isc/dsgfree.html
  • Freed et al. (November 1996) "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies, Part Two: Media Types". www.rfc-editor.org/rfc/rfc2045.txt, www.rfc-editor.org/rfc/rfc2046.txt.
  • Levinson, E. (August 1998) "The MIME Multipart/Related Content-type". www.rfc-editor.org/rfc/rfc2387.txt
  • Box, D. et al. W3C-Draft. Simple Object Access Protocol (SOAP) v1.1, Box D. et. al., W3C Note 08 May 2000, www.w3.org/TR/2000/NOTE-SOAP-20000508/
  • Barton, J. et al. "SOAP Messages with Attachments". Oct 9, 2000. www.w3.org/TR/2000/NOTE-SOAP-attachments-20001211
  • More Stories By Sanjay Dalal

    Sanjay Dalal is a staff software engineer at BEA Systems, Inc. He is one of the architects of WebLogic Integration, responsible for the Trading Partner integration. Sanjay has worked on vaious business protocols, security, transactions and recovery, clustering, and trading partner management. He is also a co-author of the Business Transaction Protocol and participates in the development of the Web Services Coordination and Atomic Transaction Protocols.

    Comments (0)

    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.


    IoT & Smart Cities Stories
    Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
    René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
    Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
    Whenever a new technology hits the high points of hype, everyone starts talking about it like it will solve all their business problems. Blockchain is one of those technologies. According to Gartner's latest report on the hype cycle of emerging technologies, blockchain has just passed the peak of their hype cycle curve. If you read the news articles about it, one would think it has taken over the technology world. No disruptive technology is without its challenges and potential impediments t...
    If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
    Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of San...
    When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...