protected boolean requiredAttributesFoundInMap(final RegisteredServiceAccessStrategyRequest request,
                                                   final Map<String, Set<String>> requiredAttributes) {
        val difference = requiredAttributes.keySet()
            .stream()
            .filter(key -> request.getAttributes().containsKey(key))
            .collect(Collectors.toSet());
        LOGGER.debug("Difference of checking required attributes: [{}]", difference);
        if (this.requireAllAttributes && difference.size() < requiredAttributes.size()) {
            return false;
        }
        val attributeMatcherPredicate = Unchecked.<String>predicate(key -> requiredAttributeFound(key, request, requiredAttributes));
        if (this.requireAllAttributes) {
            return difference.stream().allMatch(attributeMatcherPredicate);
        }
        return difference.stream().anyMatch(attributeMatcherPredicate);
    }
Enough required attributes available to process? Check collection sizes and determine
if we have enough data to move on.

@param principalAttributes the principal attributes
@param requiredAttributes  the required attributes
@return true /false
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/util/RegisteredServiceAccessStrategyEvaluator.java