protected BasicDecryptionConfiguration configureDecryptionSecurityConfiguration(final SamlRegisteredService service) {
        val config = DefaultSecurityConfigurationBootstrap.buildDefaultDecryptionConfiguration();
        LOGGER.trace("Default decryption blocked algorithms: [{}]", config.getExcludedAlgorithms());
        LOGGER.trace("Default decryption allowed algorithms: [{}]", config.getIncludedAlgorithms());

        val globalAlgorithms = samlIdPProperties.getAlgs();
        val overrideBlockedEncryptionAlgorithms = service.getEncryptionBlackListedAlgorithms().isEmpty()
            ? globalAlgorithms.getOverrideBlockedEncryptionAlgorithms()
            : service.getEncryptionBlackListedAlgorithms();
        if (overrideBlockedEncryptionAlgorithms != null && !overrideBlockedEncryptionAlgorithms.isEmpty()) {
            config.setExcludedAlgorithms(overrideBlockedEncryptionAlgorithms);
        }

        val overrideWhiteListedAlgorithms = service.getEncryptionWhiteListedAlgorithms().isEmpty()
            ? globalAlgorithms.getOverrideAllowedAlgorithms()
            : service.getEncryptionWhiteListedAlgorithms();
        if (overrideWhiteListedAlgorithms != null && !overrideWhiteListedAlgorithms.isEmpty()) {
            config.setIncludedAlgorithms(overrideWhiteListedAlgorithms);
        }

        LOGGER.trace("Finalized decryption blocked algorithms: [{}]", config.getExcludedAlgorithms());
        LOGGER.trace("Finalized decryption allowed algorithms: [{}]", config.getIncludedAlgorithms());

        if (StringUtils.isNotBlank(service.getWhiteListBlackListPrecedence())) {
            val precedence = AlgorithmPolicyConfiguration.Precedence.valueOf(
                service.getWhiteListBlackListPrecedence().trim().toUpperCase(Locale.ENGLISH));
            config.setIncludeExcludePrecedence(precedence);
        }
        return config;
    }
Configure decryption security configuration basic decryption configuration.

@param service the service
@return the basic decryption configuration
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/SamlIdPObjectEncrypter.java