@JsonIgnore
    @Override
    public Set<String> getExcludedAttributes() {
        return this.policies
            .stream()
            .filter(BeanSupplier::isNotProxy)
            .map(RegisteredServiceConsentPolicy::getExcludedAttributes)
            .filter(Objects::nonNull)
            .flatMap(Set::stream)
            .collect(Collectors.toCollection(LinkedHashSet::new));

    }
Add policy.

@param policy the policy
core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/services/consent/ChainingRegisteredServiceConsentPolicy.java