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
    The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
    There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
    Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
    At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
    Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
    BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.
    The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, compared the Jevons Paradox to modern-day enterprise IT, examin...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
    DSR is a supplier of project management, consultancy services and IT solutions that increase effectiveness of a company's operations in the production sector. The company combines in-depth knowledge of international companies with expert knowledge utilising IT tools that support manufacturing and distribution processes. DSR ensures optimization and integration of internal processes which is necessary for companies to grow rapidly. The rapid growth is possible thanks, to specialized services an...
    At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...