Multi-tenancy user management with Spring Boot Admin Client

Hi All,
Have a Spring Boot app using Admin Client and it’s sort of working. Although it doesn’t feel right.

I am wanting each tenant to manage the our users, sort of made this work but it not my normal style of coding and therefore doesn’t feel good.

My issues;

  1. Creating configuration bean doesn’t work because to be tenant centric the tenant needs to login first
  2. Created a service class with private method and this is was doesn’t feel cool, because all user function calls Keycloak builder first

My preference it to create a Singleton builder instance during class construction but complier is complaining during build because tenant properties is null…

Any suggestions?

Cheers