Reputation: 1448
I am trying to setup Keycloak server for our organisation. I have couple of questions.
I have followed the official documentation, but for some reason not able to view the content of the link. Any helpful links to proper guide would be great.
Upvotes: 15
Views: 40850
Reputation: 503
Check Keycloak Custom User Federation
It means that, to use diffirent datasource (or process) while Keycloak username / password login
see =>
First link => explaining how to configure external db to keycloak.
Second link (need changes)=> these examplecan change like that,
Second example(my suggestion) will be abstract your custom code (federation process, your service) and keycloak. Keycloak ony call your service, everything else are your implementation.
Upvotes: 11
Reputation: 146
I answered a similar question regarding existing databases user and keycloak authentication (link here)
I published my own solution as a multi RDBMS implementation (oracle, mysql, postgresl, sqlserver) to solve simple database federation needs, supporting bcrypt and several types of hashes.
It is a configurable keycloak custom provider, you will only need the to set some SQL queries and it is ready to use.
It is already compatible with new keycloak quarkus deployment.
Feel free to clone, fork, contribute or do whatever you need to solve your issue.
GitHub repo:
https://github.com/opensingular/singular-keycloak-database-federation
Upvotes: 7
Reputation: 1845
You should implement your own user storage SPI to integrate your MySQL db as an external user storage db
https://www.keycloak.org/docs/latest/server_development/index.html#_user-storage-spi
Upvotes: 10