Configure Keycloak to use a PostgreSQL database

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 15

  • @tonmoy7203
    @tonmoy7203 Рік тому +7

    can you do same thing in docker ?
    i want to run keycloak in docker with postgres container.

  • @magaiconsultoriaemtimagai1508
    @magaiconsultoriaemtimagai1508 Рік тому +1

    This Keycloak software, in this case uses postgres (where we must create a database with the name "keycloak" which will store the configurations and user accounts of the application that will consume the keycloak). Correct?
    But what I need to know is whether it would be possible to use keycloak itself to manage all Postgres database roles and users, as I have several databases on different machines and whenever I need to change user permissions on tables and ddl and dml (grants) I have to go machine by machine and make the changes. Is it possible to do that? If so, how?

    • @learningsoftwareskills
      @learningsoftwareskills  11 місяців тому

      Hi, all you need is is a database user credentials to be configured in keycloak. Then keycloak will itself create the tables required.
      You can also provide the credentials of an existing database user. Then keycloak will create extra tables in the existing user database.
      In any case keycloak will not manage the roles, users etc if the database.
      I think for achieving that you need to do automation outside of keycloak.
      Hope this helps, cheers 👍

  • @cobar2
    @cobar2 8 місяців тому +1

    What if you already have a realm file for use in H2? How do you port the data to Postgres?

    • @learningsoftwareskills
      @learningsoftwareskills  8 місяців тому

      Hi, mondeca.elevio.help/en/articles/2204-migrate-keycloak-from-h2-to-postgresql
      This link might be useful for migrating data
      Hope this helps, cheers 👍

  • @erosburastero8205
    @erosburastero8205 6 місяців тому +1

    i've set it up and i got all the tables with the default values, but when i add either a realm or user it doesn't update the database, do you know what's happening? thanks

    • @learningsoftwareskills
      @learningsoftwareskills  6 місяців тому

      Hi please check the logs, it refresh the database query
      Or else restart keycloak
      Hope this helps, cheers 👍

  • @MuhammadAhmad-h4j3v
    @MuhammadAhmad-h4j3v Рік тому

    showing jdbc error

  • @ignitehub-dev
    @ignitehub-dev 11 місяців тому +2

    who is actually running their services outside of a container? not really relevant.

    • @learningsoftwareskills
      @learningsoftwareskills  11 місяців тому

      May be it is relevant for people who are learning keycloak on baremetal, or someone who is running a small or medium scale application

    • @ztevozmilloz6133
      @ztevozmilloz6133 10 місяців тому +1

      I am using LXC, kind of container, but not like Docker, nearest from OS. From LXC perspective your are into a classic Linux system without all this docker layering configuration, so this post is relevant for me ! Thanks