This is a small application demo used to showcase integration with a separate Keycloak service to secure a microservices architecture provisioned using the Eclipse MicroProfile framework.
This application domain is to manage the speakers and session talks for a conference event.
|
Important
|
The Keycloak realm used by this application should have a client named conference-web. This demo assumes that this client is deployed (along with the Keycloak realm) in http://localhost:8888/. A sample realm configuration file is provided in the keycloak/data directory that can be imported to quickly test the integration in this demo.
|
This application is composed of:
-
2 microservices applications:
-
A
speakermicroservice used to manage the speakers that will talk at the event. -
A
sessionmicroservice used to manage the session talks held at the event.
-
-
A small web application designed as an Angular 16+ SPA that uses the previous microservices.
To run these applications you can easily start a Docker container to setup Keycloak and import the configuration file mentioned above:
> docker run -p 8888:8080 -v ./keycloak/data:/opt/keycloak/data/import:ro quay.io/keycloak/keycloak:21.1.1 start-dev --import-realmUsers that access this application should follow into the next 3 groups, each one mapped to multiple roles defined in the Keycloak realm:
Admin-
Administrators of the conference event. They can:
-
Create new session talks (
can-create-sessions) -
View all session talks (
can-see-sessions) -
Delete session talks (
can-delete-sessions) -
View all registered speakers (
can-see-speakers) -
Add new speakers (
can-add-speakers) -
Accept speakers into the conference (
accept-speakers)
-
Speaker-
Speakers of talks at the event. They can:
-
View registered sessions (
can-see-sessions) -
View all fellow speakers (
can-see-speakers) -
Register themselves as speakers (
speaker,can-add-speakers)
-
Attendee-
Attendees of the event. They can:
-
View all speakers registered (
can-see-speakers) -
View all session talks (
can-see-sessions) -
Attend a session if interested (
can-register-to-sessions)
-
The microservices are configured as Maven projects and can be launched from the command line using the Payara Micro Maven plugin like this:
mvn clean install
mvn payara-micro:start