Hi everyone. I’m trying to integrate Keycloak with OpenMRS so that OpenMRS and a separate frontend app can share the same login (SSO). Below are the steps I’ve followed and the issue I’m facing.
What I have done so far
1. Set up Keycloak
Ran Keycloak using Docker:
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:latest start-dev
Your first two questions are answered in the README for the module. For 3, that’s probably the easiest way to get it there. For 4, I’d say not, but note that if you’re running Keycloak separately from the OpenMRS Docker Compose stack you’ll likely want to create a Docker network for it and you’ll need to modify the docker-compose.yaml file for OpenMRS so that it can access that network. Otherwise you may need to hard-code IP addresses. This blog post has some helpful pointers and here is the Docker Compose docs, note particularly the section on using an existing network.
Apologies for the very delayed response. You need to define a scope property which should be able to be blank, but should be there. The scopes you need to send are dependent on the configuration of your Keycloak server and basically whether you are using scoped-based permissions.