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.

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

    actor='urn:oasis:names:tc:ebxml-msg:actor:nextMSH'] |

  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.


  • 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.
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.


  • 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
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    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...
    The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
    CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
    DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
    Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
    The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
    SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
    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...