Path: redb-route/redb.Route.As4/As4Headers.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.As4/As4Headers.cs
----
namespace redb.Route.As4;
///
/// Exchange header names of the AS4 connector. Everything is under : AS4 carries its
/// business metadata inside eb:Messaging, not in HTTP headers, so there is no verbatim wire plane to
/// mirror.
///
/// Canonical planes (one source of truth per value, consumer and producer agree):
///
/// - HTTP — transport only; not copied onto the exchange, except the caller's
/// address () and traceparent (into the span).
/// - SOAP header — wsse:Security is consumed by the connector; its outcome
/// is and .
/// - eb:Messaging — the main plane: …
/// . On send, only these names are read, by an explicit list; nothing else from the
/// exchange reaches the partner's archive.
/// - eb:MessageProperties — + property name,
/// both ways.
/// - MIME part — per-payload properties travel on the payload object; the
/// exchange's Message.ContentType is the original (decompressed) MimeType.
///
///
///
public static class As4Headers
{
/// Prefix of every AS4 header on the exchange.
public const string Prefix = "redbAs4.";
// ── eb:Messaging plane ───────────────────────────────────────────────────
/// eb:MessageInfo/eb:MessageId. Set by the producer before the first attempt, so a redelivery resends the same id.
public const string MessageId = Prefix + "messageId";
/// eb:MessageInfo/eb:RefToMessageId.
public const string RefToMessageId = Prefix + "refToMessageId";
/// eb:MessageInfo/eb:Timestamp of a received message.
public const string Timestamp = Prefix + "timestamp";
/// eb:CollaborationInfo/eb:ConversationId.
public const string ConversationId = Prefix + "conversationId";
/// Sender eb:PartyId.
public const string FromPartyId = Prefix + "fromPartyId";
/// Sender eb:PartyId/@type.
public const string FromPartyIdType = Prefix + "fromPartyIdType";
/// Sender eb:Role.
public const string FromRole = Prefix + "fromRole";
/// Recipient eb:PartyId.
public const string ToPartyId = Prefix + "toPartyId";
/// Recipient eb:PartyId/@type.
public const string ToPartyIdType = Prefix + "toPartyIdType";
/// Recipient eb:Role.
public const string ToRole = Prefix + "toRole";
/// eb:CollaborationInfo/eb:Service.
public const string Service = Prefix + "service";
/// eb:Service/@type.
public const string ServiceType = Prefix + "serviceType";
/// eb:CollaborationInfo/eb:Action.
public const string Action = Prefix + "action";
/// eb:CollaborationInfo/eb:AgreementRef.
public const string AgreementRef = Prefix + "agreementRef";
/// eb:AgreementRef/@pmode.
public const string PModeId = Prefix + "pmode";
// ── eb:MessageProperties plane ───────────────────────────────────────────
/// Prefix of message properties: redbAs4.property.originalSender is eb:Property[@name='originalSender'].
public const string PropertyPrefix = Prefix + "property.";
///
/// Prefix of the @type of a message property: redbAs4.propertyType.originalSender is the type
/// attribute of eb:Property[@name='originalSender']. Absent when the property has no type.
///
public const string PropertyTypePrefix = Prefix + "propertyType.";
/// The eDelivery four-corner originalSender property (mandatory unless the agreement says otherwise).
public const string OriginalSender = PropertyPrefix + "originalSender";
/// The eDelivery four-corner finalRecipient property (mandatory unless the agreement says otherwise).
public const string FinalRecipient = PropertyPrefix + "finalRecipient";
// ── Computed by the connector ────────────────────────────────────────────
/// Registry name of the partner the message was matched to (receive) or sent to (send).
public const string Partner = Prefix + "partner";
/// True when the signature was present and verified against the partner's certificate.
public const string SignatureValid = Prefix + "signatureValid";
/// Thumbprint of the certificate that signed the received message.
public const string SignerThumbprint = Prefix + "signerThumbprint";
/// Address of the peer that sent the request.
public const string RemoteAddress = Prefix + "remoteAddress";
/// Thumbprint of the TLS client certificate the partner presented (mutual TLS).
public const string ClientCertThumbprint = Prefix + "clientCertThumbprint";
/// Subject of the TLS client certificate.
public const string ClientCertSubject = Prefix + "clientCertSubject";
/// Expiry of the TLS client certificate, UTC, round-trip format.
public const string ClientCertNotAfter = Prefix + "clientCertNotAfter";
/// True when a receipt was received and verified, including its non-repudiation references (send).
public const string ReceiptValid = Prefix + "receiptValid";
/// eb:MessageId of the receipt signal (send).
public const string ReceiptMessageId = Prefix + "receiptMessageId";
/// True if is an AS4 connector header.
public static bool IsRedbHeader(string key) => key.StartsWith(Prefix, StringComparison.OrdinalIgnoreCase);
}