You are on page 1of 32

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Caveat This document may be subject to subsequent revisions and updates in order to integrate new international technical specifications

or to respond to new business requirements expressed by members of the EDIINT community. Furthermore, it is the intention of GS1 Europe Member Organisations to produce, in cooperation with GS1, an international version of this user guide. Please contact your local GS1 Member Organisation for the latest updates. Version: 2005-10-06 Status: For Approval

EDIINT AS1 and EDIINT AS2 User Guide

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

Table of Contents
EDIINT AS1 and EDIINT AS2 .................................................................................................................................. 1 User Guide.................................................................................................................................................................... 1 Table of Contents......................................................................................................................................................... 2 Acknowledgements ...................................................................................................................................................... 3 Introduction ................................................................................................................................................................. 4 Document Objectives....................................................................................................................................... 4 Intended Audience ........................................................................................................................................... 4 Scope ............................................................................................................................................................... 4 What is EDIINT?......................................................................................................................................................... 5 Advantages of EDIINT .................................................................................................................................... 5 Basic Functions of EDIINT ............................................................................................................................. 5 Implementing EDIINT ................................................................................................................................................ 7 Implementing AS2 Protocols ........................................................................................................................... 7 Architecture and Firewalls for AS2................................................................................................................. 7 Implementing AS1 Protocols ......................................................................................................................... 10 Architecture and Firewalls for AS1............................................................................................................... 10 Security using Digital Certificates............................................................................................................................ 11 Legal Aspects................................................................................................................................................. 11 Types of Certificates...................................................................................................................................... 11 Self-Signed or Trusted ................................................................................................................................... 12 Trusted Certificate Overview ........................................................................................................................ 12 Operation of Certificates - Issuing, Validating, Exchanging, Storing and Renewing of Certificates ........... 13 Digital Signature Algorithms ........................................................................................................................ 14 Algorithms for encryption of data ................................................................................................................. 14 Transport Layer Details................................................................................................................................. 14 AS2 Transport Layer Protocols (HTTP and HTTPS).................................................................................... 14 AS1 Transport Layer Protocols (SMTP) ....................................................................................................... 15 Internet Connection....................................................................................................................................... 15 Timestamp ..................................................................................................................................................... 15 Messaging Layer Details ............................................................................................................................... 16 Header Information....................................................................................................................................... 16 Message Disposition Notification (Acknowledgement) ................................................................................. 17 Formats ......................................................................................................................................................... 17 MIME.............................................................................................................................................. 17 S/MIME .......................................................................................................................................... 18 Compression (AS2 Only) ............................................................................................................................... 18 GS1 Europe EDIINT Forum Recommendations .................................................................................................... 19 Security using Digital Certificates ................................................................................................................ 19 Transport Layer Protocols ............................................................................................................................ 20 AS2 Header Information (AS2) ..................................................................................................................... 20 Message Disposition Notification (AS1+AS2) .............................................................................................. 20 Timestamp ..................................................................................................................................................... 21 Formats ......................................................................................................................................................... 21 Compression.................................................................................................................................................. 21 AS2 Version (AS2) ......................................................................................................................................... 21 Basic EDIINT Implementation Checklist ................................................................................................................ 22 Appendix 1. Examples ............................................................................................................................................... 23 AS2 ................................................................................................................................................................ 23 AS1 ................................................................................................................................................................ 23 Appendix 2, References ............................................................................................................................................. 24 Appendix 3, Summary of Recommendations .......................................................................................................... 25 Appendix 4. Glossary ................................................................................................................................................ 27 Appendix 5. AS1/AS2 Process Flow ......................................................................................................................... 30

86 87 88 89 90

Acknowledgements
This document was prepared by the GS1 Europe EDIINT Forum, a network of Western European MOs of GS1. The Chairman of the Working Group would like to acknowledge and thank the members for their participation and assistance in the development of this document. Mr. Anders Grangrd Mr. Brendan Kernan Mr. Christian Przybilla Mr. Stef Spaan Mr. Jeremy Morton Mr. Gerd Marlovits Mr. Rainer Gempp Mr. Vijay Pindoria Mr. Pere Rosell Mr. Joo Picoito France Ireland Germany Netherlands Sweden Austria Switzerland UK Spain Portugal

91 92 93 The Chairman would also like to thank the following persons for their valuable contribution. Mr. John Duker Mr. Gerard Beerepoot Mr. Rienk v.d. Ploeg Mr. Holger Lubnau Procter & Gamble Albert Heijn InterCommIT Metro

94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

Introduction
One of the main tasks of GS1 is to standardise and harmonise the use of business related information exchanges using electronic messages. This project was initiated in April 2004 to prepare guidelines for the adoption and use of the EDIINT protocols specified by the organisation IETF (Internet Engineering Task Force). These secure Internet protocols allow for the exchange of information between commercial partners independent of the type of exchange format (EANCOM, XML, etc.) An earlier project undertaken by GENCOD EAN France AS2 Working Group concluded that the IETF specifications are not detailed enough to guarantee interoperability amongst the systems involved. There is an apparent risk that implementations based only on the raw AS1 and AS2 specifications may result in heterogeneous implementations resulting in poor interoperability across the user community. The Gencod EAN France AS2 Working Group consequently supported the idea of creating a common profile for the user community that guarantees interoperability. This is seen as a prerequisite to increasing the use of electronic messaging throughout the supply chain. Document Objectives This document aims to provide both a functional overview and a technical framework for the implementation of the EDIINT protocols. It is based on the work and conclusions of the GS1 Europe EDIINT Forum managed by GS1 France, which was set up to harmonise the implementation of this standard. The document is based on best practices and experiences provided during the group meetings. Intended Audience The user guide is intended for the GS1 user community in Europe, regardless of industry sector. It is targeted at all professional users requiring support in the application of the AS1 or AS2 protocols. Scope This user guide provides a harmonised profile of the AS1/AS2 protocol. In no way does it intend to substitute or override the AS1/AS2 specification released by IETF or the work undertaken by GENCOD EAN France. Their recommendations are inherited in this document but, where needed are clarified in more detail. AS1/AS2 profiles from other user communities and countries have also been included in the discussions leading to the publication of this document. Furthermore, the group has provided for the recommended use for optional functions and for functions requiring bilateral agreement.

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171

What is EDIINT?
The EDIINT project was initiated by IETF to define a protocol to enable Electronic Data Interchange (EDI) over the Internet whilst maintaining a service level equivalent to that found in the existing EDI exchanges over Value Added Networks (VAN). The objective was to profit from the advantages of Internet technologies without any negative impact on the installed EDI user base. The VANs ensure the confidentiality, integrity and non-repudiation of the exchanged information as well as the authentication of the partners. Multiple technologies providing these functions for the Internet existed already and the approach of the EDIINT project was to evaluate these and to provide an integrated solution for the user community. The EDIINT protocols define an envelope for information to be transmitted over the Internet (or TCP-IP based networks) using HTTP, which is the foundation for the World Wide Web (WWW), SMTP, which is the common Internet mail protocol or FTP, File Transfer Protocol. Advantages of EDIINT Business to Business (B2B) electronic trading demands at least the following: Commonly agreed messaging formats (currently EANCOM and XML) A common network, in this case the Internet Secure delivery of documents to their intended recipient Secure transmission of documents, ensuring that the information cannot be read during transport on the network Non-repudiation, i.e. that the sender/receiver of information cannot deny having sent/received a document The exact status of a document, i.e. to be able to detect alteration of its contents

Ideally, a B2B system also offers: Management of the collaboration between trading partners, to control the information process and to control the type of information that can be exchanged between different types of partners Software to convert information to a format acceptable for the receiver Telecommunications services, from traditional EDI over private networks to value added services on the Internet.

The majority of these technical issues, e.g. formats and non-repudiation, have been addressed through the development of standards such as UN/EDIFACT, EANCOM, ANSI X12 and, more recently, B2B XML applications such as EAN.UCC, cXML and OAG. Basic Functions of EDIINT Rather than creating new solutions, EDIINT uses existing standards to ensure reliable and secure exchanges. For example, the use of electronic certificates guarantees that the documents are delivered only to the intended receiver, that the transmission is secure and that the identity of the sender is authentic. The EDIINT standard allows for the use of some of the most advanced algorithms for encryption and electronic signatures available.

172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213

On the other hand, EDIINT does not specifically cover the problem of attacks against private and public networks. System security relies on the use of routers and firewalls isolating the servers and monitoring hostile traffic. In order to guarantee that a document has not been altered during the exchange it is necessary to be able to trace the exchange on different levels. Three of these levels are normally covered by all exchange standards: Communication response confirms that the file has been correctly received by the communication protocol, e.g., the expected 256 bytes were received Functional response confirms that a valid message has been received by an electronic commerce application, e.g., the EDI envelope was opened and the contents of the document were correctly structured; and Business level response confirms that the content of message is structured in accordance to the agreed business process, e.g., the received purchase order contains all the agreed components.

The EDIINT standard adds an additional level for tracing an exchange called the Message Disposition Notification or MDN. Since EDIINT encapsulates the message in an envelope for transmission, it is necessary to know if the message arrived correctly at the receivers server. The EDIINT envelope may in turn contain another envelope (for example ANSI or EDI) containing the actual document. EDIINT compliant software generally manages the opening of the envelope and sending the MDN.

Sender
Internet
ERP EDI AS2

Receiver

AS2

EDI

ERP

Private Key

Public Key

Public Key

Private Key

Both partners must have an AS1 or AS2 software. They must also exchange their public keys to apply digital signature and encryption.

Figure 1 AS1/AS2 Process Flow

214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253

Implementing EDIINT
All electronic message interchanges require a sender and a receiver. The receivers communication server listens for messages on the Internet that are addressed to him. The always on interchange process is similar to a telephone with an answering machine. The attached answering machine listens for the call. However, if machine is switched off the recipient can miss the message (AS2) or experience a delay (AS1). EDIINT is designed to handle any type of document but in practice it is primarily adopted for the type of transactions normally linked to EDI and XML exchanges. There are nevertheless, two important differences between X.400 (the European standard for transmission of data over a public network, defined by UIT-T) and EDIINT: EDIINT only functions on TCP-IP based networks For AS2, the receiving application must be connected to the Internet at the moment when the document is sent.

Establishing an EDIINT solution requires that certain technical and functional requirements are implemented. However within in these requirements there are a number of optional components which need to be harmonised. This guide explains these options and gives the recommendations agreed by the GS1 Europe EDIINT Forum, in consultation with retailers, suppliers and service providers. Implementing AS2 Protocols AS2 requires that a number of technical issues be addressed. These are Architecture and firewalls Security using digital certificates (number, type, class and validity, signature algorithms and encryption algorithms Transport layer protocols (HTTP and HTTPS) Internet connections (type and addressing) AS2 header information (to/from addressing) Message Disposition Notification (signed or unsigned; synchronous or asynchronous) Time stamping Formats (MIME, S/MIME and compression) AS2 versions Ports inbound/outbound

Architecture and Firewalls for AS2 Using the Internet for the exchange of business related information presents potential security risks that are not resolved by EDIINT. The most commonly used technique to avoid or minimise these types of attacks is the use of firewalls that listen in for incoming transactions and filter attacks according to predefined rules. Different approaches are possible to configure the firewalls:

254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274

Placing the EDIINT server in a local area network (LAN) adjacent to other company servers. The servers are separated from the Internet using a hardware firewall, without the use of a reverse proxy. Although this configuration is not recommended, it may be the choice of small companies. A better configuration can be found in the second figure in which a Demilitarized Zone (DMZ) is created. Incoming connections originating from the Internet are processed in this network segment separated from the other company servers. The servers in the DMZ do not contain sensitive business information, like EDI files for a long time. Instead, the information will be transported to the LAN for further processing. The network can be secured even further by the use of a reverse proxy on which all incoming connections originating from the Internet are terminated. Although this configuration is very secure, it can sometimes cause problems, for instance if HTTPS with client authentication is used, or in combination with synchronous MDNs. In addition, IP- and port-filtering can be done at the firewall by restricting access to the EDIINT software allowing only incoming connections from well known ip addresses belonging to companies trading partners.

275 276 277

Figure 2 -- Architecture without DMZ

278 279

Figure 3 -- Architecture with DMZ

280 281

Figure 4 -- Architecture with DMZ and reverse proxy

282 283 284 285 286 287 288 289 290 291 292 293 Implementing AS1 Protocols AS1 requires that a number of technical issues be addressed. These are Architecture and firewalls Security using digital certificates (number, type, class and validity, signature algorithms and encryption algorithms Internet connections (type and addressing) Message Disposition Notification (signed or unsigned;;) Time stamping Formats (MIME, S/MIME)

Architecture and Firewalls for AS1 A normal Mail Security Architecture is required for AS1.

294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334

Security using Digital Certificates


Digital Certificates can either be generated by the company or person that will use them, a self-signed certificate or one issued by a Certification Authority (CA), trusted certificate. The CA manages the certificates on behalf of the requestor. Using self-signed certificates simplifies the initial management of certificates and keys. However, the level of security is less because no neutral organisation is managing the system and controlling the origin of the certificate. If a self-signed certificate is used the expiration date is bilaterally defined and monitored. When using a Certification Authority (CA) the companies use a trusted third party. The CA manages the Certificates and may revoke a certificate before it expires if its usage is no longer deemed unique or secured. The CA signals the risk associated with the certificate and proposes that the holder changes it. This can, of course, also be initiated by the key holder itself. The certificates delivered by the CA contain an expiry date that obliges the companies to regularly verify the identity of its partners, thereby increasing the level of security. Apart from the administration of the certificates, the CA also guarantees that the holder of the certificate is truly who he claims he is. The CA provides these services for a fee. Regardless of which of these options is chosen, it is imperative not to lose access to the private key, e.g. by forgetting the password. In most cases neither a CA nor a system generating self-signed certificates can recover a lost private key. If a private key is lost, it is necessary to generate a new certificate and distribute it to all trading partners. Legal Aspects The digital certificate is the digital identity of the signatory. It is a key element in the security set up since it is by associating the certificate and the technical devices, such as a smart card or a software module, that the receiver of a signed document can accept the transaction with full confidence. Consequently the distribution and control of class 2 and 3 digital certificates is an elaborate process, although most of the procedures are common sense. It has to be attributed to a person whose identity, in their professional capacity, has been verified. It has to be rapidly revocable in case of fraud (similar to a bank card) and the receiver of the document must be able to verify it in real time. Types of Certificates Confidence in certificates relies on the precise knowledge of the sending partners identity. There are typically three classes, or levels or confidence, of certificate: Class 1: the certificate is issued when the existence of an email mail-box has been verified Class 2: the certificate is issued after a company search and the receipt of administrative documentation (identity card of responsible person and official registration data of the company e.g., K-BIS in France) Class 3: the certificate is issued after a face-to-face verification has been carried out by a trusted third party and compliance with the Class 2 requirements

335 336 337 338 339 340 341 342

Self-Signed or Trusted Self-signed may be generated by integrated EDIINT tools. It should be noted that a selfsigned certificate is not connected to a trusted third party. Therefore there is no independent verification of identity. Trusted Certificate Overview The responsibilities and structure of Trusted Certificate Management are described below.
Keyholder KH Role Requests a certificate Registration Authority RA Certificate Authority CA Defining the verification rules. Auditing the Registration Authority Certificate Operator CO Creating the certificate Store and distribute the certificates Maintaining a list of revoked certificates. (Certificate Revocation List, CRL)

Intermediate party between the keyCreates the two keys holder, Certificate Authority and the (private/public) Certificate Operator Verifies the users request and transmits it to Certificate Operator (Certification Signing Request, CSR) Authorises or denies the creation of the certificate May request the Passes revocation revocation of a request on to the certificate (demand is Certificate Operator passed on to the RA) Requests renewal of the certificate As requested Good business practice The verification level depends on the security policy being applied. GS1 France

Revoke the certificate under the responsibility of the CA As requested Legal liability Subcontractor of the CA

Responsibility Constraints

Who (examples) Auchan, Carrefour, Systme U, Casino

GS1 France

Keynectis

343

Key Holder

demands

Registration Authority

distributes

approves

Certificate Operator orders

Certification Authority

344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368

Figure 5 -- The PKI loop

The dual-key is a pair of keys composed of a private key, which has to be securely stored and secret, and a public key. The combination of these public and private keys is necessary when using encryption services based on asymmetric algorithms. The certificate confirms that the public key belongs to the identified (person or company). It is provided by a trusted third party, the CA. When signing the certificate, the link between the certificate and the dual-key is validated. Operation of Certificates - Issuing, Validating, Exchanging, Storing and Renewing of Certificates The private key, used to compose the certificate is not exchanged, and is not included in the certificate. The private key must be stored in a secure manner and the access by the key-holder must be unambiguously guaranteed. Further, the participants must address the following questions and have a mutual understanding of the requirements and of the functional and technical constraints between the business partners and service providers. These are: the synchronisation of the list of certificates authorities in the tools establishment and maintenance CA certificate hierarchies the definition and maintenance of the list of revocation.

Operationally, the CA indicates the need for a renewal of the certificate based on the validity period. The responsibility for actual renewal lies with the key-holder. Regardless, a list of business partners with whom valid trusted certificates have been exchanged SHOULD be kept up-to-date.

369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411

Digital Signature Algorithms EDIINT offers several options for electronic signatures: no signature, MD5 or SHA-1. When a document is electronically signed its integrity and the security of the contained information is re-enforced. The electronic signature makes it possible to prove that the sender of the message is really who he claims to be. MD5 (Message Digest version 5), published in April 1993, is a hash algorithm developed by Professor R. L. Rivest at MIT. Based on variable length documents, it creates a digest 128 bits long. The fact that there is a loss of information makes it impossible to restore the original message based on the digest. Further, MD5 has a low collision factor, i.e. it is extremely unlikely that an identical digest will be created for two different documents. This algorithm is widely used for digital signatures, particularly in conjunction with RSA. SHA1 (Secure Hash Algorithm version 1) was developed by NIST. The current version was released in April 1995. It has the same characteristics as MD5, except that is creates a digest of 160 bits. It is more recent and more secure than MD5. Algorithms for encryption of data EDIINT allows the encryption of data but nowhere obliges its use. Three Encryption algorithms are supported. Two of these, 3DES and RC2 128, employ 168 bits keys and offer an optimum level of security. EDIINT also allows the use of the RC2 40 algorithm. AES is another algorithm that can be used. It is essential that the software used by the receiving partner can support the employed algorithm in the sent message. It is therefore necessary to agree the type of algorithms supported beforehand.

Transport Layer Details


AS2 Transport Layer Protocols (HTTP and HTTPS) Hyper Text Transfer Protocol, HTTP was initially designed to be used for transporting HTML pages on the Internet. The access to these Web related services is done by using an address of the type http://domain name [/directory]. Secure Hypertext Transfer Protocol, HTTPS, is a secured version of HTTP and enables the AS2 header to be secured. HTTPS encrypts and decrypts the pages queried by the user as well as pages forwarded by the Web servers. HTTPS adds a Secure Socket Layer, SSL, as an additional layer to regular HTTP. HTTPS normally uses port 443 instead of port 80, which is dedicated to HTTP, to interact with the lower layers of TCP/IP. For example, when generating an electronic order the address of the web form may start with https://. When validating the form, the navigators HTTPS layer encrypts it. The acknowledgement received from the recipient server is also transmitted in a secured form, and arrives to the client via an address of type https:// and is decrypted by the https layer of the navigator. If digital certificates are already being used for encrypting and signing the message, HTTPS is normally not needed. Firstly, the encryption layer does not add significant security. Secondly, it makes the transmission process heavier. HTTPS may be used if the original contents are not encrypted and there is a recommendation to all contents must be encrypted using digital certificates.

412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453

Note: HTTPS and SSL may integrate the use of X.509 digital certificates for the server, in order to authenticate the sender. SSL is an open, non-proprietary protocol offered by Netscape to W3C (World Wide Web Consortium) for standardisation. HTTPS should not be confused with SHTTP, a secured version of HTTP developed and proposed as a standard by EIT (Enterprise Integration Technologies). AS1 Transport Layer Protocols (SMTP) The Simple Mail Transfer Protocol, SMTP, is used as the common mechanism for transporting electronic mail among different hosts. Under SMTP, a user SMTP process opens a TCP connection to a server SMTP process on a remote host and attempts to send mail across the connection. The server SMTP listens for a TCP connection on a well-known port (25), and the user SMTP process initiates a connection on that port. When the TCP connection is successful, the two processes execute a simple request/response dialogue, defined by the SMTP protocol, in which the user process transmits the mail addresses of the originator and the recipient(s) for a message. When the server process accepts these mail addresses, the user process transmits the message. The message must contain a message header and message text formatted in accordance with RFC 822. Internet Connection EDIINT requires the use of TCP-IP and typically the Internet network for the transmission of messages between trading partners. The basis of AS2 is that the network is always listening for a message destined for a recipient. Therefore a permanent connection is required. The addressing is based on the fully qualified domain name (URI) and, for firewall configuration, the published IP addresses. AS1 uses SMTP (e-mail) as the transport layer. Addressing and outer security are handled by the mail servers at each end of the link. Depending on server configuration, some down-time can be tolerated without loss of data. Timestamp A timestamp defines the exact time when a computer related event has taken place. By using tools such as NTP (Network Time Protocol), a computer is capable of using the precise current time. This precision enables interconnected computer and network applications to communicate efficiently. The timestamp mechanism is used when a set of multiple applications requires the exchange to be strictly synchronised. For example, it may act as a mechanism that ensures the order processing sequence where there is a transaction with multiple sequential events. If the sequence fails, the transaction can be cancelled. Another application is the registration of timestamps in particular temporary functions. For IP telephony, for example, RTP (Real-time Transport Protocol) assigns sequential timestamps to each voice package, allowing the receiving application use them as a memory stamp, to reassemble and to delivery them in the correct order without errors. For applications where timing has contractual implications, it is possible to acquire a trusted timestamp from a service provider.

454 455 456 457 458 459 460 461 462

Messaging Layer Details


Header Information The Header constitutes the part of the EDIINT package that precedes the data transmitted. The header contains all basic information necessary handling of messages, i.e., information regarding the sender, the receiver and instructions for the treatment of errors. The body part of the message resides between the header and the message signature. The picture below describes the different headers relatives to the transport layer (encapsulation of envelopes).

HTTP(s) To be revised or AS2 deleted Envelope

Transport

SMTP To be revised AS1 or deleted Envelope

Transport

Envelope EANCOM or XML Messages Payload

Envelope EANCOM or XML Messages Payload

463 464 465 466 467 468 469 470 471 472 Data element AS2TO

Figure 6 -- EDIINT structures

For the complete list of data elements in the headers, see the international specification available from IETF. According to the IETF AS2 recommendation, the uniqueness of the prefix id-right may be ensured, for example, by the domain name of the sender. The terms AS2From / AS2To contain values enabling the unambiguous identification of the entities exchanging messages. The key identification of the entity corresponds to a unique identification within the AS2 community. Definition This data element contains a text string identifying the receiver of the exchanged information. This data element contains a text string identifying the sender of the exchanged

AS2FROM

information. 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 Formats MIME MIME (Multipurpose Internet Mail Extensions) is a format created to transfer non-textual data via e-mail, such as pictures and binary files. The MIME type constitutes a classification of the type files that can be transmitted over the Internet using MIME. According to the EDIINT specification, the following file types must be catered for: Content-Type: application/EDI-X12 Content-Type: application/EDIFACT Content-Type: application/edi-consent Content-Type: application/XML For AS1 there are no specific To/From identification fields since the From and To refer to e-mail addresses Message Disposition Notification (Acknowledgement) There are five potential ways to use the MDN (Message Disposition Notification), The IETF specifications allow the use of the following: No receipt: This minimal option precludes transmission verification and does hence not support non-repudiation. Simple synchronous receipt: (AS2 only) The MDN is returned in the same communication session to signal that a message has been received but it is not signed by the receiver. Signed synchronous receipt: (AS2 only) The MDN is returned in the same communication session and is signed. This option provides the strongest level of verification. Firstly, it confirms that the message has been received and secondly that the receiver is the intended recipient through the latters use of the private key. Simple asynchronous receipt: The MDN is returned in a separate communication session to signal that a message has been received but it is not signed by the receiver. Signed asynchronous receipt: the MDN is returned in a separate communication session and signed.

The type of MDN expected is defined in the associated sent message and is therefore determined by the sender. However, without prior agreement between the sender and receiver there is no guarantee that the receiving system is capable of responding to type of MDN being requested. Therefore, the type of MDN has to be agreed between the partners before engaging in EDIINT exchanges.

Also the type text/plain is accepted as well as all MIME types related to binary files.

513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530

The type used must be coherent with the contents it is qualifying. The relative vagueness of the international specifications with regards to the content-type has underlined a number of questions. In particular, its definition and how it is being implemented in the protocol software. The conclusion reached is that the recipient MUST be capable of importing any content type being transmitted. In practical terms this means any content type that may be transmitted using the Internet/AS2 solution. S/MIME S/MIME is an integral part of the EDIINT recommendation issued by IETF. S/MIME is a format and protocol used for signed and/or encrypted services for MIME messages sent over the Internet. Compression (AS2 Only) Compression reduces the size of a file or a group of files. This saves storage space and reduces the time and cost of transmission. The IETF workgroup within EDIINT states that EDIINT compression implementations SHOULD support ZLIB [RFC1950]. ZLIB is a compression algorithm that is open, non-proprietary and compatible with virtually all operating systems. As it is written in a high level language it is software independent.

531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573

GS1 Europe EDIINT Forum Recommendations


The acronym PAIN may serve as a good introduction to the security concerns being addressed by the GS1 Europe EDIINT Forum in the development of this guideline. P A I N Privacy - only the sender and receiver can access the document. Authentication - guarantees that the sender is who he claims to be. Integrity - the contents of the document cannot be altered. Non-repudiation - ensures that the communication of documents cannot be denied after transmission.

The team has considered these objectives in view of the technical solutions currently available. Based on these considerations it was agreed that the following points would be supported: The document can only be accessed the Sender and Receiver. Encryption of the document ensures this privacy; The senders is identification is guaranteed. The senders Digital Signature ensures its authentication; The document cannot be modified or changed. If the contents have been tampered with, the Receiver will automatically be notified. The senders Digital Signature ensures this integrity; and Non-repudiation (NR) of Origin and Receipt. NR of Origin the Sender cannot deny that it sent the document and NR of Receipt - the Receiver cannot deny the reception of the document. The first is ensured with a Digital Signature and the latter by the receivers signed Message Disposition Notification.

Security using Digital Certificates Recommendation 1 (AS1+AS2) The best practice is to use two digital certificates - one for signature and one for encryption. A single certificate may be used as a minimum. Recommendation 2 (AS1+AS2) The best practice is to use a Class 2 type certificates issued by a trusted third party A self signed certificate may be used where it has been bilaterally agreed between the trading partners. Class 1 type certificates are not applicable for use in a production environment. Class 3 type certificates may be required in certain environment, e.g. by legal environment. It is not recommended that companies act as Certification Authority for their trading partners. Recommendation 3 (AS1+AS2) The following recommendations pertain to the operation of Certificates. The minimum validity period for a certificate should be 2 years. The maximum validity period for a certificate should be 5 years. This guide makes no recommendation on how the certificates should be exchanged. This must be bilaterally agreed. Note: Once the Certificate Exchange Messaging for EDIINT specification from IETF is available, this will be recommended. The private key is stored by the key-holder (who is legally responsible).

574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610

The renewal of certificates, managed by Certificate Authority, is carried out in practice by the key-holder

Recommendation 4 (AS1+AS2) SHA1 is mandatory algorithm for digital signatures. Recommendation 5 (AS1+AS2) 3DES is the mandatory algorithm for encryption. Recommendation 6 (AS1+AS2) The length of the session key must be 128 bits or greater and the length of the public/private key (X509) must be 1024 bits or greater.

Transport Layer Protocols Recommendation 8 For EDIINT AS2, the transport protocol HTTP should be used. However, if there is a need to secure the AS2 To and the AS2 From addresses and other header information, HTTPS may be used. For EDIINT AS1 the transport protocol SMTP shall be used. It is also required to have a dedicated e-mail address for message routing. Recommendation 9 (AS2) The Internet connection is a permanent connection using a fully qualified domain name and, for firewall configuration, the published IP address. AS2 Header Information (AS2) Recommendation 10 The AS2 - From address must be the GLN of the sending server or the company or organisation responsible for the server. When a hub is used, the GLN of the trading partner may be used when the AS-2 TO field is used for routing. Recommendation 11 The AS2-To address must be the GLN of the receiving server or the company or organisation responsible for the server. When a hub is used, the GLN of the trading partner may be used when the AS-2 TO field is used for routing. Message Disposition Notification (AS1+AS2) Recommendation 12 A signed MDN is mandatory as this is the pivotal technique to guarantee the receipt of data and the non-repudiation of the message. The MDN is not encrypted. Recommendation 13 For EDIINT AS2, Asynchronous MDN is recommended. For EDIINT AS1, MDN is always asynchronous upon reception of the message.

611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630

Timestamp Recommendation 14 (AS1+AS2) The use of a third party time stamp is optional. Formats Recommendation 15 (AS1+AS2) The MIME type must be coherent with the content of the message. Recommendation 16 (AS1+AS2) S/MIME is mandatory. Compression Recommendation 17 (AS2) It is accepted that compression may be used as an option. This is bilaterally agreed between the sender and the receiver AS2 Version (AS2) Recommendation 18 The version of AS2 used is 1.1 Recommendation 19 Port Inbound/Outbound To distinguish AS2 traffic from other flows using the same protocol, it is recommended to use port 4080 for HTTP and 5443 for HTTPS.

631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650

Basic EDIINT Implementation Checklist


Each partner must: 1. Decide if the EDIINT solution should reside behind a firewall or in a demilitarised zone, isolated from the other internal systems. 2. Install the EDIINT software. 3. Obtain a digital certificate (public / private key) from a trusted third party. 4. Agree on transport protocol. 5. Agree on message reception policy. 6. Choose encryption algorithm. 7. Choose signature algorithm. 8. Configure the EDIINT software. The following information must be detailed: URL or e-mail address dedicated for the transmission of documents identification of the partner the method for digital signature the method for encryption the method for reception use of compression 9. Upload the partners certificate (public key) in the EDIINT software 10. Send a test document to control the configurations sending and receiving systems.

651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681

Appendix 1. Examples
AS2 user-agent: xxxxx/xx Method: POST message-id: <xxx.xxx.xxx@station_xxx> accept: */* as2-to: 3027000002022 subject: test.txt disposition-notification-to: <xxx> content-transfer-encoding: base64 URI: /b2bhttpdev/inbound/as2test as2-from: 3027000002008 content-length: 3866 content-disposition: attachment; filename=smime.p7m Protocol: HTTP/1.1 host: xxx.xxx.xxx.xxx disposition-notification-options: signed-receiptprotocol=required, pkcs7-signature; signed-receiptmicalg=required, sha1, md5 content-type: application/pkcs7-mime; smime-type=enveloped-data; name="smime.p7" mime-version: 1.0 date: Fri, 31 Oct 2003 14:47:20 +0100 MIIK9QYJKoZIhvcNAQcDoIIK5jCCCuICAQAxggEaMIIBFgIBADB/MGsxCzAJBgNV BAYTAkZSMRMwEQYDVQQKEwpDZXJ0aU5vbWlzMSkwJwYDVQQLEyBBQyBJbnRlcm1l ZGlhaXJlIC0gU3Vic2lkaWFyeSBDQTEcMBoGA1UEAxMTQ2VydGlOb21pcyBDbGFz c2UgMgIQMDAwMTA2NzU5MTAxNzc1MDANBgkqhkiG9w0BAQEFAASBgFAQfRcQdZVJ []==

AS1 tbd

682 683 684

Appendix 2, References
The following documents were referenced in the preparation of this document. RFC description RFC 2616 - Hyper Text Transfer Protocol RFC 822 - ARPA Internet Text Message Standard RFC 1767 - EDI Content Type RFC 2376 - XML Media Types RFC 1847 - Security Multiparts for MIME RFC 1892 - Multipart/Report URL address http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2045.txt http://www.ietf.org/rfc/rfc2045.txt

RFC 2045 - MIME Part 1: Format of Internet Message http://www.ietf.org/rfc/rfc2045.txt Bodies RFC 2046 - MIME Part 2: Media Types RFC 2049 - MIME Part 5: Conformance Criteria and Examples RFC 2633 S/MIME Version 3 Message Format RFC 2630 - Cryptographic Message Syntax RFC 2298 - Message Disposition Notification 685 686 687 688 689 690 691 692 The AS2 specification, can be downloaded from: http://www.ietf.org/rfc/rfc3335.txt?number=3335 The basic technical document used by the GS1 Europe EDIINT Forum, published by IETF as the AS2 specification, can be downloaded from the following address: http://www.ietf.org/internet-drafts/draft-ietf-ediint-as2-16.txt http://www.ietf.org/rfc/rfc2046.txt http://www.ietf.org/rfc/rfc2049.txt http://www.ietf.org/rfc/rfc2633.txt http://www.ietf.org/rfc/rfc2630.txt http://www.ietf.org/rfc/rfc2045.txt

693 694 695

Appendix 3, Summary of Recommendations


The following annexe summarises the EDIINT parameters and the recommendations.
Parameters Security AS2 RECOMMENDATION Two is best practice. A single certificate may also be used. Certificates - Best practice, scalable Class 2 type - trusted - minimum validity period 2 years, max. 5 years - Self signed bilaterally agreed. Trading partner acting as CA not recommended. Digital signature Encryption Length of session key Length of public/private key (X509) Transport layer Transport Protocol SHA1 Yes, 3DES 128 bits 1024 bits AS1 RECOMMENDATION Two is best practice. A single certificate may also be used. - Best practice, scalable Class 2 type - trusted - minimum validity period 2 years, max. 5 years - Self signed bilaterally agreed. Trading partner acting as CA not recommended. SHA1 Yes, 3DES 128 bits 1024 bits

HTTP (HTTPS may be used to secure AS2-To and AS2From) - permanent internet connection - Fully qualified domain name (URI) and, for firewall configuration, Published IP address GLN of the trading partner's AS2 server MUST be used. Exception: when a hub is used, the GLN of the trading partner MAY be used when the AS2-TO field is used for routing. GLN of the trading partner's AS2 server MUST be used. Exception: when a hub is used, the GLN of the trading partner MAY be used when the AS2-TO field is used for routing. Mandatory Mandatory Not allowed

SMTP

Internet connection

Dedicated e-mail address and GLN related to this email address

Header

AS2-From

NA

AS2-To

NA

MDN MDN signed MDN encrypted

Mandatory Mandatory Not allowed

Sync/Async

Asynchronous: reverse proxy and when risk of time-out. All other cases synchronous are required. Optional Optional MIME type coherent with content Mandatory NA MIME type coherent with content Mandatory Accepted and optional (bilaterally agreed). 1.1 4080 for HTTP and 5443 for HTTPS. NA

Timestamp Formats MIME S/MIME Compressed (yes/no) Version Port inbound/outbo und

696

697

Appendix 4. Glossary
Term Asynchronous Receipt Definition A receipt returned to the sender on a different communication session than the sender's original message session. The process of establishing that individuals, organizations, or things are who or what they claim to be. In the context of a PKI, authentication can be the process of establishing that an individual or organization applying for or seeking access to something under a certain name is, in fact, the proper individual or organization. This corresponds to the second process involved with identification, as shown in the definition of "identification" below. Authentication can also refer to a security service that provides assurances that individuals, organizations, or things are who or what they claim to be or that a message or other data originated from a specific individual, organization, or device. Thus, it is said that a digital signature of a message authenticates the message's sender. A named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements. For example, a particular CP might indicate applicability of a type of certificate to the authentication of parties engaging in business-tobusiness transactions for the trading of goods or services within a given price range. An authority trusted by one or more users to create and assign certificates. Optionally the certification authority may create the users. keys. Source draft-ietf-ediint-as2-16

Authentication

RFC3647

Certificate policy (CP)

RFC3647

Certification authority (CA) Certification path

ISO/IEC 9594-8; ITU-T X.509

An ordered sequence of certificates that, together RFC3647 with the public key of the initial object in the path, can be processed to obtain that of the final object in the path. A statement of the practices that a certification authority employs in issuing, managing, revoking, and renewing or re-keying certificates. Cryptographic Message Syntax (CMS) is an encapsulation syntax used to digitally sign, digest, authenticate, or encrypt arbitrary messages. RFC3647

Certification Practice Statement (CPS) CMS

draft-ietf-ediint-as2-16

CPS Summary (or CPS Abstract) MD5

A subset of the provisions of a complete CPS that is RFC3647 made public by a CA A secure, one-way hash algorithm used in conjunction with digital signature. This algorithm is accepted in AS2 but not recommended due to its short key length. The Internet messaging format used to convey a receipt. This term is used interchangeably with receipt. A MDN is a receipt. draft-ietf-ediint-as2-16

Message Disposition Notification (MDN)

draft-ietf-ediint-as2-16

MIC

The message integrity check (MIC), also called the message digest, is the digest output of the hash algorithm used by the digital signature. The digital signature is computed over the MIC. NRR is a "legal event" that occurs when the original sender of an signed EDI/EC interchange has verified the signed receipt coming back from the receiver. NRR IS NOT a functional or a technical message.

draft-ietf-ediint-as2-16

Non-repudiation of receipt (NRR)

draft-ietf-ediint-as2-16

PGP/MIME

Digital envelope security based on the Pretty Good Privacy (PGP) standard (Zimmerman), integrated with MIME Security Multiparts [6].

RFC3335

PKI Disclosure Statement (PDS)

An instrument that supplements a CP or CPS by RFC3647 disclosing critical information about the policies and practices of a CA/PKI. A PDS is a vehicle for disclosing and emphasizing information normally covered in detail by associated CP and/or CPS documents. Consequently, a PDS is not intended to replace a CP or CPS. The functional message that is sent from a receiver to a sender to acknowledge receipt of an EDI/EC interchange. This message may be either synchronous or asynchronous in nature draft-ietf-ediint-as2-16

Receipt

Registration authority (RA)

An entity that is responsible for one or more of the RFC3647 following functions: the identification and authentication of certificate applicants, the approval or rejection of certificate applications, initiating certificate revocations or suspensions under certain circumstances, processing subscriber requests to revoke or suspend their certificates, and approving or rejecting requests by subscribers to renew or rekey their certificates. RAs, however, do not sign or issue certificates (i.e., an RA is delegated certain tasks on behalf of a CA). [Note: The term Local Registration Authority (LRA) is sometimes used in other documents for the same concept.] A format and protocol for adding Cryptographic signature and/or encryption services to Internet MIME messages. A secure, one-way hash algorithm used in conjunction with digital signature. This is the recommend algorithm for AS2. A receipt with a digital signature A receipt returned to the sender during the same HTTP session as the sender's original message The application that handles and processes the AS2 request. draft-ietf-ediint-as2-16

S/MIME

SHA-1

draft-ietf-ediint-as2-16

Signed Receipt Synchronous Receipt User Agent (UA)

draft-ietf-ediint-as2-16 draft-ietf-ediint-as2-16 draft-ietf-ediint-as2-16

698

699

Appendix 5. AS1/AS2 Process Flow

Sender

Receiver

ERP

EDI

AS2

AS2

EDI

ERP

Private Key

Public Key

Public Key

Private Key

Both partners must have an AS1 or AS2 software. They must also exchange their public keys to apply digital signature and encryption.

Sender

Receiver

Internet
AS1/AS2 Software AS1/AS2 Software

The sender signs the document with his private key, encrypts it with the receivers public key and sends it via internet to the receiver. The receiver decrypts the message and verifies the digital signature of the sender.

700

Sender

Receiver

Internet
AS1/AS2 Software AS1/AS2 Software

The sender receives a digital signed (and optionally encrypted) message disposition notification back from the receiver.