pub struct AuditNotificationAuthorizationContext {
pub source_mac: MacAddr,
pub source_network: Option<NpduAddress>,
pub provenance: TransportProvenance,
pub invoke_id: u8,
pub audit_log_sink: ObjectIdentifier,
pub request: AuditNotificationRequest,
}Expand description
Transport provenance and decoded content supplied to
ServerPolicy::authorize_audit_notification.
The source/target identities inside request are peer-reported audit data,
not authenticated transport provenance. Policy should use source_network
for a usable routed origin and source_mac for the immediate data-link peer.
Debug is redacted: address lengths, the sink, whether a principal is
present and the notification count, never the notifications themselves.
Fields§
§source_mac: MacAddrImmediate data-link peer (normally a router for routed traffic).
source_network: Option<NpduAddress>Originating NPDU source when one was present.
provenance: TransportProvenanceHonest transport + origin provenance for this ingress; the source of the principal, if any.
invoke_id: u8Outer Confirmed-Request invoke identifier.
audit_log_sink: ObjectIdentifierExplicitly configured local Audit Log sink.
request: AuditNotificationRequestDecoded peer-reported notification list, preserved verbatim.
Implementations§
Source§impl AuditNotificationAuthorizationContext
impl AuditNotificationAuthorizationContext
Sourcepub fn principal(&self) -> Option<ScPrincipal>
pub fn principal(&self) -> Option<ScPrincipal>
The principal of the peer that originated the request: the verified
leaf certificate of a direct BACnet/SC connection, when the request
carries no routed source. None for other ingress, hub-relayed and
routed requests included (see crate::policy).
Sourcepub fn forwarding_peer_principal(&self) -> Option<ScPrincipal>
pub fn forwarding_peer_principal(&self) -> Option<ScPrincipal>
The principal of the direct BACnet/SC peer that handed this request
over, a router included when the request was routed; None off a
verified direct SC connection. Trusting it trusts everything that
peer forwards.