By default, the plugin is not active on a new realm. It has to be activated by enabling its two event listeners.
Use mvn package for compiling, or mvn verify to make sure that all tests are also run.
(standard mvn behavior)
Checkout the following dockerfile (simplified copy of docker/Dockerfile)
FROM quay.io/keycloak/keycloak:26.5.4
USER root
COPY plugins/*.jar /opt/keycloak/providers/
USER 1000
RUN /opt/keycloak/bin/kc.sh build
RUN /opt/keycloak/bin/kc.sh show-config | grep keycloak-facilities-admin-plugin
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev"]
What has to be done:
- Copy the jar file from
./target/keycloak-facilities-admin-plugin-1*.jarto/opt/keycloak/providers/inside the docker container - Run
/opt/keycloak/bin/kc.sh buildwhich will link the plugin to keycloak - Optionally, call
/opt/keycloak/bin/kc.sh show-config | grep keycloak-facilities-admin-plugin. it is a check that the plugin is listed as part of keycloak
- Manage realms -> Create realm:

- Keycloak automatically switches into the new realm:

- In Realm settings, enable Admin permissions:

- In Realm settings -> Events, add the event listeners
scicat-facilitymanager-helperandscicat-superadmin-helper:
- In Groups, create a new group with name
<facilityName>--initnewfacility:
The suffix is automatically removed. This step also creates the necessary permissions and a manager user, see Workflows documentation.
Repeat this step for each facility you like to set up - Manually create a new permission with the following details:
- Set credentials for the manager users:

The following is not a checklist. More a list of options what you can do:
- Login as Facility Manager (given you have credentials set as superadmin). The Url is like http://localhost:8024/admin/my-new-realm/console/, you can get it from superadmin view Clients->"security-admin-console", the URL is on the right.

- This is what it looks like now:

- Create a subgroup in your facility:
The plugin automatically sets policy, permission and attribute to the newly created subgroup. - Create a user. (note: you need to add a group or subgroup, otherwise you get a permission error)

- Add and Remove to/from your groups and subgroups
- Also add users of other facilities
⚠ Right now, this doesn't seem to work (in this case, I tried to add an epfl user)






