Git Product home page Git Product logo

Comments (7)

DGuhr avatar DGuhr commented on July 20, 2024 1

Closing here, as the new example is available under https://github.com/keycloak/keycloak-quickstarts/tree/main/user-storage-jpa - for a specific migration guide, I'd like to hear more specific problems first that we could address in that guide, after having that information let's create a new issue to create that guide.

from keycloak-quickstarts.

marcelnem avatar marcelnem commented on July 20, 2024 1

I was able to upgrade our user storage connector based on the example from @pedroigor pull request.

I did a diff between old code and the new example.
The little problems which I had to overcome were related to:
DB config (choosing SQL dialect) in persisence.xml
Changing how Entity Manager is initialized.
Removing JEE annotations
Updating deprecated interfaces to the new ones.

from keycloak-quickstarts.

ahus1 avatar ahus1 commented on July 20, 2024

There is now a PR for this: #302

from keycloak-quickstarts.

pedroigor avatar pedroigor commented on July 20, 2024

@ahus1 Thanks.

from keycloak-quickstarts.

marcelnem avatar marcelnem commented on July 20, 2024

Will jpa user connector be supported only from keycloak 18? What should we do in the meantime if we want to update to keycloak 17 and we currently use User federation jpa on wildfly? Does it mean we have to wait till Keycloak 18 to switch to Quarkus?

Next to a new example, it would be also good to summarise steps to migrate existing providers. We spent a lot of time writing our DB user connector for wildfly, starting from a quarkus basic example might still be some work. For example it would be helpful to summarise changes such as that entity manager has to be initialized in a different way and other limitations of quarkus. In other words, the new example is useful for projects which start from scratch, but eventually all keycloak projects will have to migrate to quarkus, so the existing user storage providers in these organisations will have to be migrated to work with quarkus.

Maybe it is enough to look at the https://github.com/keycloak/keycloak-quickstarts/pull/302/files differences and apply the same differences to my provider, but this requires reverse engineering. A simple guide with the know-how from @pedroigor could save us time figuring out the same problems that he had to solve to migrate the user-storage-jpa example code.

The reverse engineering / comparing of files is not straightforward because the files are named differently and are moved to a different folder. I will have to do a diff from the previous UserAdapter to the new UserAdapter to see the actual changes I need to apply to my project.

Do these docs also need to be updated or are they independent of wildfly/quarkus or already updated for quarkus?
https://www.keycloak.org/docs/latest/server_development/index.html#_user-storage-spi

from keycloak-quickstarts.

pedroigor avatar pedroigor commented on July 20, 2024

@marcelnem You are right, the experience is not the best right now. We are trying to provide as much information as we can and possibly create some guides.

You should be able to use an additional datasouce/persistence unit starting from 17.0.1.

from keycloak-quickstarts.

nicolabeghin avatar nicolabeghin commented on July 20, 2024

@pedroigor thanks for your work. I just opened issue #341 since server is not booting up with the out-of-the-box JAR from the updated user-storage-jpa. Really looking forward to any kind of input since blocked from updating my own user storage https://github.com/nicolabeghin/keycloak-multiple-ds-user-storage.

from keycloak-quickstarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.