-
Spring WebFlux as Resource Server.
-
Keycloak as OIDC provider.
-
Angular application with SSO.
-
App store example
-
Launch Employee Angular front end directly or using app store.
-
Two roles Admin and user roles supported.
-
Admin can perform CRUD operations.
-
User role can view only.
-
Role validation is done both at frontend and backend.
-
username and password - admin → admin1/password - user → user1/password
-
Replace all occurance of IP Address in
keycloak/universal-realm.json
with your host IP Address. -
Replace all occurance of IP Address in
docker-compose.yml
with your host IP Address. -
Start the applications using docker-compose
$ docker-compose up -d
-
Now you can access the application at url `http://<host-ip>
Note
|
To rebuild and run single container $ docker-compose up -d --force-recreate --no-deps --build -V <service-name> |
-
Change application redirect uri ipaddress to host ip where the application will run in
keycloak/universal-realm.json
-
Change employee-app ipaddress in app-store
app-store/src/app/assets/config/apps.json
to host IP where the application will be running. -
Change keycloak ipaddress in app-store
app-store/src/app/assets/config/oidc.json
to host IP where the keycloak will be running. -
Change keycloak ipaddress in employee-app
employee-app/src/app/assets/config/oidc.json
to host IP where the keycloak will be running. -
Change employee-backend ipaddress in employee-app
employee-app/proxy-config.json
to host IP where the employee-backend will be running. -
Change keycloak ipaddress in employee-backend
employee-backend/src/main/resources/application.yml
to host IP where the keycloak will be running. -
start keycloak
docker-compose up -d keycloak
-
Build and start app-store
$ cd app-store $ npm install $ ng serve --host 0.0.0.0 --ssl
-
Build and start emplyee-app
$ cd emplyee-app $ npm install $ ng serve --host 0.0.0.0 --port 4201 --ssl
-
start employee backend
$ cd employee-backend $ mvn spring-boot:run
-
now app-store can be accessed on url
https://localhost:4200