@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Bean
        public CipherExecutor samlIdPMetadataGeneratorCipherExecutor(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(CipherExecutor.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val idp = casProperties.getAuthn().getSamlIdp();
                    val crypto = idp.getMetadata().getJpa().getCrypto();
                    if (crypto.isEnabled()) {
                        return CipherExecutorUtils.newStringCipherExecutor(crypto, JpaSamlIdPMetadataCipherExecutor.class);
                    }
                    LOGGER.info("JPA SAML IdP metadata encryption/signing is turned off and "
                                + "MAY NOT be safe in a production environment. "
                                + "Consider using other choices to handle encryption, signing and verification of metadata artifacts");
                    return CipherExecutor.noOp();
                })
                .otherwise(CipherExecutor::noOp)
                .get();
        }
This is {@link SamlIdPJpaIdPMetadataConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-saml-idp-metadata-jpa/src/main/java/org/apereo/cas/config/SamlIdPJpaIdPMetadataConfiguration.java