How to register spring boot admin client to spring boot admin client through eureka? - netflix-eureka

I already started a stand alone eureka service and a #EnableDiscoveryClient annotated spring boot admin server. And the admin server was already registered in the eureka successfully. Now question is how to register a spring boot application to the admin server through eureka?
PS: without eureka, we need to add config: spring.boot.admin.url=http://localhost:8080 in the admin client to register the client to the admin server.

If your client apps are regular eureka apps they should show up in the admin server.
There is also a short section on this in the docs: http://codecentric.github.io/spring-boot-admin/1.4.3/#discover-clients-via-spring-cloud-discovery

Related

keycloak java adapter client only communication

I have a keycloak server(v12) and I have an application server (tomcat+spring boot+keycloak adapter v16) with a confidential OAuth client configured.
Both servers are accessible by client, but no connection from one to the other server is possible (FW I cannot change)
application.properties:
spring.autoconfigure.exclude=
keycloak.enabled=true
keycloak.realm=my-realm
keycloak.realm-key=MIIBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
keycloak.auth-server-url=https://keycloak-server/auth/
keycloak.ssl-required=all
keycloak.resource=my-app
keycloak.credentials.secret=xxxxxxx
keycloak.confidential-port=0
How do I convince spring boot and keycloak that it should use the defined realm-key, and not try to connect to the other server?
From my understanding it should be possible according to docu and OAuth2 standard.

Spring Boot Eureka server and client deployment external tomcat server

I have one spring boot ms app that deployed on external tomcat server. To register this ms app created one eureka server and deployed on another tomcat server.Deployment success both the server & I can see the ms app at eureka server but ms app port is not showing at eureka server- details as below -
Eureka Server configuration-
spring.application.name=MyEureka Server
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.fetchRegistry=false
eureka.instance.preferIpAddress=true
Eureka Client configuration-
eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
eureka.client.serviceUrl.defaultZone = http://192.168.6.27:11005/my-service-registry/eureka
spring.application.name=MY-REST-SERVICE
management.endpoints.web.exposure.include=*
eureka.client.healthcheck.enabled=true
When both servers are up I am getting ip:MY-REST-SERVICE not getting any port info.
Please suggest and help.

spring webflux with keycloak authentication over netty server

i want to run webflux based web app using non blocking netty server and authentication using keycloak.
seems like keycloak does not support netty server. is there a way to override default behavior of keycloak and use netty instead of tomcat?
this is required becuase my webflux application does not work properly on other web servers.
i want to use keycloak for basic authentication but when i configure keycloak in my application and try to run it it does not come up on netty dependecies, only when i add tomcat to my webflux pom.xml then keycloak server comes up.
and idea how ot run keycloak on netty server?

Spring boot admin behind firewall

I have a spring-boot client app deployed in a customer network and I want to use SBA as a GUI for its actuator endpoints. I cannot use register-client-applications to register the app, mainly because the client app has no connectivity to SBA (its behind a firewall).
Is there a way how to add a client to SBA manually?
You can add use a static configuration for spring cloud's discovery client. So there is no need that the client reach the sba server. See http://codecentric.github.io/spring-boot-admin/current/#spring-cloud-discovery-static-config

Spring Boot Admin Eureka Authentication

I am using Eureka discovery, Spring Boot Admin (1.5.4) and several services. Each service has enabled basic auth to actuator endpoints:
security.user.name=admin
security.user.password=admin
management.security.enabled=true
SBA fetches info about services from eureka and because of secured endpoints I have configured eureka's metadata map like this:
eureka.instance.metadata-map.user.name=${security.user.name}
eureka.instance.metadata-map.user.password=${security.user.password}
but still getting 401 Unauthorized:
o.s.b.a.e.m.MvcEndpointSecurityInterceptor - Full authentication is required to access actuator endpoints. Consider adding Spring Security or set 'management.security.enabled' to false.
What am I missing? If I turn management.security.enabled off it works.