django-keycloak
django-keycloak copied to clipboard
Is it safe to use this library in any environment?, particularly production?
I need to choose a way to integrate these two (Keycloak and Django), and I really like this initiative over others I've seen, but there haven't been any updates in a long time (at least from the dates in the code). I did a small test and it does not work with recent versions of Django as there are many things that have changed. Of course, I would like to contribute; unfortunately, my programming skills are not close to allowing me to do so. Therefore my question. Please do not take it as a complaint. Thank you very much!
Well, I'm going to answer this myself. The answer is NO. This library won't work with new Django or Keycloak versions. (I'm using Django 4.x and KC 19.x) This library needs a complete refactoring/update process.
I spent countless hours trying to solve some of the problems that appeared; I solved one, and another one appeared after that one, and so on. Things are changing too fast in this "lovely" IT world, so unless you freeze all your versions (in very old ones) you will be having problems very frequently.
I'm really sad because this seemed very promising. And let me be clear, I'm aware of the complexity of this code (in many cases far beyond my understanding), and it has a lot of merits, so in no way I'm ignoring that fact and the effort Peter originally put into building it.
@Peter-Slump A friendly piece of advice; If I were you, I will retire this, at least until you get the time to update it if that is a possibility in any near future. And I say it with good intentions, because what happens is that you arrive with great expectations to the repo and leave frustrated.
Wish you the best! Over and out
@Peter-Slump it would be great to add an "outdated" batch in the doku and the github page.
@RicardoFernandez-UY What are you using at the moment? What is the current best practice to pare django with keykloak?
@Wissperwind Hi, how are you? I wasn't able to find the right way for me yet. So, still struggling with it. I've explored a bunch of libraries like Peter's, and many of them were also outdated or unlike Peter's, had very poor documentation, so they were very difficult to understand and troubleshoot for a newbie programmer like me. I've also started exploring the possibility of using a reverse proxy like gatekeeper, or its successor, to work as an authentication/authorization agent between Keycloak and my Django app. It's quite a different concept so, I'm still working on it because I found some problems I was not able to understand/solve yet. Any other ideas or suggestions regarding KC and Django work together will be always welcome!! Warm regards!
Ok, have you tried this one? https://github.com/urbanplatform/django-keycloak-auth This is the one I try to figure out today.
No, I haven't. But I'll take a look at it as soon as I can. From the description, it seems to be oriented to work with the DRF (Django Rest Framework) and not so much for the Django web apps. But it certainly deserves taking a look at it. Thank you!!
@RicardoFernandez-UY I created a PR that will make this package work with Django 4.x and KC 19.x but it needs release or you can fork the repo and use the PR branch code
@dabocs Thank you very much!!!! I'll wait a bit for the merge as it seems to have already been approved. If that doesn't happen in the next few days I will start by trying the branch code. Warm regards!!