django-keycloak icon indicating copy to clipboard operation
django-keycloak copied to clipboard

Is it possible to use keycloak auth for django admin?

Open slavashvets opened this issue 5 years ago • 3 comments

Hello, thanks for the great library.

My question is related to django admin interface. I've added remote user setup according to the manual, authentication is working, but I still cannot get rid of django login form and not sure about remote roles are mapped correctly in admin UI.

Is it possible to make django admin UI to be managed by Keycloak? (Django==2.1)

slavashvets avatar Mar 12 '19 22:03 slavashvets

Hi @slavashvets, with the remote user setup it will be quite hard since Django is tightly coupled to a user model in the database through the log model. A clean solution to work around this is very welcome.

Peter-Slump avatar Mar 18 '19 20:03 Peter-Slump

Hello @slavashvets . You might want to try extending the ModelAdmin with a modified log_addition, log_change and log_deletion and specify your own version of the LogEntry model without the user or completely remove this line. However, there might be other parts of the admin depending on this model as @Peter-Slump already explained.

bossan avatar Mar 26 '19 21:03 bossan

@Peter-Slump , @bossan Has anything changed now? Is it possible?

nabinkhadka avatar Jun 29 '20 17:06 nabinkhadka