2021-06-01
POST
In this article we’ll cover lessons learned implementing a Keycloak authentication solution into Django Rest Framework (DRF) using the mozilla-django-oidc library. Note that this article assumes some familiarity with Django.
Requirements
These can be summarized as follows:
- Replace the current authentication solution with a Keycloak-based solution so that users can be authenticated and enable single sign-on between applications using different authentication providers.
- The solution should cover both Django (session authentication) and DRF (token authentication).
- It should be able to handle a dedicated Keycloak client and expandable to allow roles-based authorisation.
- OpenID connect preferred
- Any libraries used should be currently supported and widely used