@Bean
    @ConditionalOnMissingBean(name = "cosmosDbTicketRegistry")
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public TicketRegistry ticketRegistry(
        final CasConfigurationProperties casProperties,
        @Qualifier(TicketSerializationManager.BEAN_NAME)
        final TicketSerializationManager ticketSerializationManager,
        @Qualifier(TicketCatalog.BEAN_NAME)
        final TicketCatalog ticketCatalog,
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("cosmosDbTicketRegistryObjectFactory")
        final CosmosDbObjectFactory cosmosDbTicketRegistryObjectFactory) {

        cosmosDbTicketRegistryObjectFactory.createDatabaseIfNecessary();
        val ticketDefinitions = ticketCatalog.findAll();
        val containers = ticketDefinitions
            .stream()
            .map(defn -> {
                LOGGER.debug("Creating CosmosDb container [{}] for [{}]:[{}]",
                    defn.getProperties().getStorageName(), defn.getPrefix(), defn.getApiClass().getSimpleName());
                return cosmosDbTicketRegistryObjectFactory.createContainer(defn.getProperties().getStorageName(),
                    defn.getProperties().getStorageTimeout(), CosmosDbTicketRegistry.PARTITION_KEY_PREFIX);
            })
            .toList();

        val cipher = CoreTicketUtils.newTicketRegistryCipherExecutor(
            casProperties.getTicket().getRegistry().getCosmosDb().getCrypto(), "cosmos-db");
        return new CosmosDbTicketRegistry(cipher, ticketSerializationManager, ticketCatalog, applicationContext, containers);
    }
This is {@link CasCosmosDbTicketRegistryAutoConfiguration}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-cosmosdb-ticket-registry/src/main/java/org/apereo/cas/config/CasCosmosDbTicketRegistryAutoConfiguration.java