use of org.apereo.cas.configuration.model.core.monitor.ActuatorEndpointProperties in project cas by apereo.
the class CasWebSecurityConfigurerAdapter method configureEndpointAccessByIpAddress.
private void configureEndpointAccessByIpAddress(final ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry requests, final ActuatorEndpointProperties properties, final EndpointRequest.EndpointRequestMatcher endpoint) {
val addresses = properties.getRequiredIpAddresses().stream().map(address -> "hasIpAddress('" + address + "')").collect(Collectors.joining(" or "));
requests.requestMatchers(endpoint).access(addresses);
}
Aggregations