Class As4ConnectionFactory

Namespace: redb.Route.As4
Assembly: redb.Route.As4.dll

Our AS4 node: our party identity, our keys and the trading partners we
deal with. Registered once by name and referenced from endpoint URIs with connectionFactory=name,
so certificates and passwords never travel in a URI (which is the route key and ends up in logs, spans
and the dashboard).

context.AddToRegistry("node", new As4ConnectionFactory
{
OurPartyId = "...",
SigningCertificate = ourPfx,
DecryptionCertificates = { ourPfx },
Partners = { new As4Partner { Name = "acme", PartyId = "...", Service = "...", Action = "...",
PartnerSigningCertificates = { acmeCer }, PartnerEncryptionCertificate = acmeCer } },
});

In Route-XML the same node is a <bean> whose Partners property is a <list> of
<ref bean="…"/> or nested <bean> partners.

public sealed class As4ConnectionFactory

Inheritance

Object→As4ConnectionFactory

Properties

AllowedClientThumbprints

Thumbprints (comma-separated) an accepted client certificate must match, when the endpoint URI gives none.

public string? AllowedClientThumbprints { get; set; }

ClientCertificate

Our TLS client certificate for sending to partners that require mutual TLS; null for none.

public X509Certificate2? ClientCertificate { get; set; }

ClientCertificateMode

Whether the receive server asks partners for a TLS client certificate, when the endpoint URI does not say.

public As4ClientCertificateMode ClientCertificateMode { get; set; }

DecryptionCertificates

Our certificates with private keys that decrypt payloads partners encrypt for us. More than one while

public IList<X509Certificate2> DecryptionCertificates { get; set; }

ExternalHostName

Host part of the message ids we generate (uuid). Set it to a public name: the default is a

public string ExternalHostName { get; set; }

OurPartyId

Our eb:PartyId. Exactly one, as eDelivery requires.

public string? OurPartyId { get; set; }

OurPartyIdType

Our eb:PartyId/; omitted when null.

public string? OurPartyIdType { get; set; }

Partners

The agreements of this node, one per trading partner, told apart by .

public IList<As4Partner> Partners { get; set; }

ReceiptRetention

How long a sent receipt is kept for answering duplicates. Default one day.

public TimeSpan ReceiptRetention { get; set; }

ReceiptStore

Where the receipts this node sends are kept, so that a duplicate of a received message is answered with the

public IClaimCheckRepository? ReceiptStore { get; set; }

RevocationMode

Revocation check of the certificates the node pins: the partners' signing and encryption certificates, our own

public X509RevocationMode RevocationMode { get; set; }

RevocationSoftFail

Accept a certificate whose revocation status cannot be determined (responder unreachable). Default false: refused,

public bool RevocationSoftFail { get; set; }

SigningCertificate

Our certificate with its private key: signs our messages and receipts.

public X509Certificate2? SigningCertificate { get; set; }

SigningCertificateChain

The certification authorities above , in any order, private keys not needed.

public IList<X509Certificate2> SigningCertificateChain { get; set; }

SslCertPassword

Password for .

public string? SslCertPassword { get; set; }

SslCertPath

PFX the receive server presents over TLS, when the endpoint URI does not give one.

public string? SslCertPath { get; set; }

SslProtocols

TLS versions our sender offers. Default TLS 1.2 and 1.3: eDelivery AS4 1.16 requires 1.2, allows 1.3 and forbids

public SslProtocols SslProtocols { get; set; }

Methods

Validate(string)

Throws when the node cannot be used; called when an endpoint that names it starts.

public void Validate(string name)