Class As4Partner

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

The agreement with one trading partner: who they are, what we exchange, how it is secured. This is the
partner half of an ebMS P-Mode; the node half (our identity and keys) is .

A partner lives in and is named by : the
name a send endpoint gives in partner= and the value of the redbAs4.partner header on
receipt. In Route-XML it is a nested <bean> or a <ref> in the node's Partners list.


Defaults follow the eDelivery AS4 1.16 common profile: every message is signed, its payloads encrypted
and compressed, and the receiver answers with a signed non-repudiation receipt in the HTTP response.
Those are not options: the profile mandates them.

public sealed class As4Partner

Inheritance

Object→As4Partner

Properties

Action

eb:Action of the request leg.

public string? Action { get; set; }

Address

The partner's MSH address (P-Mode Protocol.Address): http:// or https://, with a query where the

public string? Address { get; set; }

AgreementRef

eb:AgreementRef; omitted when null. When present on both sides it selects the agreement on receipt.

public string? AgreementRef { get; set; }

AgreementRefType

eb:AgreementRef/; omitted when null.

public string? AgreementRefType { get; set; }

AllowOverrideAction

Whether a route may send a different eb:Action than (option or header).

public bool AllowOverrideAction { get; set; }

AllowOverrideService

Whether a route may send a different eb:Service than (option or header).

public bool AllowOverrideService { get; set; }

CompressPayloads

Gzip the payloads we send (AS4 compression; eDelivery AS4 1.16 requires support for it). Default true.

public bool CompressPayloads { get; set; }

DataEncryptionAlgorithm

Payload encryption algorithm URI. Default AES-128-GCM.

public string DataEncryptionAlgorithm { get; set; }

DigestAlgorithm

Digest algorithm URI for signature references. Default SHA-256.

public string DigestAlgorithm { get; set; }

KeyReference

How our signatures reference our certificate. Default: .

public As4KeyReference KeyReference { get; set; }

KeyTransportAlgorithm

Key transport algorithm URI. Default RSA-OAEP (XML Encryption 1.1).

public string KeyTransportAlgorithm { get; set; }

KeyTransportDigestAlgorithm

Digest URI for OAEP key transport. Default SHA-256.

public string KeyTransportDigestAlgorithm { get; set; }

MaskGenerationAlgorithm

Mask generation function URI for key transport. Default MGF1-SHA256.

public string MaskGenerationAlgorithm { get; set; }

Name

Name of the agreement within its node: what partner= refers to. Required, unique per node.

public string? Name { get; set; }

OurRole

Our eb:Role in exchanges with this partner. Default: initiator.

public string OurRole { get; set; }

PartnerCertificatePolicies

Certificate policy OIDs (RFC 5280 §4.2.1.4) the partner's signing certificate, and every authority between it

public IList<string> PartnerCertificatePolicies { get; set; }

PartnerEncryptionCertificate

The partner's certificate we encrypt payloads for.

public X509Certificate2? PartnerEncryptionCertificate { get; set; }

PartnerRole

The partner's eb:Role. Default: responder.

public string PartnerRole { get; set; }

PartnerSigningCertificates

The partner's certificates that verify its signatures. More than one while the partner rotates its

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

PartnerTrustAnchors

Certification authorities the partner's signing certificate must chain to, instead of pinning the certificate

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

PartyId

The partner's eb:PartyId. Exactly one per side, as eDelivery requires.

public string? PartyId { get; set; }

PartyIdType

The partner's eb:PartyId/; omitted when null.

public string? PartyIdType { get; set; }

PModeId

eb:AgreementRef/; omitted when null.

public string? PModeId { get; set; }

ReplyLeg

The reply leg of a Two-Way / Push-and-Push exchange: the user message the responder pushes back with

public As4Leg? ReplyLeg { get; set; }

RequireFourCornerProperties

Whether every message of this agreement must carry the originalSender and finalRecipient message

public bool RequireFourCornerProperties { get; set; }

Service

eb:Service of the request leg.

public string? Service { get; set; }

ServiceType

eb:Service/ of the request leg; omitted when null.

public string? ServiceType { get; set; }

SignatureAlgorithm

Signature algorithm URI. Default RSA-SHA256.

public string SignatureAlgorithm { get; set; }

TimestampTimeToLive

How old the Created of a received wsu:Timestamp may be (WSS4J timeStampTTL, CXF

public TimeSpan TimestampTimeToLive { get; set; }

TimestampTolerance

Clock skew accepted when checking the partner's wsu:Timestamp: how far in the future its Created

public TimeSpan TimestampTolerance { get; set; }

TimestampTtl

Lifetime of a wsu:Timestamp in the messages and receipts we sign; null (default) signs none. The eDelivery

public TimeSpan? TimestampTtl { get; set; }

Methods

Validate()

Throws when the agreement cannot be used; called when an endpoint of its node starts.

public void Validate()