I have some query on multi tenancy.
I have a webservice (named: SampleService) that is to be shared across multi tenants , i.e in other words, the service will be present in multiple realms.
The number of realms are dynamic, they can be increased based on new client onboard.
I have multiple keycloak.json files present in resource folder of SampleService such as:
TO resolve this multiple jsons, I have a path resolver in web.xml of SampleService:
I have a UI application, that gets authenticated by calling the the service to get the token:
Now My question is. I have the token for a particular realm(say realm1) and I want to call the SampleService using that token. How will SampleService come to know which keycloakJson to use to resolve the token validation:
Note my service call URI doesn't change as per realm: example:
Kindly respond to the above case.
Please let me know in case of any issues.