[keycloak-user] Multi-tenant REST api

Vito Vessia vvessia at katamail.com
Sat Sep 26 22:32:57 EDT 2015


Hi all,
I have to create some multi-tenant rest apis secured by keycloak, following
the multi-tenant example provided by the keycloak documentation.
So, in the same way the example shows, I have some rest api like:

/rest/api1/name/{id}

and I wold like to let these api to be multi tenant using urls like this
one:

/tenant1/rest/api1/name/{id}   or /tenant2/rest/api1/name/{id}

I am using Jersey as Jax-RS implementation and the AS is Wildfly 9.
My KeycloakConfigResolver derived implementation seems to work well,
because it receives the requests from KC and returns the
correct KeycloakDeployment instance, but the rest  service is never called.
If I temporary disable the resolver and I define a fixed realm, everything
is ok calling the url without the tenant name part.
Please. do you have some idea?
Where do I can get a complete example?

--Vito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150927/df7749f6/attachment.html 


More information about the keycloak-user mailing list