spring-securityspring-webfluxcloud-foundrypcfcloudfoundry-uaa

Spring boot security application is not showing Thread link in PCF, in browser console 'cloudfoundryapplication' is 503


I am deploying two different application in same Org -> Space in PCF.

Both are Spring Boot application with Spring Security Actuator enabled.

In PCF, if spring app is deployed with actuator enabled, then a Thread link will be displayed with few other features.

All this feature is showing for one application and other it's not showing anything.

For second application, I can see in the logs that I am getting "Unable to fetch token keys from UAA." and in the browser console GET call for 'cloudfoundryapplication' is returning 503.

For the first application everything works fine. There are no configuration changes only few Dependencies are added in second application.


Solution

  • For the second application, the additional dependency used was spring-cloud-starter-netflix-ribbon which is expecting service name for the call initiated on WebClient.

    So I have configured two webClient.builder beans, one with @LoadBalanced and other normal WebClient.builder with @Primary annotation.

    Internally, Cloud Foundry framework uses Primary bean and our project uses laodBalancedWebClientBuilder.