protected void configureEndpointAccessToDenyUndefined(
        final HttpSecurity http, final ApplicationContext applicationContext) {
        val endpoints = casProperties.getMonitor().getEndpoints().getEndpoint().keySet();
        val mappedEndpoints = pathMappedEndpoints.getObject();
        mappedEndpoints
            .stream()
            .filter(BeanSupplier::isNotProxy)
            .forEach(Unchecked.consumer(endpoint -> {
                val rootPath = endpoint.getRootPath();
                val endpointMatcher = EndpointRequest.to(rootPath).excludingLinks();
                if (endpoints.contains(rootPath)) {
                    LOGGER.trace("Endpoint security is defined for endpoint [{}]", rootPath);
                } else {
                    val accessLevel = applicationContext.getEnvironment().getProperty("management.endpoint.%s.access".formatted(rootPath));
                    if (StringUtils.isNotBlank(accessLevel)) {
                        val access = Access.valueOf(accessLevel.toUpperCase(Locale.ENGLISH));
                        switch (access) {
                            case UNRESTRICTED, READ_ONLY -> configureEndpointAccessPermitAll(http, endpointMatcher);
                            case NONE -> configureEndpointAccessToDenyAll(http, endpointMatcher);
                        }
                    } else {
                        val endpointDefaults = casProperties.getMonitor().getEndpoints().getDefaultEndpointProperties();
                        val defaultAccessRules = endpointDefaults.getAccess();
                        LOGGER.trace("Endpoint security is NOT defined for endpoint [{}]. Using default security rules [{}]", rootPath, endpointDefaults);
                        defaultAccessRules.forEach(Unchecked.consumer(access ->
                            configureEndpointAccess(http, access, endpointDefaults, endpointMatcher)));
                    }
                }
            }));
    }
Configure http security.

@param http the http
@return the http security
@throws Exception the exception
support/cas-server-support-webconfig/src/main/java/org/apereo/cas/web/security/CasWebSecurityConfigurerAdapter.java