skip to Main Content

How would I achieve Spring Boot + Keycloak authentication with PostgreSQL database having users and user role tables already built from the Django application?

2

Answers


  1. Let me understand your scenario first.Then maybe I or someone else can help you. Do you have a set of users and user roles in an existing system that is built using Django application and Postgres DB ? And you want to use the same database as your keycloak database in a Spring Boot + Keycloak authentication system ?

    Keycloak generally as it’s own structure for database management. You can’t just use any existing database used on another authentication system that doesn’t follow the exact same ways like keycloak. IMO, what you can do is migrate your existing users and user role data in keycloak database using any migration script or api. Keycloak has a hell lot of apis for almost all sorts of needs. This link has a lot of api examples. You can also follow their api documentation.

    Login or Signup to reply.
    1. configure Keycloak to use your existing database (plenty of answers / articles / doc on the subject)
    2. configure Spring API applications as resource-servers
    3. configure UI applications as OpenID clients (with a help of an OpenID client lib)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search