Individual Submission J. Munoz Internet-Draft Greicodex Software Intended status: Informational 4 December 2026 Expires: 7 June 2027 FideX Application Statement 5 (AS5) Protocol draft-greicodex-fidex-protocol-02 Abstract This document specifies the FideX Protocol (AS5), a modern application-layer protocol for secure Business-to-Business (B2B) message exchange. FideX provides cryptographic non-repudiation, data integrity, and confidentiality using JOSE (JSON Object Signing and Encryption) over HTTPS, replacing legacy AS2 and AS4 standards with a REST-oriented approach accessible to modern web developers. FideX adopts the "AS" naming lineage: AS2 ([RFC4130]) used S/MIME over HTTP; AS4 ([OASIS-ebMS]) used SOAP/WS-Security; AS5 (FideX) uses REST/JSON/JOSE over HTTPS. This document defines the message format, cryptographic operations, partner discovery, state management, acknowledgment receipts (J-MDN), and error handling. This revision adds an optional event capability. Events are represented as CNCF CloudEvents version 1.0 and are exchanged between partners inside the existing FideX envelope, with the same signature, encryption, and receipt guarantees as business documents. Status of This Document This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. This document is a work in progress and represents the current thinking of the FideX Protocol Working Group at Greicodex Software. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Munoz Expires 7 June 2027 [Page 1] Internet-Draft FideX AS5 Protocol December 2026 Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on 7 June 2027. Copyright Notice Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3. AS Naming Lineage . . . . . . . . . . . . . . . . . . . . 5 1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 2. Transport Layer . . . . . . . . . . . . . . . . . . . . . . . 6 2.1. Required Transport . . . . . . . . . . . . . . . . . . . 6 2.2. Optional Transports . . . . . . . . . . . . . . . . . . . 6 2.3. Request Method . . . . . . . . . . . . . . . . . . . . . 7 2.4. Content Type . . . . . . . . . . . . . . . . . . . . . . 7 2.5. Message Size Limits . . . . . . . . . . . . . . . . . . . 7 3. Message Structure . . . . . . . . . . . . . . . . . . . . . . 7 3.1. Message Envelope . . . . . . . . . . . . . . . . . . . . 7 3.2. Routing Header . . . . . . . . . . . . . . . . . . . . . 7 3.2.1. Identifier Format . . . . . . . . . . . . . . . . . . 8 3.3. Document Type Registry . . . . . . . . . . . . . . . . . 9 3.3.1. Standard Document Types . . . . . . . . . . . . . . . 9 3.3.2. Custom Document Types . . . . . . . . . . . . . . . . 10 3.3.3. Receiver Behavior for Document Types . . . . . . . . 11 3.4. Encrypted Payload . . . . . . . . . . . . . . . . . . . . 11 4. Cryptographic Requirements . . . . . . . . . . . . . . . . . 11 4.1. Signature (JWS) . . . . . . . . . . . . . . . . . . . . . 11 4.2. Encryption (JWE) . . . . . . . . . . . . . . . . . . . . 12 4.3. Payload Encoding . . . . . . . . . . . . . . . . . . . . 13 4.4. Sender Identity Verification . . . . . . . . . . . . . . 13 4.5. Prohibited Algorithms . . . . . . . . . . . . . . . . . . 13 5. Key Distribution . . . . . . . . . . . . . . . . . . . . . . 13 5.1. JSON Web Key Set (JWKS) Endpoint . . . . . . . . . . . . 13 Munoz Expires 7 June 2027 [Page 2] Internet-Draft FideX AS5 Protocol December 2026 5.2. JWKS Format . . . . . . . . . . . . . . . . . . . . . . . 14 5.3. Key Rotation . . . . . . . . . . . . . . . . . . . . . . 15 6. Partner Discovery . . . . . . . . . . . . . . . . . . . . . . 15 6.1. Discovery Overview . . . . . . . . . . . . . . . . . . . 15 6.2. AS5 Configuration Endpoint . . . . . . . . . . . . . . . 15 6.2.1. Encryption Algorithm Negotiation . . . . . . . . . . 17 6.2.2. Version Negotiation . . . . . . . . . . . . . . . . . 18 6.3. Discovery Handshake . . . . . . . . . . . . . . . . . . . 18 6.4. Registration Security Requirements . . . . . . . . . . . 19 6.5. Partner De-Registration . . . . . . . . . . . . . . . . . 20 7. Message States and Receipts . . . . . . . . . . . . . . . . . 20 7.1. Message State Machine . . . . . . . . . . . . . . . . . . 20 7.2. Synchronous HTTP Response . . . . . . . . . . . . . . . . 21 7.3. Asynchronous Receipt: J-MDN . . . . . . . . . . . . . . . 22 7.3.1. J-MDN Payload Schema . . . . . . . . . . . . . . . . 22 7.3.2. Hash Verification . . . . . . . . . . . . . . . . . . 23 7.3.3. J-MDN Signature Requirements . . . . . . . . . . . . 23 7.3.4. J-MDN Error Codes . . . . . . . . . . . . . . . . . . 24 7.3.5. J-MDN Delivery Protocol . . . . . . . . . . . . . . . 25 7.3.6. J-MDN Delivery Retry Schedule . . . . . . . . . . . . 26 7.4. Sender Retry Semantics . . . . . . . . . . . . . . . . . 26 7.5. Evidence Delivery to Non-FideX Participants . . . . . . . 27 7.5.1. Evidence Content and Attribution . . . . . . . . . . 27 7.5.2. Delivery Channels . . . . . . . . . . . . . . . . . . 27 7.5.3. Relationship to FideX Receipts . . . . . . . . . . . 28 8. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 29 8.1. HTTP Status Codes . . . . . . . . . . . . . . . . . . . . 29 8.2. Error Response Format . . . . . . . . . . . . . . . . . . 29 8.3. Standard Error Codes . . . . . . . . . . . . . . . . . . 29 9. Events . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 9.1. Event Model . . . . . . . . . . . . . . . . . . . . . . . 30 9.2. Event Messages . . . . . . . . . . . . . . . . . . . . . 31 9.2.1. Event Attributes . . . . . . . . . . . . . . . . . . 32 9.2.2. FideX Extension Attributes . . . . . . . . . . . . . 33 9.2.3. Receiver Processing . . . . . . . . . . . . . . . . . 33 9.2.4. Meaning of Receipts for Events . . . . . . . . . . . 34 9.3. Discovery of Event Support . . . . . . . . . . . . . . . 35 9.4. Protocol Events . . . . . . . . . . . . . . . . . . . . . 36 9.4.1. Event Types . . . . . . . . . . . . . . . . . . . . . 36 9.4.2. Attributes and Data . . . . . . . . . . . . . . . . . 36 9.4.3. Delivery of Protocol Events . . . . . . . . . . . . . 38 10. Security Considerations . . . . . . . . . . . . . . . . . . . 39 10.1. Threat Model . . . . . . . . . . . . . . . . . . . . . . 39 10.2. Implementation Security Requirements . . . . . . . . . . 39 10.3. Key Management . . . . . . . . . . . . . . . . . . . . . 40 10.4. Event Considerations . . . . . . . . . . . . . . . . . . 41 10.5. Compliance Considerations . . . . . . . . . . . . . . . 42 10.6. Deployment Note . . . . . . . . . . . . . . . . . . . . 42 Munoz Expires 7 June 2027 [Page 3] Internet-Draft FideX AS5 Protocol December 2026 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 42 12.1. Normative References . . . . . . . . . . . . . . . . . . 42 12.2. Informative References . . . . . . . . . . . . . . . . . 44 Appendix A: Complete Message Example . . . . . . . . . . . . . . 45 Appendix B: Glossary . . . . . . . . . . . . . . . . . . . . . . 47 Appendix C: Conformance Profiles . . . . . . . . . . . . . . . . 47 C.1 FideX Core . . . . . . . . . . . . . . . . . . . . . . . . 48 C.2 FideX Enhanced . . . . . . . . . . . . . . . . . . . . . . 48 C.3 FideX Edge . . . . . . . . . . . . . . . . . . . . . . . . 49 C.4 Events (Optional Capability) . . . . . . . . . . . . . . . 49 Appendix D: Interoperability Test Vectors . . . . . . . . . . . . 50 Appendix E: JSON Schema Definitions . . . . . . . . . . . . . . . 51 E.1 Routing Header Schema . . . . . . . . . . . . . . . . . . . 51 E.2 J-MDN Schema . . . . . . . . . . . . . . . . . . . . . . . 52 E.3 AS5 Configuration Schema . . . . . . . . . . . . . . . . . 54 E.4 Event Message Payload Schema . . . . . . . . . . . . . . . 55 Appendix F: Implementation Plans and Interoperability . . . . . . 56 Appendix G: Changes from Revision -01 . . . . . . . . . . . . . . 57 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 57 1. Introduction 1.1. Purpose FideX (Fast Integration for Digital Enterprises eXchange) defines a secure, reliable message exchange protocol for B2B electronic data interchange. The protocol ensures: * *Non-repudiation:* Cryptographic proof of message origin * *Integrity:* Detection of message tampering * *Confidentiality:* End-to-end encryption * *Reliability:* Asynchronous acknowledgments with retry semantics 1.2. Scope This specification defines: * Message format and structure * Cryptographic operations (sign-then-encrypt using JOSE) * Partner discovery and registration * State management and acknowledgments (J-MDN) Munoz Expires 7 June 2027 [Page 4] Internet-Draft FideX AS5 Protocol December 2026 * Error codes and handling * Optional exchange of events represented as CloudEvents (Section 9) This specification does NOT define: * Business document formats (the protocol is payload-agnostic) * Application-specific processing logic * Event types and event data for business occurrences, event subscription management, or command (request/response) semantics * Implementation details or code examples * Deployment or operational procedures 1.3. AS Naming Lineage FideX adopts the "AS" (Application Statement) naming lineage from established B2B interchange standards: * *AS2* ([RFC4130]) -- MIME/S/MIME over HTTP (2005) * *AS4* ([OASIS-ebMS]) -- SOAP/WS-Security over HTTP (2013) * *AS5* (FideX) -- REST/JSON/JOSE over HTTPS (2026) The designation signals evolutionary continuity while marking a generational leap to modern web-native architecture. AS5 is implementable by any developer with knowledge of REST APIs and standard JOSE libraries, without requiring specialized B2B middleware. 1.4. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. Additional terms used in this document: Node A FideX-compliant server capable of sending and receiving messages. Partner A trading partner with an established trust relationship. Munoz Expires 7 June 2027 [Page 5] Internet-Draft FideX AS5 Protocol December 2026 Message A business document wrapped in a FideX envelope. J-MDN JSON Message Disposition Notification -- a signed receipt acknowledging receipt and processing of a FideX message. JWKS JSON Web Key Set -- a JSON structure representing a set of public keys. AS5 Configuration A JSON document published by a node describing its endpoints, supported algorithms, and identity. Event A record stating that something happened (an occurrence), expressed as a CloudEvent as defined in [CloudEvents]. An event states a fact; it is not a request for the consumer to act. Event Message A FideX message whose business payload is a single CloudEvent (see Section 9.2). Protocol Event An event, defined by this document, that a node emits about the life cycle of a FideX message (see Section 9.4). Producer / Consumer The party that creates an event, and a party that receives and acts on it, as in [CloudEvents]. 2. Transport Layer 2.1. Required Transport Nodes MUST support HTTP/1.1 over TLS 1.3 as defined in [RFC8446]. TLS 1.2 ([RFC5246]) MAY be supported with Perfect Forward Secrecy (ECDHE key exchange) as fallback for backward compatibility. Transport requirements: * Port 443 (HTTPS) * Valid certificate from a trusted Certificate Authority (CA) * Server Name Indication (SNI) per [RFC6066] * Full certificate chain validation 2.2. Optional Transports Nodes MAY additionally support: * *HTTP/2* ([RFC9113]): For multiplexed connections and improved throughput. Munoz Expires 7 June 2027 [Page 6] Internet-Draft FideX AS5 Protocol December 2026 * *HTTP/3* ([RFC9114]): For connection resilience using QUIC. 2.3. Request Method All FideX message transmissions MUST use the HTTP POST method to the receiving endpoint specified in the partner's AS5 configuration (see Section 6). 2.4. Content Type FideX message envelopes MUST use Content-Type: application/json. Registration requests MUST use Content-Type: application/jose (see Section 6.3). 2.5. Message Size Limits Implementations MUST accept messages up to 10 megabytes (10,000,000 octets in the complete HTTP request body, including the JSON envelope and all JOSE serialization overhead). This is not a limit on the unencoded business document. Implementations MAY accept larger messages by prior bilateral agreement. Senders MUST NOT assume support above 10 MB without prior explicit agreement. Implementations SHOULD reject oversized messages with HTTP 413 and the error code PAYLOAD_TOO_LARGE (see Section 8.3). 3. Message Structure 3.1. Message Envelope A FideX message envelope consists of exactly two top-level JSON fields: { "routing_header": { ... }, "encrypted_payload": "eyJhbGc..." } The routing_header is cleartext JSON containing message metadata readable by intermediate infrastructure without decryption. The encrypted_payload is a JWE compact serialization that wraps the signed business document. These two fields are the ONLY top-level fields in a FideX message envelope. 3.2. Routing Header The routing header is a cleartext JSON object conveying message routing metadata. It MUST contain the following fields: Munoz Expires 7 June 2027 [Page 7] Internet-Draft FideX AS5 Protocol December 2026 fidex_version (string, REQUIRED) Protocol version in semantic "major.minor" format, e.g., "1.0". message_id (string, REQUIRED) Globally unique message identifier. UUID v4 ([RFC9562]) with an "fdx-" prefix is RECOMMENDED (e.g., "fdx-550e8400-e29b-41d4-a716-446655440000"). sender_id (string, REQUIRED) URN of the sending organization. See Section 3.2.1 for valid formats. receiver_id (string, REQUIRED) URN of the receiving organization. See Section 3.2.1 for valid formats. document_type (string, REQUIRED) Business document type identifier. MUST match the pattern ^[A-Z0-9_]+$. See Section 3.3. timestamp (string, REQUIRED) ISO 8601 UTC timestamp with millisecond precision. Format: YYYY-MM-DDTHH:mm:ss.SSSZ. The UTC designator "Z" MUST be used; no local timezone offsets are permitted. receipt_webhook (string, OPTIONAL) HTTPS URL where the J-MDN receipt SHOULD be delivered. HTTP (non-TLS) is NOT allowed. When omitted, the receiver MUST deliver the J-MDN to the sender's receive_receipt endpoint from the sender's AS5 configuration (see Section 7.3.5). payload_digest (string, OPTIONAL) SHA-256 digest of the encrypted_payload field value. Computed as "sha256:" followed by the lowercase hexadecimal encoding of SHA-256 applied to the UTF-8 byte representation of the encrypted_payload string as it appears in the JSON envelope. Enables routing-layer integrity checks without decryption. Extension fields MAY be included and MUST use the prefix "x-" to avoid collision with future standard fields. Implementations MUST ignore unknown extension fields without error. 3.2.1. Identifier Format The sender_id and receiver_id fields MUST use URN format. The following URN namespaces are recognized: * urn:gln:{gln} -- GS1 Global Location Number * urn:duns:{duns} -- D-U-N-S Number * urn:lei:{lei} -- Legal Entity Identifier (ISO 17442) Munoz Expires 7 June 2027 [Page 8] Internet-Draft FideX AS5 Protocol December 2026 * urn:tin:{tin} -- Tax Identification Number * urn:custom:{identifier} -- Organization-defined identifier 3.3. Document Type Registry The document_type field uses a two-tier naming system to accommodate both standardized inter-organization document types and organization- specific custom types. 3.3.1. Standard Document Types The following standard document types are defined by the FideX Working Group. Standard types use uppercase alphanumeric characters and underscores, matching the pattern ^[A-Z0-9_]+$. GS1 document types are defined in [GS1-JSON]. Munoz Expires 7 June 2027 [Page 9] Internet-Draft FideX AS5 Protocol December 2026 +==================+=================+=====================+ | Type Identifier | Standard | Description | +==================+=================+=====================+ | GS1_ORDER_JSON | GS1 | Purchase order | | | | (JSON binding) | +------------------+-----------------+---------------------+ | GS1_INVOICE_JSON | GS1 | Commercial invoice | | | | (JSON binding) | +------------------+-----------------+---------------------+ | GS1_DESADV_JSON | GS1 | Despatch advice | | | | (JSON binding) | +------------------+-----------------+---------------------+ | GS1_RECADV_JSON | GS1 | Receiving advice | | | | (JSON binding) | +------------------+-----------------+---------------------+ | GS1_CATALOG_JSON | GS1 | Product catalog | | | | (JSON binding) | +------------------+-----------------+---------------------+ | X12_850 | ANSI X12 | Purchase order | +------------------+-----------------+---------------------+ | X12_810 | ANSI X12 | Invoice | +------------------+-----------------+---------------------+ | X12_856 | ANSI X12 | Advance ship notice | +------------------+-----------------+---------------------+ | EDIFACT_ORDERS | UN/EDIFACT | Purchase order | | | | message | +------------------+-----------------+---------------------+ | EDIFACT_INVOIC | UN/EDIFACT | Invoice message | +------------------+-----------------+---------------------+ | EDIFACT_DESADV | UN/EDIFACT | Despatch advice | | | | message | +------------------+-----------------+---------------------+ | UBL_ORDER_21 | OASIS UBL 2.1 | Order document | +------------------+-----------------+---------------------+ | UBL_INVOICE_21 | OASIS UBL 2.1 | Invoice document | +------------------+-----------------+---------------------+ | CLOUDEVENTS_JSON | CNCF | Single event in the | | | CloudEvents 1.0 | JSON Event Format | | | | (see Section 9.2) | +------------------+-----------------+---------------------+ Table 1: Standard FideX Document Types 3.3.2. Custom Document Types Organizations MAY define custom document types using reverse domain notation to avoid collision with standard types and with other organizations' custom types. Munoz Expires 7 June 2027 [Page 10] Internet-Draft FideX AS5 Protocol December 2026 Custom types MUST follow the pattern: {TLD}_{ORG}_{DOCTYPE}_{VERSION}, for example: COM_ACME_WAREHOUSE_RECEIPT_V2. Custom types MUST NOT use the reserved prefixes: GS1_, X12_, EDIFACT_, UBL_, or CLOUDEVENTS_. 3.3.3. Receiver Behavior for Document Types Receiver nodes: * MUST accept messages with any syntactically valid document_type. * SHOULD return a J-MDN with error code UNKNOWN_DOCUMENT_TYPE for types they cannot process. * MUST NOT reject messages at the HTTP level solely because of an unknown document_type. The J-MDN mechanism MUST be used instead. 3.4. Encrypted Payload The encrypted_payload field contains a JWE (JSON Web Encryption) token in compact serialization as defined in [RFC7516]. The JWE encrypts a JWS (JSON Web Signature) token as defined in [RFC7515], creating a nested "sign-then-encrypt" structure: JWE( JWS( business_document ) ) This pattern ensures both authenticity (the signature is inside the encryption envelope, protecting it from substitution) and confidentiality (the business content is encrypted end-to-end). 4. Cryptographic Requirements 4.1. Signature (JWS) Messages MUST be signed using the sender's private key before encryption. The REQUIRED signing algorithm is *RS256* (RSASSA-PKCS1-v1_5 with SHA-256) as defined in [RFC7518]. The following signing algorithms are OPTIONAL: * RS384, RS512 -- stronger RSA variants * PS256, PS384, PS512 -- RSA-PSS variants Munoz Expires 7 June 2027 [Page 11] Internet-Draft FideX AS5 Protocol December 2026 * ES256 (ECDSA with P-256 and SHA-256) -- RECOMMENDED for new deployments * ES384 (ECDSA with P-384 and SHA-384) Minimum key sizes: 2048 bits for RSA (4096 bits RECOMMENDED); P-256 minimum for ECDSA (P-384 RECOMMENDED). The JWS Protected Header MUST include: { "alg": "RS256", "kid": "{sender-key-id}" } 4.2. Encryption (JWE) Signed messages MUST be encrypted using the receiver's public key. The REQUIRED algorithms are: * *Key Encryption:* RSA-OAEP as defined in [RFC7518] * *Content Encryption:* A256GCM (AES-256-GCM) Implementations SHOULD also support RSA-OAEP-256, which uses SHA-256 for both OAEP and MGF1, as defined in [RFC7518], Section 4.3. Algorithm selection follows Section 6.2.1. RSA-OAEP remains the REQUIRED interoperability baseline for protocol version 1.0. The JWE Protected Header MUST include: { "alg": "RSA-OAEP", "enc": "A256GCM", "cty": "JWT", "kid": "{receiver-key-id}" } The cty (content type) header parameter MUST be set to "JWT" to indicate the JWE payload contains a nested JWS/JWT token, per [RFC7516] Section 4.1.12. This is required for correct processing of nested tokens. Munoz Expires 7 June 2027 [Page 12] Internet-Draft FideX AS5 Protocol December 2026 4.3. Payload Encoding The JWS payload MUST be the UTF-8 encoding of the JSON-serialized business document. Binary payloads (images, PDFs, etc.) MUST be base64-encoded before JWS signing. 4.4. Sender Identity Verification Receivers MUST verify that the JWS signing key identified by kid in the JWS header belongs to the partner identified by sender_id in the routing header. Specifically: * The kid MUST resolve to a public key in the sender's JWKS. * The sender's JWKS MUST be fetched from the public_domain associated with the sender_id in the local partner registry. This prevents cross-partner key substitution attacks where an attacker uses a valid key from one partner to impersonate another. 4.5. Prohibited Algorithms Implementations MUST NOT use: * The none algorithm (unsigned tokens) * Symmetric signature algorithms (HS256, HS384, HS512) * RSA keys smaller than 2048 bits * Deprecated algorithms: MD5, SHA-1-based signatures 5. Key Distribution 5.1. JSON Web Key Set (JWKS) Endpoint Nodes MUST publish their public keys via a JWKS endpoint at the well- known URI: https://{public_domain}/.well-known/jwks.json This endpoint: * MUST be publicly accessible without authentication. * MUST return Content-Type: application/json. * SHOULD include Cache-Control headers (1 hour RECOMMENDED). Munoz Expires 7 June 2027 [Page 13] Internet-Draft FideX AS5 Protocol December 2026 5.2. JWKS Format Per [RFC7517], keys MUST include at minimum the following fields. An RSA signing key example: { "keys": [ { "kty": "RSA", "use": "sig", "kid": "acme-sign-rsa-2026-01", "alg": "RS256", "n": "{base64url-encoded-modulus}", "e": "AQAB" } ] } An EC signing key example: { "keys": [ { "kty": "EC", "use": "sig", "kid": "acme-sign-ec-2026-01", "alg": "ES256", "crv": "P-256", "x": "{base64url-x-coordinate}", "y": "{base64url-y-coordinate}" } ] } Field semantics: kty Key type: "RSA" or "EC". use "sig" for signing keys; "enc" for encryption keys. kid Unique key identifier used in JWS/JWE headers. alg Algorithm for this key (RS256, ES256, RSA-OAEP, etc.). Munoz Expires 7 June 2027 [Page 14] Internet-Draft FideX AS5 Protocol December 2026 5.3. Key Rotation Implementations SHOULD rotate keys annually. During rotation, the following procedure MUST be followed to ensure uninterrupted partner communication: 1. Publish the new key alongside the old key in the JWKS. 2. Maintain both keys for a transition period (30-60 days RECOMMENDED). 3. Begin signing new outbound messages with the new key after partners have had time to cache it. 4. Remove the old key from the JWKS after the transition period. The kid value SHOULD encode the purpose and date to aid key management, e.g., "org-sign-rsa-2026-01". 6. Partner Discovery 6.1. Discovery Overview Partner discovery enables automated trading partner onboarding without manual certificate exchange. The process consists of four phases: 1. Configuration discovery 2. Key retrieval 3. Signed registration 4. Mutual confirmation The AS5 configuration URL MAY be distributed via QR code, email, or a trading partner portal. The protocol is designed so that scanning a QR code initiates fully automated mutual trust establishment. 6.2. AS5 Configuration Endpoint Nodes MUST expose an AS5 configuration document at an HTTPS URL. This URL: * MAY be at any path (no required well-known location). * MAY include a single-use security token as a query parameter. Munoz Expires 7 June 2027 [Page 15] Internet-Draft FideX AS5 Protocol December 2026 * SHOULD be shareable via QR code. The AS5 configuration document structure: { "fidex_version": "1.0", "supported_versions": ["1.0"], "conformance_profile": "core", "node_id": "urn:gln:1234567890123", "organization_name": "Example Corp", "public_domain": "fidex.example.com", "supported_document_types": ["GS1_ORDER_JSON", "GS1_INVOICE_JSON"], "endpoints": { "receive_message": "https://fidex.example.com/api/v1/receive", "receive_receipt": "https://fidex.example.com/api/v1/receipt", "register": "https://fidex.example.com/api/v1/register", "jwks": "https://fidex.example.com/.well-known/jwks.json" }, "security": { "signature_algorithm": "RS256", "encryption_algorithm": "RSA-OAEP", "supported_encryption_algorithms": ["RSA-OAEP", "RSA-OAEP-256"], "content_encryption": "A256GCM", "minimum_key_size": 2048 } } Required fields in the AS5 configuration: fidex_version Current active protocol version (string, REQUIRED). supported_versions Array of all protocol versions this node supports (array, REQUIRED). node_id URN identifier for this node (string, REQUIRED). organization_name Human-readable organization name (string, REQUIRED). public_domain Public-facing domain name hosting JWKS and endpoints (string, REQUIRED). endpoints Object containing service endpoint URLs (object, REQUIRED). MUST include: receive_message, receive_receipt, register, jwks. security Cryptographic algorithm declarations (object, REQUIRED). Munoz Expires 7 June 2027 [Page 16] Internet-Draft FideX AS5 Protocol December 2026 conformance_profile "core", "enhanced", or "edge" (string, OPTIONAL). supported_document_types Array of document_type identifiers this node processes (array, OPTIONAL). events Event capability declaration (object, OPTIONAL). See Section 9.3. 6.2.1. Encryption Algorithm Negotiation The REQUIRED security.encryption_algorithm string identifies an algorithm the node accepts from legacy peers. The OPTIONAL security.supported_encryption_algorithms array declares all accepted JWE key-management algorithms. When present, the array MUST be non- empty, contain unique algorithm names, and include the value of encryption_algorithm. Nodes MUST NOT advertise algorithms they cannot accept. Version 1.0 nodes MUST continue to support RSA-OAEP. Before encrypting a message, the sender MUST: 1. Obtain the receiver's capabilities from its HTTPS AS5 configuration associated with the established partner record. If the array is absent, use the single encryption_algorithm value as a one-element list. A missing or malformed required declaration is a configuration error, not permission to assume an algorithm. 2. Intersect that list with the sender's implemented and locally permitted algorithms and the algorithms compatible with the receiver's encryption key. If a JWK declares alg, the selected algorithm MUST match that declaration. 3. Select RSA-OAEP-256 when it is in the intersection; otherwise select RSA-OAEP when it is in the intersection. If neither is available, do not transmit and report a local incompatibility error. 4. Set the JWE Protected Header alg to the selected algorithm. Receivers MUST enforce their own algorithm allowlist when decrypting. Senders MUST NOT retry with a different algorithm solely because decryption or delivery failed. Cached capabilities MUST remain associated with the partner record. If they are unavailable after a restart, refresh discovery before sending instead of treating that loss as a legacy advertisement. Local policy MAY prohibit an algorithm; a node that disables RSA-OAEP cannot claim the version 1.0 Core baseline. Munoz Expires 7 June 2027 [Page 17] Internet-Draft FideX AS5 Protocol December 2026 6.2.2. Version Negotiation When two nodes with different supported versions communicate, the sender MUST: 1. Retrieve the receiver's supported_versions from their AS5 configuration. 2. Select the highest version present in BOTH supported_versions arrays. 3. Set fidex_version in the routing header to the negotiated version. The receiver MUST reject messages with a fidex_version not present in its supported_versions. If no common version exists, the sender MUST NOT transmit and SHOULD report an incompatibility error to the local system. 6.3. Discovery Handshake The four-phase discovery handshake proceeds as follows: *Phase 1 -- Initiator Discovers Responder:* 1. Initiator obtains the responder's AS5 configuration URL. 2. Initiator fetches the responder's AS5 configuration document. 3. Initiator fetches the responder's JWKS from the well-known endpoint. *Phase 2 -- Initiator Registers:* The initiator constructs and submits a signed registration payload: { "fidex_version": "1.0", "initiator_node_id": "urn:gln:...", "initiator_as5_config_url": "https://...", "security_token": "...", "timestamp": "2026-03-09T19:00:00.000Z" } 1. Initiator constructs the registration payload as shown above. Munoz Expires 7 June 2027 [Page 18] Internet-Draft FideX AS5 Protocol December 2026 2. Initiator signs the payload with its private key (JWS compact serialization). 3. Initiator POSTs the JWS to the responder's register endpoint with Content-Type: application/jose. *Phase 3 -- Responder Validates:* 1. Responder validates the security token (if configured). 2. Responder fetches the initiator's AS5 configuration from the URL in the request. 3. Responder fetches the initiator's JWKS and verifies the JWS signature. 4. Responder stores the initiator's details and returns HTTP 200. *Phase 4 -- Completion:* 1. Initiator receives HTTP 200 confirmation. 2. Initiator stores the responder's details. 3. Both parties MAY immediately exchange FideX messages. 6.4. Registration Security Requirements Registration requests MUST: * Be signed with the initiator's private key (RS256 minimum). * Be transmitted with Content-Type: application/jose. * Include a timestamp within +/-15 minutes of current time. * Include the security token if the responder has configured one. Security tokens MUST contain at least 128 bits of entropy, generated using a cryptographically secure pseudo-random number generator (CSPRNG). For example, encode 16 CSPRNG-generated octets as 32 hexadecimal characters or 22 unpadded base64url characters. A UUID v4 has only 122 random bits and does not meet this security-token requirement. Responders MUST: * Validate the JWS signature before trusting any payload content. Munoz Expires 7 June 2027 [Page 19] Internet-Draft FideX AS5 Protocol December 2026 * Reject registrations with timestamps outside +/-15 minutes. * Reject invalid or previously used security tokens. 6.5. Partner De-Registration De-registration is a local, unilateral operation. There is no protocol-level de-registration handshake. Partner states: +===========+=======================================================+ | State | Description | +===========+=======================================================+ | ACTIVE | Normal operation -- messages accepted | +-----------+-------------------------------------------------------+ | SUSPENDED | Temporarily paused -- messages | | | rejected with HTTP 503 | +-----------+-------------------------------------------------------+ | INACTIVE | De-registered -- messages rejected | | | with HTTP 401 | +-----------+-------------------------------------------------------+ Table 2: Partner States De-registration procedure: 1. The initiating party sets partner status to INACTIVE locally. 2. The initiating party SHOULD notify the partner via out-of-band channel. 3. The initiating party MUST continue accepting J-MDNs for in-flight messages. 4. After a 24-hour grace period, new inbound messages MUST be rejected with HTTP 401. 5. Partner records SHOULD be retained for audit purposes (7 years RECOMMENDED). 7. Message States and Receipts 7.1. Message State Machine Messages transition through the following states: Munoz Expires 7 June 2027 [Page 20] Internet-Draft FideX AS5 Protocol December 2026 +===========+=================================================+ | State | Description | +===========+=================================================+ | QUEUED | Created locally, awaiting transmission | +-----------+-------------------------------------------------+ | SENT | Transmitted to receiver, awaiting J-MDN receipt | +-----------+-------------------------------------------------+ | DELIVERED | Positive J-MDN received, verified, and matched | | | to the original message | +-----------+-------------------------------------------------+ | FAILED | Permanent failure or maximum retries exceeded | +-----------+-------------------------------------------------+ Table 3: Message States These are protocol state semantics. Implementations MAY use different internal database or API labels, such as ACKNOWLEDGED for DELIVERED, provided they preserve these semantics. The status field in a transmitted J-MDN MUST still use DELIVERED or FAILED. A verified FAILED receipt MUST NOT transition the original message to DELIVERED. Conformance assessment MUST check receipt verification and correlation, not require a particular internal storage label. 7.2. Synchronous HTTP Response Upon receiving a message, nodes MUST perform structural validation and return: * *HTTP 202 Accepted:* Message is structurally valid and queued for processing. * *HTTP 4xx/5xx:* Immediate rejection (see Section 8). HTTP 202 indicates structural acceptance only. It does NOT indicate successful decryption, business document processing, or J-MDN generation. *Idempotency:* Receivers MUST handle duplicate message_id values idempotently. If a receiver encounters a message_id it has already accepted, it MUST return HTTP 202 again and MUST NOT process the message a second time. This ensures safe sender retries when HTTP responses are lost. Munoz Expires 7 June 2027 [Page 21] Internet-Draft FideX AS5 Protocol December 2026 7.3. Asynchronous Receipt: J-MDN The J-MDN (JSON Message Disposition Notification) is the legally most significant artifact in the FideX protocol. It provides cryptographic proof that a specific message was received, decrypted, and accepted or rejected by the trading partner. After processing a message, the receiver MUST send a J-MDN to the sender. The delivery target is determined as follows: 1. If receipt_webhook is present in the routing header, deliver to that URL. 2. Otherwise, deliver to the sender's receive_receipt endpoint from the sender's AS5 configuration. 3. If neither is available, the J-MDN MUST be stored and the failure logged; J-MDNs MUST NOT be discarded. 7.3.1. J-MDN Payload Schema The J-MDN JSON object contains the following fields: original_message_id (string, REQUIRED) The message_id from the original message's routing_header. status (string, REQUIRED) Either "DELIVERED" or "FAILED". receiver_id (string, REQUIRED) URN of the receiver generating this J-MDN. MUST match the receiver_id in the original routing_header. hash_verification (string, REQUIRED) SHA-256 hash of the raw business payload bytes before JWS signing. Format: "sha256:{64 hex characters}". See Section 7.3.2. timestamp (string, REQUIRED) ISO 8601 UTC timestamp when the J-MDN was created. Format: YYYY-MM-DDTHH:mm:ss.SSSZ. error_log (object|null, REQUIRED) MUST be null when status is "DELIVERED". MUST be an error object when status is "FAILED". signature (string, REQUIRED) JWS compact serialization covering all other J-MDN fields. See Section 7.3.3. Positive J-MDN example (DELIVERED): Munoz Expires 7 June 2027 [Page 22] Internet-Draft FideX AS5 Protocol December 2026 { "original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "DELIVERED", "receiver_id": "urn:gln:9876543210987", "hash_verification": "sha256:9f86d08...b0f00a08", "timestamp": "2026-03-09T19:30:02.000Z", "error_log": null, "signature": "eyJhbGciOiJSUzI1NiIs..." } Negative J-MDN example (FAILED): { "original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "FAILED", "receiver_id": "urn:gln:9876543210987", "hash_verification": "sha256:0000...0000", "timestamp": "2026-03-09T19:30:02.000Z", "error_log": { "error_code": "DECRYPTION_FAILED", "error_message": "Unable to decrypt payload", "details": "Key ID mismatch" }, "signature": "eyJhbGciOiJSUzI1NiIs..." } 7.3.2. Hash Verification The hash_verification field proves that the receiver decrypted exactly the payload the sender signed. Definition: hash_verification = "sha256:" || hex( SHA-256( raw_business_payload_bytes ) ) Where raw_business_payload_bytes is the UTF-8 encoded bytes of the business JSON payload BEFORE JWS signing (i.e., the exact cleartext that was the input to the JWS sign operation). When status is "FAILED" and the receiver could NOT decrypt the payload, hash_verification MUST be set to a string of 64 zero hex digits: "sha256:" followed by 64 ASCII "0" characters. 7.3.3. J-MDN Signature Requirements The signature field MUST contain a JWS compact serialization covering all other J-MDN fields (i.e., all fields except signature itself). Munoz Expires 7 June 2027 [Page 23] Internet-Draft FideX AS5 Protocol December 2026 JWS Protected Header for J-MDN signing: { "alg": "RS256", "kid": "{receiver-signing-key-id}" } Signing procedure: 1. Construct a JSON object with all J-MDN fields EXCEPT signature. 2. Serialize to canonical JSON: no extra whitespace; keys in alphabetical order (error_log, hash_verification, original_message_id, receiver_id, status, timestamp). 3. Sign using RS256 with the receiver's private signing key. 4. Set signature to the resulting JWS compact serialization. Verification procedure (sender side): 1. Extract signature from the received J-MDN. 2. Parse JWS; extract kid from the JWS header. 3. Look up the receiver's public key from their JWKS using kid. 4. Verify the JWS signature. 5. Compare the JWS payload with the remaining J-MDN fields for consistency. 7.3.4. J-MDN Error Codes When status is "FAILED", the error_log object MUST contain: error_code (string, REQUIRED) Machine-readable code from the table below. error_message (string, REQUIRED) Human-readable description. details (string, OPTIONAL) Additional diagnostic info. MUST NOT contain sensitive data. Munoz Expires 7 June 2027 [Page 24] Internet-Draft FideX AS5 Protocol December 2026 +=======================+=================================+ | Code | Description | +=======================+=================================+ | DECRYPTION_FAILED | Cannot decrypt JWE (wrong key | | | or corrupted ciphertext) | +-----------------------+---------------------------------+ | SIGNATURE_INVALID | JWS signature verification | | | failed | +-----------------------+---------------------------------+ | UNKNOWN_DOCUMENT_TYPE | The document_type is not | | | supported by the receiver | +-----------------------+---------------------------------+ | PAYLOAD_TOO_LARGE | Message exceeds receiver's | | | processing limits | +-----------------------+---------------------------------+ | INTERNAL_ERROR | Receiver encountered an | | | internal processing error | +-----------------------+---------------------------------+ | INVALID_EVENT | The payload of an Event Message | | | is not a valid CloudEvent or | | | violates Section 9.2.1 | +-----------------------+---------------------------------+ | UNKNOWN_EVENT_TYPE | The event type is not accepted | | | by the receiver from this | | | partner | +-----------------------+---------------------------------+ Table 4: Standard J-MDN Error Codes 7.3.5. J-MDN Delivery Protocol The J-MDN is delivered via HTTP POST: POST {receipt_webhook} HTTP/1.1 Host: {sender_host} Content-Type: application/json X-FideX-Original-Message-ID: {original_message_id} {J-MDN JSON body} Expected response: { "receipt_acknowledged": true } Timing requirements: Munoz Expires 7 June 2027 [Page 25] Internet-Draft FideX AS5 Protocol December 2026 * Receivers SHOULD send J-MDN within 5 minutes of receiving the original message. * If processing takes longer, the J-MDN MUST still be sent when processing completes. * There is no strict upper time limit; delivery is asynchronous by design. 7.3.6. J-MDN Delivery Retry Schedule If the J-MDN delivery endpoint is unreachable, the receiver SHOULD retry according to the following schedule: * Attempt 1: Immediate * Attempt 2: +1 minute * Attempt 3: +5 minutes * Attempt 4: +15 minutes * Attempt 5: +1 hour After 5 failed attempts, the receiver SHOULD log the failure and store the J-MDN for manual retrieval. The J-MDN MUST NOT be discarded. 7.4. Sender Retry Semantics Senders SHOULD retry failed transmissions with exponential backoff: * Attempt 1: Immediate * Attempt 2: +1 minute * Attempt 3: +5 minutes * Attempt 4: +15 minutes * Attempt 5: +30 minutes * Attempt 6: +1 hour After 5-6 failed attempts, the message SHOULD transition to FAILED state requiring manual operator intervention. Munoz Expires 7 June 2027 [Page 26] Internet-Draft FideX AS5 Protocol December 2026 7.5. Evidence Delivery to Non-FideX Participants A business participant need not operate a FideX node to obtain evidence about its transactions. For example, a pharmaceutical distributor without FideX support can receive transaction evidence through email, a management portal, or an HTTPS webhook. A FideX node or application gateway MAY provide this capability. When it serves a non-FideX participant, it MUST provide at least one evidence delivery or retrieval channel agreed with that participant. Support for all three channels is not required. This capability distributes evidence already held by the node and records additional channel events. It does not change the J-MDN wire format or require the non-FideX participant to implement JOSE. Business document delivery over a non-FideX channel is a separate application function; delivering evidence alone does not establish delivery of that document. 7.5.1. Evidence Content and Attribution Evidence made available through these channels MUST identify the original transaction or FideX message, the business parties, the evidence issuer, the observed event and its timestamp, and the relevant document digest when available. Each digest MUST identify its algorithm and the bytes it covers, such as the business payload or encrypted envelope. If no digest is available, that limitation MUST be explicit. When the evidence includes a J-MDN, the service MUST retain the original signed artifact and make it retrievable by the authorized participant. A human-readable rendering MUST identify the signer, verification result, and whether the asserted event concerns the FideX node, an intermediary, or the ultimate business recipient. Channel event records MUST identify their source and be correlated with the original evidence. A gateway's own observation MUST NOT be represented as a statement signed by the non-FideX participant. 7.5.2. Delivery Channels * *Email:* The service MAY send an evidence summary, an authorized attachment, or a link to retrieve the evidence. Acceptance by an email service MUST be recorded as a channel event, not as proof that the business recipient read or accepted the document. Munoz Expires 7 June 2027 [Page 27] Internet-Draft FideX AS5 Protocol December 2026 * *Management portal:* The service MAY expose a transaction history, evidence downloads, and explicit acknowledgment actions. It MUST distinguish evidence availability, authenticated access, and an explicit acknowledgment, recording the actor and timestamp for the latter two events. * *HTTPS webhook:* The service MAY notify an endpoint authorized by the participant. Notifications MUST be authenticated under the agreed channel mechanism and carry a stable event identifier and transaction correlation identifier. Retries MUST retain the event identifier so consumers can process them idempotently. An HTTP success response establishes endpoint acceptance only, unless an explicit application acknowledgment is separately defined and verified. Notifications that report the life cycle of a FideX message SHOULD be expressed as the Protocol Events of Section 9.4, in which case the CloudEvents source and id attributes together form the stable event identifier and the subject attribute carries the transaction correlation identifier. Destinations and access rights MUST be established through authorized participant configuration, not accepted solely from an inbound message's routing header. The service MUST restrict evidence access to authorized parties and protect confidential content in transit. Retrieval links MUST use HTTPS and enforce authorization; possession of a transaction identifier alone MUST NOT grant access. Delivery failures MUST be recorded, and the evidence MUST remain available for authorized retrieval under the agreed retention policy. Retrying a notification MUST NOT reprocess the original business document. 7.5.3. Relationship to FideX Receipts Notification delivery, portal access, and application acknowledgment MUST be recorded separately from the FideX message state. These events MUST NOT by themselves transition a FideX message to DELIVERED; that transition requires the verified positive J-MDN described in Section 7.1. If an intermediary is the FideX receiver, its J-MDN establishes the intermediary's disposition, not an acknowledgment by the ultimate non-FideX recipient. Any downstream acknowledgment MUST identify its actor, authentication method, scope, and original transaction. Email templates, portal interfaces, and downstream business acceptance workflows are outside this specification. Webhook payloads are outside this specification except for the Protocol Events defined in Section 9.4. All of them MUST preserve the evidence attribution and event distinctions above. Munoz Expires 7 June 2027 [Page 28] Internet-Draft FideX AS5 Protocol December 2026 8. Error Handling 8.1. HTTP Status Codes +======+===========================+================================+ | Code | Meaning | Sender Action | +======+===========================+================================+ | 202 | Accepted for processing | Wait for J-MDN | +------+---------------------------+--------------------------------+ | 400 | Invalid message structure | Do not retry (permanent | | | | error) | +------+---------------------------+--------------------------------+ | 401 | Authentication failed or | Do not retry (permanent | | | partner INACTIVE | error) | +------+---------------------------+--------------------------------+ | 413 | Payload too large | Do not retry (permanent | | | | error) | +------+---------------------------+--------------------------------+ | 429 | Rate limit exceeded | Retry with backoff; | | | | honor Retry-After header | +------+---------------------------+--------------------------------+ | 500 | Server internal error | Retry with backoff | +------+---------------------------+--------------------------------+ | 503 | Service unavailable or | Retry with backoff | | | partner SUSPENDED | | +------+---------------------------+--------------------------------+ Table 5: HTTP Status Code Semantics Implementations SHOULD include a Retry-After header on HTTP 429 responses, per [RFC9110] Section 10.2.3. 8.2. Error Response Format All error responses MUST use the following JSON structure: { "error": { "code": "INVALID_ROUTING_HEADER", "message": "Missing required field: message_id", "timestamp": "2026-03-09T19:00:00.000Z" } } 8.3. Standard Error Codes Message transmission errors: Munoz Expires 7 June 2027 [Page 29] Internet-Draft FideX AS5 Protocol December 2026 * INVALID_ROUTING_HEADER -- Missing or malformed routing header * UNKNOWN_RECEIVER -- receiver_id not recognized in partner registry * UNKNOWN_DOCUMENT_TYPE -- document_type not supported * PAYLOAD_TOO_LARGE -- Message exceeds the 10 MB size limit Cryptographic errors: * DECRYPTION_FAILED -- Cannot decrypt JWE * SIGNATURE_INVALID -- JWS signature verification failed * UNKNOWN_KEY_ID -- Key ID not found in JWKS Event errors (reported in the J-MDN error_log; see Section 9.2.3): * INVALID_EVENT -- Event Message payload is not a valid CloudEvent * UNKNOWN_EVENT_TYPE -- Event type not accepted from this partner Discovery errors: * INVALID_TOKEN -- Security token invalid or expired * DUPLICATE_REGISTRATION -- Partner already registered * CONFIG_UNREACHABLE -- Cannot fetch AS5 configuration 9. Events 9.1. Event Model The preceding sections describe the exchange of business documents. Trading partners also need to tell each other that something happened: a shipment left a warehouse, a payment was settled, a stock level changed, or a document reached a processing stage. Such a statement is an event. An event records an occurrence that has already taken place. Its producer does not address a request to the consumer and does not expect a reply. FideX does not define its own event structure. Events are CloudEvents as specified in [CloudEvents], version 1.0, serialized in the JSON Event Format [CE-JSON]. Implementations can therefore use existing CloudEvents libraries, brokers, and tools on either side of a FideX exchange. Munoz Expires 7 June 2027 [Page 30] Internet-Draft FideX AS5 Protocol December 2026 This document uses events in two ways: * *Event Messages* (Section 9.2): a partner sends a CloudEvent to another partner as the payload of a FideX message. The event is signed, encrypted, and receipted exactly like a business document. * *Protocol Events* (Section 9.4): a node reports the life cycle of FideX messages to authorized consumers, such as local applications or the webhook channel of Section 7.5. Event support is OPTIONAL and is not part of any conformance profile (see Appendix C). It does not change the message envelope, the cryptographic requirements, the J-MDN structure, or the protocol version: a node that supports events continues to use fidex_version "1.0". A node that does not support events handles an Event Message like any other message with an unsupported document_type (Section 3.3.3). This document does not define commands, that is, messages that request a partner to perform an action and that expect a correlated result. An event MUST NOT be interpreted as obliging its consumer to act. Any obligation to react to an event arises from agreement between the partners, not from this protocol. 9.2. Event Messages An Event Message is a FideX message whose routing header carries the document_type value CLOUDEVENTS_JSON. All requirements of Sections 2 through 8 apply to it without change. The JWS payload (Section 4.3) MUST be the UTF-8 encoding of exactly one CloudEvent serialized according to the JSON Event Format [CE-JSON], that is, the representation identified by the media type application/cloudevents+json. The JSON Batch Format MUST NOT be used: each event is carried in its own message so that each event has its own J-MDN. The complete CloudEvent, including its context attributes, is inside the encrypted payload. The cleartext routing header reveals only that the message carries an event. Senders SHOULD NOT copy event attributes into routing header extension fields. The routing header timestamp is the time of transmission and is subject to the validation window of Section 10.2. The event time attribute is the time of the occurrence and can be much earlier. Receivers MUST NOT apply the transmission window to the time attribute. Munoz Expires 7 June 2027 [Page 31] Internet-Draft FideX AS5 Protocol December 2026 9.2.1. Event Attributes The CloudEvent in an Event Message MUST satisfy [CloudEvents] and the following additional requirements: specversion (REQUIRED) MUST be "1.0". id (REQUIRED) A non-empty string. The producer MUST ensure that source and id together are unique for each distinct event. A UUID ([RFC9562]) is RECOMMENDED. A producer that sends the same event again, for example in a new FideX message after a failed delivery, MUST reuse the same source and id. source (REQUIRED) MUST be an absolute URI ([RFC3986]). It identifies the context, within the sending organization, in which the occurrence happened. It SHOULD be an https URI whose host is the sender's public_domain, or the sender's node identifier URN. type (REQUIRED) SHOULD be prefixed with the reverse-DNS name of the organization that defines the event type and SHOULD end with a version suffix, for example com.example.shipment.departed.v1. The prefix org.fidex-protocol. is reserved for event types defined by this document. time (REQUIRED in Event Messages; OPTIONAL in CloudEvents) Timestamp of the occurrence in the format of [RFC3339]. UTC ("Z") is RECOMMENDED. subject (OPTIONAL) SHOULD identify the business object the event concerns, such as an order or despatch advice number, when one exists. datacontenttype, dataschema (OPTIONAL) As defined in [CloudEvents]. When datacontenttype is absent, the event data is JSON. data, data_base64 (OPTIONAL) Event data, encoded as specified in [CE-JSON]. Receivers MUST accept events that contain extension attributes they do not recognize. Events SHOULD be compact. It is RECOMMENDED that a serialized event not exceed 64 kilobytes, the size that [CloudEvents] expects intermediaries to forward. Larger content SHOULD be sent as a business document and referenced from the event. The message size limit of Section 2.5 applies in all cases. Munoz Expires 7 June 2027 [Page 32] Internet-Draft FideX AS5 Protocol December 2026 9.2.2. FideX Extension Attributes This document defines the following CloudEvents extension attributes. Their names follow the CloudEvents attribute naming convention, and their values are of the CloudEvents type String. +===============+==================================+================+ | Attribute | Value | Use | +===============+==================================+================+ | fidexmsgid | The message_id of a FideX | OPTIONAL | | | message that the event refers to | in Event | | | | Messages | +---------------+----------------------------------+----------------+ | fidexsender | The sender_id of the FideX | Protocol | | | message that a Protocol Event | Events | | | describes | | +---------------+----------------------------------+----------------+ | fidexreceiver | The receiver_id of the FideX | Protocol | | | message that a Protocol Event | Events | | | describes | | +---------------+----------------------------------+----------------+ | fidexdoctype | The document_type of the FideX | Protocol | | | message that a Protocol Event | Events | | | describes | | +---------------+----------------------------------+----------------+ Table 6: FideX CloudEvents Extension Attributes The fidexmsgid attribute lets a producer relate a business event to a document previously exchanged over FideX, for example relating a "shipment departed" event to the message that carried the despatch advice. It identifies a message other than the Event Message that carries the event. 9.2.3. Receiver Processing A receiver that supports events processes an Event Message as follows: 1. Process the envelope as for any message: structural validation and synchronous response (Section 7.2), decryption, signature verification, and sender identity verification (Section 4). 2. Parse the JWS payload as a CloudEvent in the JSON Event Format and check the requirements of Section 9.2.1. On failure, send a negative J-MDN with error code INVALID_EVENT. Munoz Expires 7 June 2027 [Page 33] Internet-Draft FideX AS5 Protocol December 2026 3. Determine whether the event type is accepted from the authenticated sender. If it is not, send a negative J-MDN with error code UNKNOWN_EVENT_TYPE. A receiver MUST NOT report DELIVERED for an event that it discards because it does not accept its type. 4. Check for a duplicate. The event identity is the combination of the authenticated sender_id, source, and id. If the receiver has already accepted an event with the same identity, it MUST NOT make the event available to consumers again and SHOULD send a positive J-MDN. 5. Otherwise, make the event available to its consumers and send a positive J-MDN. Receivers MUST retain event identities for at least the replay cache period required by Section 10.2 and SHOULD retain them for as long as the partners agree that an event can be re-sent. The hash_verification value of the J-MDN is computed as specified in Section 7.3.2 over the JWS payload octets as received, that is, over the serialized CloudEvent. Receivers MUST NOT re-serialize the event before computing it. Delivery is at-least-once: a consumer can observe an event more than once after the receiver's duplicate records expire, so consumers SHOULD process events idempotently. FideX does not guarantee that Event Messages arrive in the order in which the occurrences happened. A producer whose consumers need to reconstruct an order has to convey it in the event, for example through time or through a sequence value carried in the event data or in an agreed extension attribute. 9.2.4. Meaning of Receipts for Events A positive J-MDN for an Event Message proves that the receiver decrypted the payload, verified the sender's signature, validated the payload as a CloudEvent, and accepted the event for handling. It does not prove that any consumer acted on the event, nor that the receiver agrees that the occurrence took place as stated. The signed event is evidence that the sender asserted the occurrence. Events complement business documents. Where agreement or regulation requires a specific business document, such as an invoice, an event that announces it does not replace that document. Munoz Expires 7 June 2027 [Page 34] Internet-Draft FideX AS5 Protocol December 2026 A partner that reacts to an event does so by sending its own business document or its own event. The reaction can reference the FideX message that carried the original event through the fidexmsgid attribute. 9.3. Discovery of Event Support A node that accepts Event Messages MUST list CLOUDEVENTS_JSON in the supported_document_types array of its AS5 configuration (Section 6.2). It MAY also publish an events object: { "supported_document_types": [ "GS1_ORDER_JSON", "CLOUDEVENTS_JSON" ], "events": { "accepted_types": [ "com.example.shipment.departed.v1", "com.example.payment.settled.v1" ], "published_types": [ "com.example.stock.level-changed.v1" ] } } accepted_types (array of strings, OPTIONAL) The CloudEvents type values that the node accepts in Event Messages. When absent, the accepted types are established by agreement between the partners. published_types (array of strings, OPTIONAL) The CloudEvents type values that the node is able to send. This member is informational: listing a type does not oblige the node to send those events to any particular partner. A sender SHOULD NOT transmit an Event Message to a partner whose AS5 configuration does not list CLOUDEVENTS_JSON, unless the partners have agreed otherwise. When the receiver's configuration contains events.accepted_types, the sender SHOULD NOT transmit an event whose type is not listed. A receiver MAY accept from a given partner a narrower set of types than it advertises. Which events a node sends to which partner is established by agreement between the partners. This document does not define a subscription interface. Munoz Expires 7 June 2027 [Page 35] Internet-Draft FideX AS5 Protocol December 2026 9.4. Protocol Events A node MAY emit Protocol Events to report the life cycle of the FideX messages it sends or receives. Protocol Events let applications and authorized external consumers follow a transaction without polling the node and without implementing JOSE. 9.4.1. Event Types The following Protocol Event types are defined: org.fidex-protocol.message.sent.v1 Emitted by the sender. The receiver accepted the transmission with HTTP 202; the message is in state SENT. org.fidex-protocol.message.delivered.v1 Emitted by the sender. A positive J-MDN was received, verified, and matched; the message is in state DELIVERED. org.fidex-protocol.message.failed.v1 Emitted by the sender. The message reached state FAILED: a negative J-MDN was verified, a permanent error was returned, or retries were exhausted. org.fidex-protocol.message.received.v1 Emitted by the receiver. An inbound message was decrypted, its signature was verified, and it was accepted for processing. org.fidex-protocol.message.rejected.v1 Emitted by the receiver. An inbound message failed processing and a negative J-MDN was generated. org.fidex-protocol.receipt.undeliverable.v1 Emitted by the receiver. Delivery of a J-MDN failed after the retry schedule of Section 7.3.6; the J-MDN is stored. An incompatible change to the data of a Protocol Event type will be published under a new version suffix. Implementations MUST NOT define their own event types under the org.fidex-protocol. prefix. 9.4.2. Attributes and Data A Protocol Event is a CloudEvent with the following attributes: specversion (REQUIRED) MUST be "1.0". id (REQUIRED) Unique, together with source, for each distinct Munoz Expires 7 June 2027 [Page 36] Internet-Draft FideX AS5 Protocol December 2026 occurrence. Redeliveries of the same Protocol Event MUST keep the same id. source (REQUIRED) An absolute URI that identifies the emitting node. It SHOULD be https://{public_domain} of that node. type (REQUIRED) One of the types defined in Section 9.4.1. time (REQUIRED) The time of the occurrence, for example of the state transition, in the format of [RFC3339]. subject (REQUIRED) The message_id of the FideX message. fidexsender, fidexreceiver, fidexdoctype (REQUIRED) The sender_id, receiver_id, and document_type from the routing header of the FideX message (Section 9.2.2). datacontenttype (OPTIONAL) When present, MUST be "application/json". The event data is a JSON object with the following members: message_state (string, OPTIONAL) The protocol state of the message (Section 7.1) after the occurrence, in events emitted by the sender. hash_verification (string, OPTIONAL) The digest defined in Section 7.3.2, when known to the emitter. jmdn (object, OPTIONAL) The complete J-MDN that was verified (events emitted by the sender) or generated (events emitted by the receiver), unmodified and including its signature member. It lets a consumer retain and verify the original signed evidence (Section 7.5.1). error (object) REQUIRED in message.failed, message.rejected, and receipt.undeliverable events; MUST NOT be present otherwise. It contains error_code (string, REQUIRED) and error_message (string, REQUIRED). The error_code is a code from Section 7.3.4 or Section 8.3 when one applies, and an implementation-defined code otherwise. The event data MUST NOT contain the business document, any part of its content, or key material. Consumers MUST ignore members they do not recognize. Example: Munoz Expires 7 June 2027 [Page 37] Internet-Draft FideX AS5 Protocol December 2026 { "specversion": "1.0", "id": "c2f6a4de-0b7e-4d41-8a55-3f1f0d9a6e02", "source": "https://fidex.example.com", "type": "org.fidex-protocol.message.delivered.v1", "time": "2026-03-09T19:30:03.250Z", "subject": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "datacontenttype": "application/json", "fidexsender": "urn:gln:1234567890123", "fidexreceiver": "urn:gln:9876543210987", "fidexdoctype": "GS1_ORDER_JSON", "data": { "message_state": "DELIVERED", "hash_verification": "sha256:9f86d08...b0f00a08", "jmdn": { "original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "DELIVERED", "receiver_id": "urn:gln:9876543210987", "hash_verification": "sha256:9f86d08...b0f00a08", "timestamp": "2026-03-09T19:30:02.000Z", "error_log": null, "signature": "eyJhbGciOiJSUzI1NiIs..." } } } 9.4.3. Delivery of Protocol Events Delivery to the node's own applications is an implementation matter. When a Protocol Event is delivered to an HTTPS endpoint, including the webhook channel of Section 7.5.2, the node SHOULD use the HTTP Protocol Binding for CloudEvents [CE-HTTP] in structured content mode: an HTTP POST request whose Content-Type is application/ cloudevents+json and whose body is the event. The destination, authentication, and authorization requirements of Section 7.5.2 apply. A successful HTTP response establishes endpoint acceptance only. Nodes MAY additionally implement the delivery and abuse- protection conventions of [CE-WEBHOOK]. By agreement, a node MAY send Protocol Events to a partner as Event Messages (Section 9.2). In that case: * A Protocol Event is not a receipt. Its recipient MUST NOT change the state of a FideX message because of it; only a verified J-MDN does so (Section 7.1). Munoz Expires 7 June 2027 [Page 38] Internet-Draft FideX AS5 Protocol December 2026 * The receiver MUST verify that the authenticated sender of the Event Message is the party identified by fidexsender or by fidexreceiver. Otherwise it MUST send a negative J-MDN with error code INVALID_EVENT. * To prevent notification loops, a node MUST NOT send a partner Protocol Events about Event Messages whose payload is itself a Protocol Event. 10. Security Considerations 10.1. Threat Model FideX addresses the following threats: Man-in-the-Middle (MitM) Mitigated by TLS 1.3 transport encryption combined with JWE application-layer encryption. An attacker who intercepts the TLS session cannot read the encrypted payload. Message Tampering Mitigated by JWS digital signatures. Any modification to the signed payload invalidates the signature, detected during verification. Replay Attacks Mitigated by unique message IDs combined with timestamp validation. Receivers MUST maintain a replay cache and reject duplicate message_id values. Repudiation Mitigated by cryptographic signatures on both messages (JWS) and receipts (J-MDN signature), creating a legally auditable chain of custody. Key Compromise Mitigated by key rotation procedures and JWKS-based distribution. Compromised keys can be revoked by removing them from the JWKS. Cross-Partner Key Substitution Mitigated by sender identity verification (Section 4.4): the receiver verifies the signing key belongs to the claimed sender_id. 10.2. Implementation Security Requirements Implementations MUST: * Validate TLS certificates against a trusted CA store on all outbound connections. * Use constant-time comparison for signature verification to prevent timing attacks. Munoz Expires 7 June 2027 [Page 39] Internet-Draft FideX AS5 Protocol December 2026 * Maintain a cache of recently seen message IDs to detect replay attacks. * Reject messages with timestamps outside a +/-15-minute window of current time. * Maintain the message ID replay cache for at least 24 hours. * Synchronize system clocks using NTP ([RFC5905]) or equivalent. * Generate cryptographically secure random message IDs using a CSPRNG. * Never expose private keys in logs, error messages, or API responses. Implementations SHOULD: * Implement per-partner rate limiting on all endpoints. * Use separate key pairs for signing and encryption (different use values). * Rotate keys annually following the procedure in Section 5.3. * Monitor for anomalous patterns (repeated authentication failures, invalid signatures). 10.3. Key Management Private keys: * MUST be generated using a cryptographically secure random number generator. * MUST be stored encrypted at rest. * MUST NOT be transmitted over any network. * SHOULD be stored in a Hardware Security Module (HSM) for high- security deployments. Public keys: * MUST be distributed exclusively via the JWKS endpoint. * SHOULD include a kid value encoding purpose and date (e.g., "org- sign-rsa-2026-01"). Munoz Expires 7 June 2027 [Page 40] Internet-Draft FideX AS5 Protocol December 2026 * MAY be cached by consuming parties for up to 24 hours. 10.4. Event Considerations Origin of events The authenticity of an event derives from the JWS signature and the sender identity verification of Section 4.4, not from its source or type attributes. Receivers MUST treat those attributes as claims made by the authenticated sender and MUST scope event identity to the sender_id (Section 9.2.3). Receivers SHOULD maintain, for each partner, the list of event types accepted from that partner, and SHOULD reject an event whose type implies an authority the sender does not have, such as a Protocol Event about a message to which the sender is not a party. Automated reactions Events commonly trigger automated processing. Receivers SHOULD validate event data against the schema agreed for its type before making the event available to consumers, and SHOULD subject the resulting actions to the same authorization as actions triggered by business documents. Replay and duplication A valid Event Message cannot be created without the sender's signing key. The replay of a captured envelope is detected through the message_id replay cache (Section 10.2). An event re- sent by its producer in a new message is detected through the event identity (Section 9.2.3). Asserted time The time attribute is asserted by the producer and is not verified by the protocol. A consumer that relies on it for contractual or regulatory deadlines can corroborate it with the routing header timestamp and with the J-MDN timestamp. Confidentiality outside the envelope Between partners, the complete event is encrypted. When a node forwards an event to webhooks, brokers, or logs, its context attributes commonly become visible to intermediaries. As recommended by [CloudEvents], sensitive information SHOULD NOT be placed in context attributes, including subject and extension attributes. Disclosure through Protocol Events Protocol Events reveal trading relationships, document types, and timing, and can embed signed receipts. They MUST be delivered only to consumers authorized for the transaction, under the access rules of Section 7.5.2. Munoz Expires 7 June 2027 [Page 41] Internet-Draft FideX AS5 Protocol December 2026 Volume Events can be small and numerous. The rate limiting recommended above applies to Event Messages, and receivers MAY respond with HTTP 429 as described in Section 8.1. 10.5. Compliance Considerations FideX is designed to support compliance with: * Non-repudiation requirements for legally binding electronic transactions. * FDA 21 CFR Part 11 (electronic signatures in regulated industries). * GDPR and similar data protection frameworks (via encrypted payloads). * GS1 and UN/CEFACT EDI standards (via payload-agnostic design). Recommended audit trail retention periods: * Message metadata: 7 years * Cryptographic signatures (JWS): 7 years * J-MDN receipts: 7 years 10.6. Deployment Note FideX is designed to operate on standard web infrastructure. A conforming node can be implemented as a standard HTTPS web application behind any reverse proxy (Nginx, Apache, Caddy, cloud load balancers). No specialized B2B middleware, message broker, or gateway software is required. This is a key differentiator from AS2 (which required dedicated gateway software) and AS4 (which required SOAP stacks and ebMS processing engines). 11. IANA Considerations This document has no IANA actions. The media type application/ cloudevents+json referenced in Section 9 is defined by [CE-JSON] and is not registered by this document. 12. References 12.1. Normative References Munoz Expires 7 June 2027 [Page 42] Internet-Draft FideX AS5 Protocol December 2026 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) Extensions: Extension Definitions", RFC 6066, DOI 10.17487/RFC6066, January 2011, . [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 2015, . [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", RFC 7516, DOI 10.17487/RFC7516, May 2015, . [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, DOI 10.17487/RFC7517, May 2015, . [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, May 2015, . [RFC9562] Davis, K., Peabody, B., and P. Leach, "Universally Unique IDentifiers (UUIDs)", RFC 9562, DOI 10.17487/RFC9562, May 2024, . [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, . [RFC9110] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, June 2022, . Munoz Expires 7 June 2027 [Page 43] Internet-Draft FideX AS5 Protocol December 2026 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, . [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, . [CloudEvents] Cloud Native Computing Foundation, "CloudEvents - Version 1.0.2", February 2022, . [CE-JSON] Cloud Native Computing Foundation, "JSON Event Format for CloudEvents - Version 1.0.2", February 2022, . 12.2. Informative References [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, . [RFC4130] Moberg, D. and R. Drummond, "MIME-Based Secure Peer-to- Peer Business Data Interchange Using HTTP, Applicability Statement 2 (AS2)", RFC 4130, DOI 10.17487/RFC4130, July 2005, . [RFC9113] Thomson, M., Ed. and C. Benfield, Ed., "HTTP/2", RFC 9113, DOI 10.17487/RFC9113, June 2022, . [RFC9114] Bishop, M., Ed., "HTTP/3", RFC 9114, DOI 10.17487/RFC9114, June 2022, . [OASIS-ebMS] OASIS, "OASIS ebXML Messaging Services Version 3.0: Part 1, Core Features", October 2007, . [GS1-JSON] GS1, "GS1 Web Vocabulary", 2023, . Munoz Expires 7 June 2027 [Page 44] Internet-Draft FideX AS5 Protocol December 2026 [CE-HTTP] Cloud Native Computing Foundation, "HTTP Protocol Binding for CloudEvents - Version 1.0.2", February 2022, . [CE-WEBHOOK] Cloud Native Computing Foundation, "HTTP 1.1 Web Hooks for Event Delivery - Version 1.0.2", February 2022, . Appendix A: Complete Message Example The following illustrates a complete FideX message exchange. HTTP request (sender to receiver): POST /api/v1/receive HTTP/1.1 Host: partner.example.com Content-Type: application/json { "routing_header": { "fidex_version": "1.0", "message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "sender_id": "urn:gln:1234567890123", "receiver_id": "urn:gln:9876543210987", "document_type": "GS1_ORDER_JSON", "timestamp": "2026-03-09T19:30:00.000Z", "receipt_webhook": "https://sender.example.com/api/v1/receipt" }, "encrypted_payload": "eyJhbGciOiJSU0EtT0FFUCIs..." } HTTP 202 response (receiver accepts): { "status": "accepted", "message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "timestamp": "2026-03-09T19:30:00.500Z" } J-MDN receipt (receiver delivers to sender's webhook): Munoz Expires 7 June 2027 [Page 45] Internet-Draft FideX AS5 Protocol December 2026 POST /api/v1/receipt HTTP/1.1 Host: sender.example.com Content-Type: application/json X-FideX-Original-Message-ID: fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890 { "original_message_id": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "DELIVERED", "receiver_id": "urn:gln:9876543210987", "hash_verification": "sha256:9f86d08...b0f00a08", "timestamp": "2026-03-09T19:30:02.000Z", "error_log": null, "signature": "eyJhbGciOiJSUzI1NiIs..." } Event Message example (Section 9.2). The routing header identifies the payload as an event: { "fidex_version": "1.0", "message_id": "fdx-7c9e6679-7425-40de-944b-e07fc1f90ae7", "sender_id": "urn:gln:1234567890123", "receiver_id": "urn:gln:9876543210987", "document_type": "CLOUDEVENTS_JSON", "timestamp": "2026-03-10T08:15:00.000Z" } The CloudEvent below is the JWS payload before signing. It relates a shipment departure to the FideX message that carried the despatch advice: { "specversion": "1.0", "id": "5f0c1e5e-7a3b-4c57-9d0e-2b6a8f1c9d11", "source": "https://fidex.example.com/warehouse/01", "type": "com.example.shipment.departed.v1", "time": "2026-03-10T08:14:52Z", "subject": "DA-2026-004512", "datacontenttype": "application/json", "fidexmsgid": "fdx-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "data": { "despatch_advice": "DA-2026-004512", "carrier": "Example Logistics", "estimated_arrival": "2026-03-11T16:00:00Z" } } Munoz Expires 7 June 2027 [Page 46] Internet-Draft FideX AS5 Protocol December 2026 Appendix B: Glossary AS5 Application Statement 5 -- the formal designation of the FideX protocol. B2B Business-to-Business electronic commerce. CloudEvent An event expressed according to the CNCF CloudEvents specification. CNCF Cloud Native Computing Foundation. CSPRNG Cryptographically Secure Pseudo-Random Number Generator. EDI Electronic Data Interchange. GLN Global Location Number -- GS1 standard organization identifier. HSM Hardware Security Module -- tamper-resistant hardware for key storage. J-MDN JSON Message Disposition Notification -- the FideX signed delivery receipt. JOSE JSON Object Signing and Encryption -- the IETF framework comprising JWS, JWE, JWK, and JWA. JWE JSON Web Encryption (RFC 7516). JWK JSON Web Key (RFC 7517). JWKS JSON Web Key Set -- a JSON document containing a set of public keys. JWS JSON Web Signature (RFC 7515). Node A FideX-compliant server capable of sending and receiving messages. URN Uniform Resource Name -- a persistent, location-independent identifier. Appendix C: Conformance Profiles FideX defines three conformance profiles to enable progressive adoption. Implementations MUST declare which profile(s) they conform to via the conformance_profile field in their AS5 configuration. Munoz Expires 7 June 2027 [Page 47] Internet-Draft FideX AS5 Protocol December 2026 Core conformance includes signed J-MDN generation, delivery, and verification, as well as the mandatory security requirements of this document. A test suite that omits these checks establishes only partial implementation coverage; it does not establish Core conformance. C.1 FideX Core An implementation claiming *FideX Core* conformance MUST support all requirements listed in Sections 2 through 8 of this specification, including: * HTTP/1.1 over TLS 1.3 * Sign-then-encrypt: JWE(JWS(payload)) * RS256 signatures; RSA-OAEP + A256GCM encryption * RSA key size >= 2048 bits * JWKS endpoint at /.well-known/jwks.json * AS5 configuration endpoint * 4-phase discovery handshake * Message state machine (QUEUED, SENT, DELIVERED, FAILED) * J-MDN generation, signing, and delivery * J-MDN fallback delivery via AS5 config receive_receipt endpoint * Standard error codes and HTTP status codes * Replay detection via message_id cache (>= 24 hours) * Timestamp validation (+/-15-minute window) C.2 FideX Enhanced An implementation claiming *FideX Enhanced* conformance MUST satisfy FideX Core AND additionally support: * HTTP/2 for multiplexed connections * Separate signing and encryption key pairs (different kid and use values) Munoz Expires 7 June 2027 [Page 48] Internet-Draft FideX AS5 Protocol December 2026 * RSA key size >= 4096 bits * Key rotation support (overlapping key publication) * J-MDN delivery retry per the schedule in Section 7.3.6 * Per-partner rate limiting on all endpoints * Structured JSON logging with security event correlation IDs * Health endpoints (/health and /ready) C.3 FideX Edge An implementation claiming *FideX Edge* conformance MUST satisfy FideX Enhanced AND additionally support: * HTTP/3 over QUIC for connection resilience * Mutual TLS (mTLS) -- client certificate authentication * HSM-based private key storage C.4 Events (Optional Capability) Event support is an optional capability that is independent of the three profiles above. It is advertised through the AS5 configuration (Section 9.3), not through the conformance_profile field. An implementation that claims event support MUST satisfy FideX Core AND additionally: * Carry exactly one CloudEvent in the JSON Event Format in each CLOUDEVENTS_JSON message it sends * Meet the attribute requirements of Section 9.2.1 in events it produces, and enforce them on events it receives * Process received Event Messages as specified in Section 9.2.3, including the INVALID_EVENT and UNKNOWN_EVENT_TYPE negative receipts and duplicate detection by sender, source, and id * List CLOUDEVENTS_JSON in supported_document_types when it accepts Event Messages Emitting Protocol Events is a further option. An implementation that emits them MUST use the types, attributes, and data of Section 9.4. Munoz Expires 7 June 2027 [Page 49] Internet-Draft FideX AS5 Protocol December 2026 Appendix D: Interoperability Test Vectors This appendix provides known-answer test vectors to allow implementers to verify their JOSE cryptographic operations produce correct output. *WARNING:* The key material in this appendix is public and MUST NOT be used for any production traffic. Test payload (UTF-8 bytes): {"order_id":"PO-TEST-001","amount":100.00,"currency":"USD"} SHA-256 hash of test payload: sha256: bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f9a69e4c98b7b0f09cb281e71 Expected JWS header for signing: {"alg":"RS256","kid":"test-sign-2026-01"} Expected JWE header for encryption: { "alg": "RSA-OAEP", "enc": "A256GCM", "cty": "JWT", "kid": "test-enc-2026-01" } Test routing header: { "fidex_version": "1.0", "message_id": "fdx-00000000-0000-0000-0000-000000000001", "sender_id": "urn:gln:0000000000001", "receiver_id": "urn:gln:0000000000002", "document_type": "GS1_ORDER_JSON", "timestamp": "2026-01-01T00:00:00.000Z", "receipt_webhook": "https://test.sender.example.com/receipt" } Verification procedure: 1. *Sign Test:* Sign the test payload using RS256. Verify using the test public key. Verified payload MUST match original. Munoz Expires 7 June 2027 [Page 50] Internet-Draft FideX AS5 Protocol December 2026 2. *Encrypt Test:* Encrypt the JWS using RSA-OAEP/A256GCM. Decrypt using the test private key. Decrypted content MUST match the JWS. 3. *Hash Test:* Compute SHA-256 of the raw payload bytes. Result MUST equal bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f9a69e4c98b7b0f09cb281e71. 4. *Round-Trip Test:* Construct a complete envelope, parse it, decrypt, verify signature, and extract payload. Result MUST match original test payload. 5. *J-MDN Test:* Construct a J-MDN for the test message. Sign with receiver's key. Verify the J-MDN signature. Appendix E: JSON Schema Definitions The following JSON Schema (Draft-07) definitions provide machine- readable validation rules for FideX structures. E.1 Routing Header Schema Munoz Expires 7 June 2027 [Page 51] Internet-Draft FideX AS5 Protocol December 2026 { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://fidex-protocol.org/schemas/v1/routing-header.json", "title": "FideX Routing Header", "type": "object", "required": [ "fidex_version", "message_id", "sender_id", "receiver_id", "document_type", "timestamp" ], "additionalProperties": true, "properties": { "fidex_version": { "type": "string", "pattern": "^\\d+\\.\\d+$" }, "message_id": { "type": "string", "minLength": 1, "maxLength": 256 }, "sender_id": { "type": "string", "pattern": "^urn:(gln|duns|lei|tin|custom):.+$" }, "receiver_id": { "type": "string", "pattern": "^urn:(gln|duns|lei|tin|custom):.+$" }, "document_type": { "type": "string", "pattern": "^[A-Z0-9_]+$", "minLength": 1, "maxLength": 128 }, "timestamp": { "type": "string", "format": "date-time" }, "receipt_webhook": { "type": "string", "format": "uri", "pattern": "^https://" }, "payload_digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } }, "patternProperties": { "^x-": {} } } E.2 J-MDN Schema Munoz Expires 7 June 2027 [Page 52] Internet-Draft FideX AS5 Protocol December 2026 { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://fidex-protocol.org/schemas/v1/jmdn.json", "title": "FideX J-MDN", "type": "object", "required": [ "original_message_id", "status", "receiver_id", "hash_verification", "timestamp", "error_log", "signature" ], "additionalProperties": false, "properties": { "original_message_id": { "type": "string", "minLength": 1 }, "status": { "type": "string", "enum": ["DELIVERED", "FAILED"] }, "receiver_id": { "type": "string", "pattern": "^urn:(gln|duns|lei|tin|custom):.+$" }, "hash_verification": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "timestamp": { "type": "string", "format": "date-time" }, "error_log": { "oneOf": [ { "type": "null" }, { "type": "object", "required": ["error_code", "error_message"], "properties": { "error_code": { "type": "string", "enum": [ "DECRYPTION_FAILED", "SIGNATURE_INVALID", "UNKNOWN_DOCUMENT_TYPE", "PAYLOAD_TOO_LARGE", "INTERNAL_ERROR", "INVALID_EVENT", "UNKNOWN_EVENT_TYPE" ] }, "error_message": { "type": "string" }, "details": { "type": "string" } } } ] Munoz Expires 7 June 2027 [Page 53] Internet-Draft FideX AS5 Protocol December 2026 }, "signature": { "type": "string", "minLength": 1 } } } E.3 AS5 Configuration Schema { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://fidex-protocol.org/schemas/v1/as5-config.json", "title": "FideX AS5 Configuration", "type": "object", "required": [ "fidex_version", "supported_versions", "node_id", "organization_name", "public_domain", "endpoints", "security" ], "properties": { "fidex_version": { "type": "string", "pattern": "^\\d+\\.\\d+$" }, "supported_versions": { "type": "array", "items": { "type": "string" }, "minItems": 1 }, "conformance_profile": { "type": "string", "enum": ["core", "enhanced", "edge"] }, "node_id": { "type": "string", "pattern": "^urn:" }, "organization_name": { "type": "string", "minLength": 1 }, "public_domain": { "type": "string" }, "supported_document_types": { "type": "array", "items": { "type": "string", "pattern": "^[A-Z0-9_]+$" } }, "events": { "type": "object", "properties": { "accepted_types": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "published_types": { Munoz Expires 7 June 2027 [Page 54] Internet-Draft FideX AS5 Protocol December 2026 "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } } }, "endpoints": { "type": "object", "required": [ "receive_message", "receive_receipt", "register", "jwks" ], "properties": { "receive_message": { "type": "string", "format": "uri" }, "receive_receipt": { "type": "string", "format": "uri" }, "register": { "type": "string", "format": "uri" }, "jwks": { "type": "string", "format": "uri" } } }, "security": { "type": "object", "required": [ "signature_algorithm", "encryption_algorithm", "content_encryption", "minimum_key_size" ], "properties": { "signature_algorithm": { "type": "string" }, "encryption_algorithm": { "type": "string", "minLength": 1 }, "supported_encryption_algorithms": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true }, "content_encryption": { "type": "string" }, "minimum_key_size": { "type": "integer", "minimum": 2048 } } } } } E.4 Event Message Payload Schema This schema expresses the additional requirements of Section 9.2.1. It does not replace validation against [CloudEvents]. Munoz Expires 7 June 2027 [Page 55] Internet-Draft FideX AS5 Protocol December 2026 { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://fidex-protocol.org/schemas/v1/event.json", "title": "FideX Event Message Payload (CloudEvent)", "type": "object", "required": ["specversion", "id", "source", "type", "time"], "additionalProperties": true, "properties": { "specversion": { "const": "1.0" }, "id": { "type": "string", "minLength": 1 }, "source": { "type": "string", "format": "uri", "minLength": 1 }, "type": { "type": "string", "minLength": 1 }, "time": { "type": "string", "format": "date-time" }, "subject": { "type": "string", "minLength": 1 }, "datacontenttype": { "type": "string", "minLength": 1 }, "dataschema": { "type": "string", "format": "uri", "minLength": 1 }, "data_base64": { "type": "string" }, "fidexmsgid": { "type": "string", "minLength": 1 }, "fidexsender": { "type": "string", "pattern": "^urn:(gln|duns|lei|tin|custom):.+$" }, "fidexreceiver": { "type": "string", "pattern": "^urn:(gln|duns|lei|tin|custom):.+$" }, "fidexdoctype": { "type": "string", "pattern": "^[A-Z0-9_]+$" } } } Appendix F: Implementation Plans and Interoperability This appendix is informative and records development plans, not claims of implementation availability or demonstrated conformance. Full Java and C#/.NET implementations are planned to broaden deployment options and provide additional independent interoperability coverage. Language examples alone do not constitute a complete protocol implementation. Each implementation is intended to support the complete Core profile, including discovery and registration, JOSE message exchange, signed J-MDN generation and verification, algorithm negotiation, retry Munoz Expires 7 June 2027 [Page 56] Internet-Draft FideX AS5 Protocol December 2026 handling, and the mandatory security requirements. Evidence delivery to non-FideX participants can be provided through the application integration described in Section 7.5. Interoperability evaluation is planned in both directions between Java, C#/.NET, Go, and PHP implementations, using shared positive and negative test vectors. Results should identify the exact draft revision, software versions, tested capabilities, and known limitations. No Java or C#/.NET implementation or successful interoperability result is asserted by this document at the time of this revision. The event capability of Section 9 is specified in this revision. No implementation of it, and no interoperability result for it, is asserted by this document. Appendix G: Changes from Revision -01 * Added Section 9 (Events): an optional capability to exchange events represented as CloudEvents 1.0, as Event Messages between partners and as Protocol Events about the message life cycle. * Added the standard document type CLOUDEVENTS_JSON and reserved the CLOUDEVENTS_ prefix. * Added the optional events object to the AS5 configuration and to its schema. * Added the J-MDN error codes INVALID_EVENT and UNKNOWN_EVENT_TYPE. * Aligned the webhook channel for non-FideX participants with Protocol Events and the CloudEvents HTTP binding. * Added security considerations for events, an optional conformance capability (C.4), an Event Message example, and a payload schema (E.4). * Added references to CloudEvents, RFC 3339, and RFC 3986. * No change to the message envelope, the cryptographic requirements, the J-MDN structure, or the protocol version. Commands (request/ response messages) are not defined. Author's Address Javier Munoz Greicodex Software Email: javier@greicodex.com Munoz Expires 7 June 2027 [Page 57] Internet-Draft FideX AS5 Protocol December 2026 URI: https://greicodex.com Munoz Expires 7 June 2027 [Page 58]