https://github.com/jambit/keycloak-service
https://github.com/jambit/keycloak-service
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jambit/keycloak-service
- Owner: jambit
- Created: 2019-02-15T09:29:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-15T14:28:28.000Z (over 7 years ago)
- Last Synced: 2025-03-04T06:14:17.322Z (over 1 year ago)
- Language: CSS
- Size: 442 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Info
This service runs only together with
- [coffee-order-frontend](https://github.com/jambit/coffee-order-frontend)
- [coffee-order-service](https://github.com/jambit/coffee-order-service)
checkout and build those projects as well.
# Setup
- install [Docker](https://www.docker.com/products/docker-desktop)
- to make everything work, you must add the following line to your `/etc/hosts`
```
127.0.0.1 keycloak
````
Otherwise the redirects to keycloak do not work. This host **must** be used in all systems which communicate with keycloak (i.e. frontend, backend service, 3rd party identity provider, etc.).
## Setup Keycloak
- create a new realm `CoffeeOrderRealm`
- set Login settings a reqired
- set email
- host=`mailserver`
- port=`1025`
- from= any sender address you want
- create client `coffee-order-frontend` with
- Client Protocol = `openid-connect`
- Access Type = `public`
- Valid Redirect URL = `http://localhost:8081/*`
- Web Origins = `+` (to use all URLs specified in Valid Redirect URL)
- create client `coffee-order-service` with
- Client Protocol = `openid-connect`
- Access Type = `bearer-only`
- create role `users` and set this role as default role
# Build
- build project with `mvn clean install`. This builds the war file and the docker images.
# Start
- start everything with `docker compose up`
- NOTE: you must also build the docker containers for `coffee-order-frontend` and `coffee-order-service-spring` first.
# Architecture
