User Tools

Site Tools


openas2

OpenAS2

A W&G project about installing and using OpenAS2 server.

https://github.com/OpenAS2/OpenAs2App

OpenAS2 is a java-based implementation of the EDIINT AS2 standard. It is intended to be used as a server.

In short

Configuration files (in C:\OpenAS2\config):

  • config.xml
    • most configuration parameters will be set here
  • partnership.xml
    • partners and partnerships
  • as2_certs.p12
    • keystore for all certificates
  • commands.xml
    • configurates all supported commands (this file should NOT be modified)

To configure sending data it is necessary :

  • partnerships.xml
    • add a new partner tag
    • add a new partnership tag
    • import the as2 certificate into the keystore which is used by OpenAS2 (normally as2_certs.p12)
      • make sure that the certificate name is the same as the value of the attribute x509_alias of the partner tag

Example configuration:

    <partner name="PartnerC"
             as2_id="PartnerC_OID"
             x509_alias="partnerc"
             email="as2msgs@partnerc.com"/>
...
    <partnership name="MyCompany-to-PartnerC">
        <sender name="MyCompany"/>
        <receiver name="PartnerC"/>
        <pollerConfig enabled="true"/>
        <attribute name="protocol" value="as2"/>
        <attribute name="content_transfer_encoding" value="binary"/>
        <attribute name="subject" value="File $attributes.filename$ sent from $sender.name$ to $receiver.name$"/>
        <attribute name="as2_url" value="http://localhost:10080"/>
        <attribute name="as2_mdn_to" value="edi@myCompany.com"/>
        <attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, $attribute.sign$"/>

        <attribute name="encrypt" value="3DES"/>
<!--        <attribute name="sign" value="SHA256"/>-->
        <attribute name="sign" value="SHA1"/>
        <attribute name="resend_max_retries" value="3"/>
        <attribute name="prevent_canonicalization_for_mic" value="false"/>
        <attribute name="rename_digest_to_old_name" value="false"/>
        <attribute name="remove_cms_algorithm_protection_attrib" value="false"/>
    </partnership>

Sending:

  • put a file into a specific folder
    • for “PartnerA” → C:\OpenAS2\data\outbox\PartnerA_OID
      • configured in config.xml:
        • <pollerConfigBase classname=“org.openas2.processor.receiver.AS2DirectoryPollingModule” outboxdir=“$properties.storageBaseDir$/outbox/$partnership.receiver.as2_id$”

Received MDN will be written into the folder defined in config.xml by property module.MDNFileModule.filename

  • Like: module.MDNFileModule.filename=“module.MDNFileModule.filename=“$properties.storageBaseDir$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$/mdn/$date.yyyy-MM-dd$/$mdn.msg.headers.message-id$”
  • For example:
    • C:\OpenAS2\data\MyCompany_OID-PartnerC_OID\mdn\2023-03-02\20230302115027+0100-559-MyCompany_OID_PartnerC_OID_testFile.txt
openas2.txt · Last modified: by kalaschnikow