[keycloak-user] cockroachdb

Simon Payne simonpayne58 at gmail.com
Fri Jan 5 06:26:17 EST 2018


thanks for the information,

i've already identified the issues you mention in step 3 and have been
overcoming in a similar manner, however, i wasn't aware that to 'fix' the
select for update also meant breaking the locking functionality.  do we
know whether keycloak execute SELECT FOR UPDATE as part of use case
invocation or only during the liquibase schema alterations?


Simon




On Fri, Jan 5, 2018 at 10:08 AM, <moritz.keppler at daimler.com> wrote:

> Hi Simon,
>
> we got that running - not in a production environment but as a demo.
>
> We had to:
> (1) update the liquibase version used. The one keycloak uses generates
> some SQL statements cockroachdb 1.0 does not support.
> (2) patch the DefaultLiquibaseConnectionProvider in a way that no "SELECT
> FOR UPDATE" is generated. This breaks the lock functionality, definitely
> not recommended in an productive environment!
> (see https://github.com/cockroachdb/cockroach/issues/6583)
> (3) generate liquibase scripts cockroach is able to understand. The most
> important thing is that a primary key has to be defined during table
> creation.
> To do so we applied all scripts to a postgres instance, generated a
> changeset from this db via liquibase, rewrote it to be cockroach
> compatible, applied it to a cockroach instance and filled the liquibase
> changelog tables so that keycloak believes all changes are already applied.
> An alternative approach is described here https://github.com/cloudtrust/
> keycloak-cockroach
>
> Would be great if one day cockroachdb was supported out of the box.
>
> Moritz Keppler
>
> Daimler TSS GmbH
> Wilhelm-Runge-Straße 11
> 89081 Ulm/Germany
> mailto:moritz.keppler at daimler.com
>
> http://www.daimler-tss.com
>
> Daimler TSS GmbH
> Sitz und Registergericht/Domicile and Register Court: Ulm,
> HRB-Nr./Commercial Register No.: 3844 Geschäftsführung/Management:
> Christoph Röger (Vorsitzender/Chairperson), Steffen Bäuerle
>
> -----Original Message-----
> From: keycloak-user-bounces at lists.jboss.org [mailto:keycloak-user-bounces@
> lists.jboss.org] On Behalf Of Simon Payne
> Sent: Thursday, January 04, 2018 3:21 PM
> To: keycloak-user <keycloak-user at lists.jboss.org>
> Subject: [keycloak-user] cockroachdb
>
> Hi,
>
> has anyone successfully managed to use cockroachdb with keycloak?
>
> if so, what steps were taken?
>
> thanks
>
> Simon.
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
> If you are not the addressee, please inform us immediately that you have
> received this e-mail by mistake, and delete it. We thank you for your
> support.
>
>


More information about the keycloak-user mailing list