Repository navigation
Keycloak cross data center setup #33264
Replies: 11 comments 2 replies
|
What are you trying to accomplish by doing so? Are you trying to make sure users can authenticate and retain their session state regardless of which data center they are routed to? |
|
So, is there any way to ensure HA of keycloak server across the data
centre. If one data center goes down, secondary data center must handle the
failover automatically. But we want to use only single database which have
one replica as well for data backup. The replica db will be pointed out to
secondary data center's keycloak server. Please share your suggestions if
there is something else to achive the same.
…On Thu, 3 Oct, 2024, 11:04 Pedro Aguiar, ***@***.***> wrote:
In the passive Keycloak setup, there's a slave Postgres instance, which
only allows read operations. Because of this, my passive Keycloak is unable
to start.
As explained in [1], I really doubt Keycloak can even start with a
read-only database.
You'll either need a load balancer, as you might have expected [3], or set
up a highly available database cluster, so that from Keycloak's
perspective, it always sees a single database.
[1] #33486 <#33486>
[2]
https://www.keycloak.org/high-availability/concepts-active-passive-sync
[3]
https://keycloak.discourse.group/t/redundant-connection-to-keycloak/23886/3
—
Reply to this email directly, view it on GitHub
<#33264 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYRFOPWCAMO7CINALMXNMNLZZTJNRAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBSG44DCNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
For a cross dataceter deployment you will need database replications, and I don't think there's really any downside to making it a multi-master deployment. In that case the passive Keycloak server would do almost nothing with the database connection, as it would simply not get any requests. In this scenario, since everything is online, you would have to switch the Keycloak server that receives the requests if the other dataceter goes down, but otherwise everything should work immediately. Do note that cross-datacenter deployments also (currently) need Infinispan communications between the datacenters for synchronization, even if you use the persistent user session storage feature, and I don't think it makes sense to keep Infinispan in read-only mode. Obviously, you still have to make sure connections are failed-over in that case, so you will need something to monitor the services and do the actual fail-over (e.g., using |
|
Thanks for the explanation.
…On Thu, 3 Oct, 2024, 15:32 darius-m, ***@***.***> wrote:
For a cross dataceter deployment you will need database replications, and
I don't think there's really any downside to making it a multi-master
deployment. In that case the passive Keycloak server would do almost
nothing with the database connection, as it would simply not get any
requests. In this scenario, since everything is online, you would have to
switch the Keycloak server that receives the requests if the other
dataceter goes down, but otherwise everything should work immediately. Do
note that cross-datacenter deployments also (currently) need Infinispan
communications between the datacenters for synchronization, even if you use
the persistent user session storage feature, and I don't think it makes
sense to keep Infinispan in read-only mode.
Obviously, you still have to make sure connections are failed-over in that
case, so you will need something to monitor the services and do the actual
fail-over (e.g., using keepalived). You could probably use a similar
mechanism to start and stop the Keycloak service in the passive datacenter,
but that feels somewhat excessive.
—
Reply to this email directly, view it on GitHub
<#33264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYRFOPQGTDAYCNJWQGMSLRTZZUI3TAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBTGAZDGMI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Hi I am a
Struggling to set up an external infinispan for keycloak. I am using
keycloak 21 and infinispan 14.0.8 . I have created necessary caches in
cache-ispn.xml file and same in infinispan-xsite.xml file. The cluster is
being done properly as I can review thorough logs. The problem is that when
open keycloak GUI for admin login it's taking very much time and unable to
login I gets "internal server error" . And in keycloak server side , I gets
authenticSessions writing keys .... TimeoutException. PFA for detail.
On Thu, 3 Oct, 2024, 15:40 ROHIT RATHOR, ***@***.***> wrote:
Thanks for the explanation.
On Thu, 3 Oct, 2024, 15:32 darius-m, ***@***.***> wrote:
> For a cross dataceter deployment you will need database replications, and
> I don't think there's really any downside to making it a multi-master
> deployment. In that case the passive Keycloak server would do almost
> nothing with the database connection, as it would simply not get any
> requests. In this scenario, since everything is online, you would have to
> switch the Keycloak server that receives the requests if the other
> dataceter goes down, but otherwise everything should work immediately. Do
> note that cross-datacenter deployments also (currently) need Infinispan
> communications between the datacenters for synchronization, even if you use
> the persistent user session storage feature, and I don't think it makes
> sense to keep Infinispan in read-only mode.
>
> Obviously, you still have to make sure connections are failed-over in
> that case, so you will need something to monitor the services and do the
> actual fail-over (e.g., using keepalived). You could probably use a
> similar mechanism to start and stop the Keycloak service in the passive
> datacenter, but that feels somewhat excessive.
>
> —
> Reply to this email directly, view it on GitHub
> <#33264 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AYRFOPQGTDAYCNJWQGMSLRTZZUI3TAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBTGAZDGMI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
This is error i am getting
==================================
ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (timeout-thread--p4-t1) ISPN000136: Error executing command RemoveCommand on Cache 'authent icationSessions', writing keys [WrappedByteArray[03\>\$\c\f\9\3\9\f\d\b\-\4\6\d\4\-\4\3\3\c\-\b\7\a\8\-\0\6\3\d\e\6\c\2\d\0\1\6 (39 bytes)]]: org.infinispan.util.concurrent.TimeoutExcep tion: ISPN000427: Timeout after 240 seconds waiting for acks ([keycloaktest1-1669(site-id=site1)]). Id=40
This is my site1 cache configuration in infinispan-xsite.xml file. (site-1 is infinispan)
-----------------------------------------------------------
<distributed-cache name="authenticationSessions" owners="2">
<encoding media-type="application/x-jboss-marshalling"/>
<backups>
<backup site="site3" strategy="ASYNC" timeout="120000">
<state-transfer timeout="120000"/>
</backup>
</backups>
</distributed-cache>
This is my cache configuration in cache-ispn.xml file in keycloak . (site-3 is keycloak)
---------------------------------------------------------------
<distributed-cache name="authenticationSessions" owners="2" remote-timeout="240000">
<encoding media-type="application/x-jboss-marshalling"/>
<backups>
<backup site="site1" strategy="ASYNC" timeout="240000">
<state-transfer timeout="240000"/>
</backup>
</backups>
</distributed-cache>
|
|
Communications between Keycloak and Infinispan are not done through backups, but using You should use the Do note that you should use the newer versions of Keycloak, that have much better support for high availability since they've moved session storage to the database, so Infinispan configurations are less finicky (especially persistence). |
|
Thanks, I'll check it out. Will let you know how it goes.
…On Tue, 8 Oct, 2024, 17:22 darius-m, ***@***.***> wrote:
Communications between Keycloak and Infinispan are not done through
backups, but using remote-store. You also don't need to define the
encoding (Infinispan will throw some errors but you should be able to
safely ignore those). Here's an example configuration (it's done using
Ansible, but you should be able to get the gist of it) -
https://github.com/UPB-Admin/ansible-keycloak/blob/77038d489d72acd29106387d7313011ce861877a/roles/keycloak/templates/cache-ispn.xml#L36
You should use the backups feature when configuring the communications
between the external Infinispan nodes in different clusters.
Do note that you should use the newer versions of Keycloak, that have much
better support for high availability since they've moved session storage to
the database, so Infinispan configurations are less finicky (especially
persistence).
—
Reply to this email directly, view it on GitHub
<#33264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYRFOPR4W66GBQEY3Z7AUQDZ2PBORAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXHEYTQNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Now I did configuration as you suggested but after that I get some problems
like
1. Unable to access keycloak GUI from browser .
2. Getting serialization related error in infinispan and keycloak.
PFA for exception and also review my configuration I attached .
…On Tue, 8 Oct, 2024, 18:07 ROHIT RATHOR, ***@***.***> wrote:
Thanks, I'll check it out. Will let you know how it goes.
On Tue, 8 Oct, 2024, 17:22 darius-m, ***@***.***> wrote:
> Communications between Keycloak and Infinispan are not done through
> backups, but using remote-store. You also don't need to define the
> encoding (Infinispan will throw some errors but you should be able to
> safely ignore those). Here's an example configuration (it's done using
> Ansible, but you should be able to get the gist of it) -
> https://github.com/UPB-Admin/ansible-keycloak/blob/77038d489d72acd29106387d7313011ce861877a/roles/keycloak/templates/cache-ispn.xml#L36
>
> You should use the backups feature when configuring the communications
> between the external Infinispan nodes in different clusters.
>
> Do note that you should use the newer versions of Keycloak, that have
> much better support for high availability since they've moved session
> storage to the database, so Infinispan configurations are less finicky
> (especially persistence).
>
> —
> Reply to this email directly, view it on GitHub
> <#33264 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AYRFOPR4W66GBQEY3Z7AUQDZ2PBORAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXHEYTQNQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
|
PFA
On Tue, 8 Oct, 2024, 19:34 ROHIT RATHOR, ***@***.***> wrote:
Now I did configuration as you suggested but after that I get some
problems like
1. Unable to access keycloak GUI from browser .
2. Getting serialization related error in infinispan and keycloak.
PFA for exception and also review my configuration I attached .
On Tue, 8 Oct, 2024, 18:07 ROHIT RATHOR, ***@***.***> wrote:
> Thanks, I'll check it out. Will let you know how it goes.
>
> On Tue, 8 Oct, 2024, 17:22 darius-m, ***@***.***> wrote:
>
>> Communications between Keycloak and Infinispan are not done through
>> backups, but using remote-store. You also don't need to define the
>> encoding (Infinispan will throw some errors but you should be able to
>> safely ignore those). Here's an example configuration (it's done using
>> Ansible, but you should be able to get the gist of it) -
>> https://github.com/UPB-Admin/ansible-keycloak/blob/77038d489d72acd29106387d7313011ce861877a/roles/keycloak/templates/cache-ispn.xml#L36
>>
>> You should use the backups feature when configuring the communications
>> between the external Infinispan nodes in different clusters.
>>
>> Do note that you should use the newer versions of Keycloak, that have
>> much better support for high availability since they've moved session
>> storage to the database, so Infinispan configurations are less finicky
>> (especially persistence).
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#33264 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AYRFOPR4W66GBQEY3Z7AUQDZ2PBORAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXHEYTQNQ>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
Exception I am getting now
------------------------------
2024-10-08 09:38:02,015 ERROR (non-blocking-thread--p2-t3) [org.infinispan.server.hotrod.BaseRequestProcessor] ISPN005003: Exception reported org.infinispan.commons.CacheException: ISPN000936: Class 'org.keycloak.cluster.infinispan.WrapperClusterEvent' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
2024-10-08 09:38:03,413 ERROR (non-blocking-thread--p2-t3) [org.infinispan.server.hotrod.BaseRequestProcessor] ISPN005003: Exception reported org.infinispan.commons.CacheException: ISPN0 00936: Class 'org.keycloak.cluster.infinispan.WrapperClusterEvent' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
2024-10-08 09:38:02,036 ERROR (non-blocking-thread--p2-t3) [org.infinispan.server.hotrod.BaseRequestProcessor] ISPN005003:
Exception reported org.infinispan.commons.CacheException: ISPN000936: Class 'org.keycloak.cluster.infinispan.WrapperClusterEvent' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.
org.infinispan.server.hotrod.BaseRequestProcessor] ISPN005003: Exception reported org.infinispan.commons.dataconversion.Encodi ngException: ISPN000495: JBossMarshallingTranscoder encountered error transcoding contentCaused by: java.lang.ClassNotFoundException: org.keycloak.cluster.infinispan.WrapperClusterEvent
My Configurations
===============
cache-ispn.xml file in keycloak
----------------
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:14.0 http://www.infinispan.org/schemas/infinispan-config-14.0.xsd"
xmlns="urn:infinispan:config:14.0">
<jgroups>
<stack name="bridge" extends="tcp">
<!-- <MPING mcast_port="${jgroups.bridge.mcast_port:47655}"
ispn:stack.combine="COMBINE"
xmlns="urn:org:jgroups"
/> -->
<TCP bind_addr="127.0.0.1" bind_port="7801"/>
<TCPPING initial_hosts="127.0.0.1[7801],host[7800]"
stack.combine="REPLACE"
stack.position="MPING"/>
</stack>
<stack name="local" extends="udp">
<relay.RELAY2 site="${infinispan.site.name:site3}"
xmlns="urn:org:jgroups"/>
<remote-sites default-stack="bridge">
<remote-site name="${infinispan.site.name:site3}"/>
</remote-sites>
</stack>
</jgroups>
<cache-container name="keycloak">
<transport cluster="${infinispan.cluster.name:cluster}" stack="local" node-name="${infinispan.node.name:}" site="site3"/>
<!--<serialization marshaller="org.infinispan.jboss.marshalling.commons.GenericJBossMarshaller">
<allow-list>
<class>org.*</class>
<regex>.*</regex>
</allow-list>
</serialization> -->
<serialization>
<!-- Add your custom classes to the allow list -->
<allow-list>
<!-- Add the Keycloak class that needs to be deserialized -->
<class name="org.keycloak.cluster.infinispan.WrapperClusterEvent"/>
<regex>org\.keycloak\.cluster\.infinispan\..*</regex>
</allow-list>
</serialization>
<local-cache name="realms">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
</encoding>
<memory max-count="10000"/>
</local-cache>
<local-cache name="users">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
</encoding>
<memory max-count="10000"/>
</local-cache>
<local-cache name="authorization">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
</encoding>
<memory max-count="10000"/>
</local-cache>
<local-cache name="keys">
<encoding>
<key media-type="application/x-java-object"/>
<value media-type="application/x-java-object"/>
</encoding>
<expiration max-idle="3600000"/>
<memory max-count="1000"/>
</local-cache>
<distributed-cache name="sessions" owners="2">
<encoding media-type="application/x-java-object"/>
<remote-store xmlns="urn:infinispan:config:store:remote:14.0"
cache="sessions"
purge="false"
preload="false"
shared="true"
raw-values="true"
marshaller="org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory">
<remote-server host="host" port="11222" />
<security>
<authentication server-name="infinispan">
<digest username="admin" password="admin" realm="default"/>
</authentication>
</security>
</remote-store>
</distributed-cache>
<!-- ........... and more cache like this -->
<replicated-cache name="work">
<encoding media-type="application/x-java-object"/>
<remote-store xmlns="urn:infinispan:config:store:remote:14.0"
cache="work"
purge="false"
preload="false"
segmented="false"
shared="true"
raw-values="true"
marshaller="org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory">
<remote-server host="host" port="11222" />
<security>
<authentication server-name="infinispan">
<digest username="admin" password="admin" realm="default"/>
</authentication>
</security>
</remote-store>
</replicated-cache>
</cache-container>
</infinispan>
infinispan-xsite.xml file
-------------------<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:14.0 https://infinispan.org/schemas/infinispan-config-14.0.xsd
urn:infinispan:server:14.0 https://infinispan.org/schemas/infinispan-server-14.0.xsd
urn:org:jgroups http://www.jgroups.org/schema/jgroups-5.2.xsd"
xmlns="urn:infinispan:config:14.0"
xmlns:ispn="urn:infinispan:config:14.0"
xmlns:server="urn:infinispan:server:14.0">
<jgroups>
<stack name="bridge" extends="tcp">
<MPING mcast_port="${jgroups.bridge.mcast_port:47655}"
ispn:stack.combine="COMBINE"
xmlns="urn:org:jgroups"
/>
<TCP bind_addr="host1" bind_port="7800"/>
<TCPPING initial_hosts="host1[7800],hos2[7900]"
stack.combine="REPLACE"
stack.position="MPING"/>
</stack>
<stack name="local" extends="udp">
<relay.RELAY2 site="${infinispan.site.name:site1}"
xmlns="urn:org:jgroups"/>
<remote-sites default-stack="bridge">
<remote-site name="${infinispan.site.name:site1}"/>
</remote-sites>
</stack>
</jgroups>
<cache-container name="default" statistics="true">
<transport cluster="${infinispan.cluster.name:cluster}" stack="${infinispan.cluster.stack:local}" node-name="${infinispan.node.name:}" site="site1"/>
<serialization>
<!-- Add your custom classes to the allow list -->
<allow-list>
<!-- Add the Keycloak class that needs to be deserialized -->
<class name="org.keycloak.cluster.infinispan.WrapperClusterEvent"/>
<regex>org\.keycloak\.cluster\.infinispan\..*</regex>
</allow-list>
</serialization>
<security>
<authorization/>
</security>
<distributed-cache name="mycache" mode="SYNC" owners="3" statistics="true">
<encoding media-type="application/x-java-object"/>
<!-- Mee=mory and eviction settings -->
<!-- Backup configuration for cross-site replication -->
<backups>
<backup site="site2" strategy="ASYNC" timeout="30000">
<state-transfer timeout="30000"/>
</backup> <!--
<backup site="site3" strategy="ASYNC" timeout="30000">
<state-transfer timeout="30000"/>
</backup> -->
</backups>
</distributed-cache>
<distributed-cache name="sessions" mode="SYNC" owners="3" statistics="true">
<encoding media-type="application/x-java-object"/>
<backups>
<backup site="site2" strategy="ASYNC" timeout="30000">
<state-transfer timeout="30000"/>
</backup> <!--
<backup site="site3" strategy="ASYNC" timeout="30000">
<state-transfer timeout="30000"/>
</backup> -->
</backups>
</distributed-cache>
<!-- and more caches like this -->
<replicated-cache name="work" mode="ASYNC" statistics="true">
<encoding media-type="application/x-java-object"/>
<!-- <backups>
<backup site="site2" strategy="ASYNC" timeout="15000">
<state-transfer timeout="30000"/>
</backup>
<backup site="site3" strategy="ASYNC" timeout="15000">
<state-transfer timeout="30000"/>
</backup>
</backups> -->
<expiration lifespan="-1"/>
</replicated-cache> <!--
<distributed-cache name="work" mode="SYNC" owners="2" l1-lifespan="60000" statistics="true">
<encoding media-type="application/x-jboss-marshalling"/>
<backups>
<backup site="site2" strategy="ASYNC" timeout="15000">
<state-transfer timeout="30000"/>
</backup>
</backups>
</distributed-cache> -->
<distributed-cache name="actionTokens" mode="ASYNC" owners="3" statistics="true">
<encoding media-type="application/x-java-object"/>
<backups>
<backup site="site2" strategy="ASYNC" timeout="30000">
<state-transfer timeout="30000"/>
</backup> <!--
<backup site="site3" strategy="ASYNC" timeout="30000">
<state-transfer timeout="30000"/>
</backup>-->
</backups>
</distributed-cache>
</cache-container>
<server xmlns="urn:infinispan:server:14.0">
<interfaces>
<interface name="public">
<inet-address value="${infinispan.bind.address:host1}"/>
</interface>
</interfaces>
<socket-bindings default-interface="public" port-offset="${infinispan.socket.binding.port-offset:0}">
<socket-binding name="default" port="${infinispan.bind.port:11222}"/>
<socket-binding name="memcached" port="11221"/>
</socket-bindings>
<security>
<security-realms>
<security-realm name="default">
<!-- Uncomment to enable TLS on the realm -->
<!-- server-identities>
<ssl>
<keystore path="application.keystore"
password="password" alias="server"
generate-self-signed-certificate-host="localhost"/>
</ssl>
</server-identities-->
<properties-realm groups-attribute="Roles">
<user-properties path="users.properties"/>
<group-properties path="groups.properties"/>
</properties-realm>
</security-realm>
</security-realms>
</security>
<endpoints socket-binding="default" security-realm="default"/>
</server>
</infinispan>
---
|
|
Hi Pedro, could you please provide an update on this.
…On Tue, 8 Oct, 2024, 19:35 ROHIT RATHOR, ***@***.***> wrote:
PFA
On Tue, 8 Oct, 2024, 19:34 ROHIT RATHOR, ***@***.***> wrote:
> Now I did configuration as you suggested but after that I get some
> problems like
> 1. Unable to access keycloak GUI from browser .
> 2. Getting serialization related error in infinispan and keycloak.
>
> PFA for exception and also review my configuration I attached .
>
> On Tue, 8 Oct, 2024, 18:07 ROHIT RATHOR, ***@***.***>
> wrote:
>
>> Thanks, I'll check it out. Will let you know how it goes.
>>
>> On Tue, 8 Oct, 2024, 17:22 darius-m, ***@***.***> wrote:
>>
>>> Communications between Keycloak and Infinispan are not done through
>>> backups, but using remote-store. You also don't need to define the
>>> encoding (Infinispan will throw some errors but you should be able to
>>> safely ignore those). Here's an example configuration (it's done using
>>> Ansible, but you should be able to get the gist of it) -
>>> https://github.com/UPB-Admin/ansible-keycloak/blob/77038d489d72acd29106387d7313011ce861877a/roles/keycloak/templates/cache-ispn.xml#L36
>>>
>>> You should use the backups feature when configuring the communications
>>> between the external Infinispan nodes in different clusters.
>>>
>>> Do note that you should use the newer versions of Keycloak, that have
>>> much better support for high availability since they've moved session
>>> storage to the database, so Infinispan configurations are less finicky
>>> (especially persistence).
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <#33264 (comment)>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/AYRFOPR4W66GBQEY3Z7AUQDZ2PBORAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXHEYTQNQ>
>>> .
>>> You are receiving this because you authored the thread.Message ID:
>>> ***@***.***>
>>>
>>
|
|
Hi Pedro ,
I hope this mail find you well.
We are using Jakarta EE and keycloak 21 . We are facing ClassCastException
when I use keycloak code . Actually , I am using OIDC Filter to intercept
the http requests to redirect it to keycloak server in web.xml file of my
java web application. Could you please let me know wheather we have Jakarta
support in keycloak 21 version or not.
Thanks
…On Wed, 9 Oct, 2024, 12:15 ROHIT RATHOR, ***@***.***> wrote:
Hi Pedro, could you please provide an update on this.
On Tue, 8 Oct, 2024, 19:35 ROHIT RATHOR, ***@***.***> wrote:
> PFA
>
> On Tue, 8 Oct, 2024, 19:34 ROHIT RATHOR, ***@***.***>
> wrote:
>
>> Now I did configuration as you suggested but after that I get some
>> problems like
>> 1. Unable to access keycloak GUI from browser .
>> 2. Getting serialization related error in infinispan and keycloak.
>>
>> PFA for exception and also review my configuration I attached .
>>
>> On Tue, 8 Oct, 2024, 18:07 ROHIT RATHOR, ***@***.***>
>> wrote:
>>
>>> Thanks, I'll check it out. Will let you know how it goes.
>>>
>>> On Tue, 8 Oct, 2024, 17:22 darius-m, ***@***.***> wrote:
>>>
>>>> Communications between Keycloak and Infinispan are not done through
>>>> backups, but using remote-store. You also don't need to define the
>>>> encoding (Infinispan will throw some errors but you should be able to
>>>> safely ignore those). Here's an example configuration (it's done using
>>>> Ansible, but you should be able to get the gist of it) -
>>>> https://github.com/UPB-Admin/ansible-keycloak/blob/77038d489d72acd29106387d7313011ce861877a/roles/keycloak/templates/cache-ispn.xml#L36
>>>>
>>>> You should use the backups feature when configuring the
>>>> communications between the external Infinispan nodes in different clusters.
>>>>
>>>> Do note that you should use the newer versions of Keycloak, that have
>>>> much better support for high availability since they've moved session
>>>> storage to the database, so Infinispan configurations are less finicky
>>>> (especially persistence).
>>>>
>>>> —
>>>> Reply to this email directly, view it on GitHub
>>>> <#33264 (comment)>,
>>>> or unsubscribe
>>>> <https://github.com/notifications/unsubscribe-auth/AYRFOPR4W66GBQEY3Z7AUQDZ2PBORAVCNFSM6AAAAABOZ23XGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXHEYTQNQ>
>>>> .
>>>> You are receiving this because you authored the thread.Message ID:
>>>> ***@***.***
>>>> com>
>>>>
>>>
|
Uh oh!
There was an error while loading. Please reload this page.
Hi Everyone , i have come to a problem where i have to setup keycloak accross data centers.
Actually , i have two data centers , where we have two load balancers which will routes the traffic across the cluster in datacenter .
The limitation is that one load balancer can routes the traffic in only cluster of one data center. There is no connectivity accross the datacenter through load balancers. So is there any way to handle this problem at keycloak level only. Your discussion and suggetions will be admireable.
All reactions