[keycloak-user] Keycloak for Client services behind loadbalancers

Stian Thorgersen sthorger at redhat.com
Thu May 19 02:20:12 EDT 2016


Sorry, I miss-read that. You're changing the URL for the client, not
Keycloak server. Sorry.

On 19 May 2016 at 08:19, Stian Thorgersen <sthorger at redhat.com> wrote:

> Why are you not changing the config in keycloak.json? The way you do it
> now you may end up with a different URL used to exchange code->token and to
> refresh tokens.
>
> On 19 May 2016 at 07:30, Subhrajyoti Moitra <subhrajyotim at gmail.com>
> wrote:
>
>> Hello Stian,
>> Thanks for responding.
>> Our Keycloak SSO is a single server, but the clients are load balanced.
>> We just set the redirect_url value to the LB url in the keycloak.login()
>> call, thats it.
>> It seems to be working without any issues, detected so far.
>>  :)
>>
>> Thanks a lot again for looking into this.
>> Regards,
>> Subhro.
>>
>>
>>
>> On Thu, May 19, 2016 at 10:28 AM, Stian Thorgersen <sthorger at redhat.com>
>> wrote:
>>
>>> You need to configure the correct auth-server-url in keycloak.json for
>>> your application using keycloak.js. It should be the loadbalancer URL.
>>>
>>> On 10 May 2016 at 15:11, Subhrajyoti Moitra <subhrajyotim at gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>> I have a client application, that will be using Keycloak for
>>>> authentication and authorization.
>>>> There are 2 instances of this application running on (lets say)
>>>> service1 and service2.
>>>>
>>>> These 2 service instance are behind the load balancer. The load
>>>> balancer has sticky sessions on.
>>>>
>>>> Now a user browses to the loadbalancer url, which in turn serves the
>>>> service instances, service1 or service2.
>>>> Now when the service instance pages are using keycloak.js to verify the
>>>> login, I dont get the loadbalancer URL as the redirect url value, rather
>>>> the redirect url is of the actual service instance URL on which the service
>>>> is hosted.
>>>>
>>>> How do i use Keycloak for loadbalanced services?
>>>>
>>>> Is there some specific setting, or setup of the server?
>>>>
>>>> Please help and guide,
>>>> Thanks and cheers,
>>>> Subhro.
>>>>
>>>> _______________________________________________
>>>> keycloak-user mailing list
>>>> keycloak-user at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160519/edca495a/attachment.html 


More information about the keycloak-user mailing list