protected void configureEndpointAccessToDenyUndefined ( final HttpSecurity http , final ExpressionUrlAuthorizationConfigurer < HttpSecurity > . ExpressionInterceptUrlRegistry requests ) { val endpoints = casProperties . getMonitor ( ) . getEndpoints ( ) . getEndpoint ( ) . keySet ( ) ; val endpointDefaults = casProperties . getMonitor ( ) . getEndpoints ( ) . getDefaultEndpointProperties ( ) ; pathMappedEndpoints . forEach ( endpoint -> { val rootPath = endpoint . getRootPath ( ) ; if ( endpoints . contains ( rootPath ) ) { LOGGER . trace ( "Endpoint security is defined for endpoint [{}]" , rootPath ) ; } else { val defaultAccessRules = endpointDefaults . getAccess ( ) ; LOGGER . trace ( "Endpoint security is NOT defined for endpoint [{}]. Using default security rules [{}]" , rootPath , endpointDefaults ) ; val endpointRequest = EndpointRequest . to ( rootPath ) . excludingLinks ( ) ; defaultAccessRules . forEach ( Unchecked . consumer ( access -> configureEndpointAccess ( http , requests , access , endpointDefaults , endpointRequest ) ) ) ; } } ) ; }
Configure endpoint access to deny undefined .