private static boolean matchesPolicy(PeerPolicy peerPolicy, String cn, List<String> sans) {
        return peerPolicy.requiredCredentials().stream()
                .allMatch(requiredCredential -> matchesRequiredCredentials(requiredCredential, cn, sans));
    }
Uses rules from {@link AuthorizedPeers} to evaluate X509 certificates

@author bjorncs
security-utils/src/main/java/com/yahoo/security/tls/PeerAuthorizer.java