Black-/Whitelisting is an extension to define the visibility of Entities for certain Rules.
Blacklisting defines that the Entity is NOT visible/readable for a Consumer who matches the Criteria of the Blacklist Rule
Whitlisting defines that the Entity is ONLY visible/readable for a Consumer who matches the Criteria of the Whitelist Rule
To add Black-/Whitelist Support to an Entity you add the corresponding Fields to the EntityDefinition
(new BlacklistRuleField()), (new WhitelistRuleField()),
To Support the Black-/Whitelisting for Searches and Reads the Rules for the currently applied Black-/Whitelisting have to be in the Context (/Core/Framework/Context.php)