CAS 7.0.x Spring Boot Admin

160 views
Skip to first unread message

Erik Mallory

unread,
Feb 5, 2025, 7:50:58 PM2/5/25
to CAS Community
Taking another run at the SBA for cas, since now it's rolled into the war.
I'm running into the following error:
<Failed to register application as Application(name=CAS, managementUrl=/sba/instances, healthUrl=https://appdev-523.wichita.edu:8443/cas/actuator/health, serviceUrl=https://appdev-523.wichita.edu:8443/cas
) at spring-boot-admin ([https://appdev-523.wichita.edu:8443/cas/sba/instances]): Could not extract response: no suitable HttpMessageConverter found for respon
se type [java.util.Map<java.lang.String, java.lang.Object>] and content type [text/html;charset=UTF-8]. Further attempts are logged on DEBUG level>

this leads me to believe that /sba/instances is not the right place to be pointing the client at.
So where is the right place to point the client at to get it to register?
Below is my configuration for cas 7.0.10

spring.boot.admin.client.enabled=true
spring.boot.admin.server.enabled=true
spring.boot.admin.client.auto-registration=true
spring.boot.admin.client.instance.health-url=https://appdev-523.wichita.edu:8443/cas/actuator/health
#spring.boot.admin.client.instance.management-base-url=https://appdev-523.wichita.edu:8443/cas
spring.boot.admin.client.instance.management-url=/sba/instances
spring.boot.admin.client.url=https://appdev-523.wichita.edu:8443/cas/sba
spring.boot.admin.client.instance.service-host-type=hostname
Thanks

Will L

unread,
Feb 6, 2025, 4:43:47 PM2/6/25
to CAS Community, Erik Mallory
Hello Erik,

I was getting that error as well and it turned out that I didn't have the "spring.security" lines set in my properties file.

spring.security.user.name=[setuser]
spring.security.user.password=[setpassword]
spring.security.user.roles=ADMIN

Also, be sure that the "management.endpoints" are exposed for the application. That can be seen here: https://fawnoos.com/2023/12/15/cas70x-gettingstarted-overlay/

Hope that helps.

Sincerely,



Will

Will L

unread,
Feb 10, 2025, 9:42:51 PM2/10/25
to CAS Community, Will L, Erik Mallory
Hello Erik,

I had seen that you replied before, but it is not showing on my side any more.

Is your Spring Boot Admin and CAS box running on the same server? If so, the other "spring.security" option might not need to be specified. Try commenting those options other than the ".user.name", ".user.password", and ".user.roles".

You can also try these settings here in a testing environment (or private IP) to test your SBA logon:
management.endpoints.web.exposure.include=*
management.endpoints.enabled-by-default=true
management.endpoint.health.show-details=always
cas.monitor.endpoints.endpoint.defaults.access=ANONYMOUS


Sincerely,



William Lampkins

Erik Mallory

unread,
Feb 11, 2025, 11:44:05 AM2/11/25
to Will L, CAS Community
Hello,
What I have tried:
spring.security.user.name=somename
spring.security.user.password=somepasswd
spring.security.user.roles=ADMIN
cas.monitor.endpoints.endpoint.defaults.access=ANONYMOUS

I have also tried
unsetting the user.name,user.password, and user.roles (commenting them out)
and I have tired 
cas.monitor.endpoints.endpoint.defaults.access=ANONYMOUS

The other springboot settings are needed for our clustered environment. Three nodes behind a Citrix ADC (netscaler)
The node I'm testing with is both client and server, according to the CAS 7.0 documentation, they are both needed, so server and client are set to true.
The other settings override the defaults, which in this case would be cas-dev.wichita.edu. The node on the back end will change if we leave it configured that way, and it would be harder to control public access to backend data. 
I've configured one of the other nodes to connect, and get the same error. 

Breaking down the error:
 Could not extract response: no suitable HttpMessageConverter found for response type [java.util.Map<java.lang.String, java.lang.Object>] and content type [text/html;charset=UTF-8]

Spring wants json or xml I'm not sure which, but it's getting text/html which means it's probably getting some other kind of response. that is obfuscated by this error. Which is typically annoying java stuff. I ran across a stackoverflow thread where someone had rewritten a class file to log the html response so they could better address the problem.

There is a tomcat access file that is logged to by the cas.war and I can see the connections coming in.

Today they look like this:

[11/Feb/2025:08:41:48 -0600] 10.1.71.21 "POST /cas/sba/instances HTTP/1.1" 302 (8155 ms)
[11/Feb/2025:08:41:48 -0600] 10.1.71.21 "GET /cas/sba/login HTTP/1.1" 200 (8064 ms)

This tells me that  10.1.71.21 (appdev-523) is posting to /cas/sba/instances and getting redirected to /cas/sba/login. Either it shouldn't be getting directed to sba login in the first place, or it should be passing the creds to login and get redirected back.
My current relevant configuration is:

##
#Endpoints
#
management.endpoints.enabled-by-default=true
management.endpoints.web.base-path=/actuator
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
management.endpoint.health.enabled=true
management.endpoint.health.metrics=true
management.endpoint.statistics.enabled=true
management.endpoint.prometheus.enabled=true
#management.endpoint.throttles.enabled=true
#management.endpoint.info.enabled=true
management.endpoint.heapdump.enabled=true
management.endpoint.env.enabled=true
management.prometheus.metrics.export.enabled=true
#cas.monitor.endpoints.endpoint.defaults.access=IP_ADDRESS
cas.monitor.endpoints.endpoint.defaults.access=PERMIT
#cas.monitor.endpoints.endpoint.defaults.access=ANONYMOUS
#cas.monitor.endpoints.endpoint.defaults.required-ip-addresses=127.0.0.1,172.16.2.82,10.1.71.21,10.1.71.20,10.0.61.75,10.0.61.48,10.250.1.23
#cas.monitor.endpoints.endpoint.defaults.requiredIpAddresses=127.0.0.1,172.16.2.82,10.1.71.21,10.1.71.20,10.0.61.75,10.0.61.48,10.250.1.23

#New SpringBootAdmin server
spring.security.user.name=someuser
spring.security.user.password=somepassword
spring.security.user.roles=ADMIN
spring.boot.admin.client.enabled=true
spring.boot.admin.server.enabled=true
spring.boot.admin.client.auto-registration=true
spring.boot.admin.client.url=https://appdev-523.wichita.edu:8443/cas/sba                                                # Defaults to cas-dev.wichita.edu/cas/sba
spring.boot.admin.client.instance.health-url=https://appdev-523.wichita.edu:8443/cas/actuator/health     # Defaults to cas-dev.wichita.edu/cas/actuator/health
spring.boot.admin.client.instance.management-url=https://appdev-523.wichita.edu:8443/cas/actuator     #Defaults to cas-dev.wichita.edu/cas/actuator
spring.boot.admin.client.instance.service-host-type=hostname

Thanks for responding,
Erik


--
Erik Mallory
------------------------
"A happy man's paradise is his own good nature." - Edward Abbey

Reply all
Reply to author
Forward
0 new messages