You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HOWTO Keycloak and GeoNode in Docker Compose on localhost
Goal
Starting with the docker-compose of GeoNode, add a Keycloak based authentication, with Keycloak as a container.
On the Keycloak side
You need to define the KEYCLOAK_FRONTEND_URL environment variable to http://localhost:YOURPORT/auth. If you don't do that, Keycloak will guess the URL by itself and the tokens won't work between the login form and the Django backend
On the GeoNode side
The Keycloak provider of django-allauth does not work in this case because it uses a unique URL for both the login form (which must be accessible by your browser) and the other URL used by the Django backend. I have implemented a feature with an additional setting KEYCLOAK_URL_ALT to be used by the Django backend.
A Pull Request is pending on django-allauth to integrate it: Meanwhile, you can use my fork at https://github.com/AlexGacon/django-allauth.
You need to have in the settings file the following addition to SOCIALACCOUNT_PROVIDERS:
You also have to create in the Django administration page a Social App based on the Keycloak provider, with the client credentials configured in Keycloak.
The text was updated successfully, but these errors were encountered:
From gitter https://gitter.im/GeoNode/general?at=60d32001f862a72a30cbad73
We should discuss were to put it
HOWTO Keycloak and GeoNode in Docker Compose on localhost
Goal
Starting with the docker-compose of GeoNode, add a Keycloak based authentication, with Keycloak as a container.
On the Keycloak side
You need to define the
KEYCLOAK_FRONTEND_URL
environment variable tohttp://localhost:YOURPORT/auth
. If you don't do that, Keycloak will guess the URL by itself and the tokens won't work between the login form and the Django backendFor the client configuration, you can follow the instructions available here: https://github.com/GeoNode/geonode-contribs/tree/master/django-geonode-keycloak#django-allauth
On the GeoNode side
The Keycloak provider of django-allauth does not work in this case because it uses a unique URL for both the login form (which must be accessible by your browser) and the other URL used by the Django backend. I have implemented a feature with an additional setting
KEYCLOAK_URL_ALT
to be used by the Django backend.A Pull Request is pending on
django-allauth
to integrate it: Meanwhile, you can use my fork at https://github.com/AlexGacon/django-allauth.You need to have in the settings file the following addition to
SOCIALACCOUNT_PROVIDERS
:You also have to create in the Django administration page a Social App based on the Keycloak provider, with the client credentials configured in Keycloak.
The text was updated successfully, but these errors were encountered: