Skip to content

SubjectMatcher Class

The subject matching of SSF 1.0 Section 8.1.3.1: the rule by which a transmitter decides whether an event's subject falls under a subject the receiver added to its stream. Simple subjects match when exactly identical; complex subjects match when EVERY field is undefined on either side or identical on both - which is what makes an absent field a wildcard, so a receiver adding just a tenant hears about every user of that tenant, and one adding user plus device still hears an event that names only the user.

C#
public static class SubjectMatcher

Inheritance System.Object → SubjectMatcher

Methods

SubjectMatcher.Identical(SubjectIdentifier, SubjectIdentifier) Method

"Exactly identical" (SSF 1.0 Section 8.1.3.1), taken at the wire level: two subjects are identical when they serialize to equal JSON. The serialized form is what both parties actually exchanged, and each subtype writes its members in one fixed order, so the comparison is deterministic without a per-format equality to maintain. Public beside Matches(SubjectIdentifier, SubjectIdentifier) because subject BOOKKEEPING wants the strict relation: a removal undoes exactly what was added, where the wildcard matching would over-reach.

C#
public static bool Identical(Abblix.SecurityEvents.Subjects.SubjectIdentifier first, Abblix.SecurityEvents.Subjects.SubjectIdentifier second);

Parameters

first Abblix.SecurityEvents.Subjects.SubjectIdentifier
second Abblix.SecurityEvents.Subjects.SubjectIdentifier

Returns

System.Boolean

SubjectMatcher.Matches(SubjectIdentifier, SubjectIdentifier) Method

Decides whether two subjects match under Section 8.1.3.1. The relation is symmetric: the section's rules read the same whichever side the receiver's subject is on.

C#
public static bool Matches(Abblix.SecurityEvents.Subjects.SubjectIdentifier first, Abblix.SecurityEvents.Subjects.SubjectIdentifier second);

Parameters

first Abblix.SecurityEvents.Subjects.SubjectIdentifier

One subject - conventionally the one added to the stream.

second Abblix.SecurityEvents.Subjects.SubjectIdentifier

The other - conventionally the event's subject.

Returns

System.Boolean